diff options
Diffstat (limited to 'plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/lifecycleevents/SaveAndDirtyService.java')
-rw-r--r-- | plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/lifecycleevents/SaveAndDirtyService.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/lifecycleevents/SaveAndDirtyService.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/lifecycleevents/SaveAndDirtyService.java index 42929809a48..55c60fd9f62 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/lifecycleevents/SaveAndDirtyService.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/lifecycleevents/SaveAndDirtyService.java @@ -97,7 +97,7 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav /**
* The serviceRegistry.
*/
-// private ServicesRegistry servicesRegistry;
+ // private ServicesRegistry servicesRegistry;
/**
* Associated editor. Needed by saveAs to synchronize editor input.
@@ -179,7 +179,7 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav */
public void init(ServicesRegistry servicesRegistry) throws ServiceException {
-// this.servicesRegistry = servicesRegistry;
+ // this.servicesRegistry = servicesRegistry;
// Retrieve required services.
resourceSet = servicesRegistry.getService(ModelSet.class);
@@ -222,27 +222,27 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav // Check if commandStack is null (meaning that transactionalEditingDomain
// is disposed
CommandStack commandStack = transactionalEditingDomain.getCommandStack();
- if( commandStack != null) {
+ if(commandStack != null) {
transactionalEditingDomain.getCommandStack().removeCommandStackListener(commandStackListener);
}
transactionalEditingDomain.removeResourceSetListener(resourceSetListener);
-// resourceSetListener = null;
+ // resourceSetListener = null;
}
-
+
// clean properties in order to help GC
inputChangedListeners.clear();
inputChangedListeners = null;
multiDiagramEditor = null;
-// servicesRegistry = null;
+ // servicesRegistry = null;
transactionalEditingDomain = null;
resourceSet = null;
lifeCycleEvent = null;
-
+
postSaveListeners.clear();
saveListeners.clear();
preSaveListeners.clear();
-
-
+
+
}
/**
@@ -474,8 +474,9 @@ public class SaveAndDirtyService extends LifeCycleEventsProvider implements ISav */
public boolean isDirty() {
for(ISaveablePart part : this) {
- if(part.isDirty())
+ if(part.isDirty()) {
return true;
+ }
}
return false;
|