mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix the CModelOperation
This commit is contained in:
parent
3303fed1ef
commit
69a8947522
2 changed files with 4 additions and 2 deletions
|
@ -80,7 +80,7 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe
|
|||
* Queue of deltas created explicily by the C Model that
|
||||
* have yet to be fired.
|
||||
*/
|
||||
private ArrayList fCModelDeltas = new ArrayList();
|
||||
ArrayList fCModelDeltas = new ArrayList();
|
||||
|
||||
/**
|
||||
* Queue of reconcile deltas on working copies that have yet to be fired.
|
||||
|
|
|
@ -525,13 +525,15 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
|||
*/
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
CModelManager manager= CModelManager.getDefault();
|
||||
int previousDeltaCount = manager.fCModelDeltas.size();
|
||||
try {
|
||||
fMonitor = monitor;
|
||||
execute();
|
||||
} finally {
|
||||
registerDeltas();
|
||||
// Fire if we change somethings
|
||||
if (!hasModifiedResource() || manager.reconcileDeltas.isEmpty()) {
|
||||
if ((manager.fCModelDeltas.size() > previousDeltaCount || !manager.reconcileDeltas.isEmpty())
|
||||
&& !this.hasModifiedResource()) {
|
||||
manager.fire(ElementChangedEvent.POST_CHANGE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue