Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2019-06-11 11:22:47 -0400
committerPierre-Charles David2019-06-12 04:21:30 -0400
commit864496bca0e8ff03d498ec2d9ea582db4d79afe4 (patch)
tree4eb91991dea8f51b6e29131c7baab20dc3da5635
parent48d1ddfaa8091e333005f84e7f28a9d2b63f5e9f (diff)
downloadorg.eclipse.sirius-864496bca0e8ff03d498ec2d9ea582db4d79afe4.tar.gz
org.eclipse.sirius-864496bca0e8ff03d498ec2d9ea582db4d79afe4.tar.xz
org.eclipse.sirius-864496bca0e8ff03d498ec2d9ea582db4d79afe4.zip
[546681] Fix lifecycle of SessionEditorv6.2.1
Make sure we cleanup all our resources and remove all our listeners in dispose(). No need anymore to override the close() method. Bug: 546681 Change-Id: I3d8e29ae7734de7b9fdecbd622bddb63c0e3ca31 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/SessionEditor.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/SessionEditor.java b/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/SessionEditor.java
index 8d4ea7e2be..82980ed2f7 100644
--- a/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/SessionEditor.java
+++ b/plugins/org.eclipse.sirius.ui.editor/src/org/eclipse/sirius/ui/editor/SessionEditor.java
@@ -435,6 +435,7 @@ public class SessionEditor extends SharedHeaderFormEditor implements ITabbedProp
resourceSetListener = null;
}
if (session != null) {
+ session.removeListener(SessionEditor.this);
final IEditingSession editingSession = SessionUIManager.INSTANCE.getUISession(session);
if (editingSession != null) {
editingSession.detachEditor(this, choice == ISaveablePart2.NO);
@@ -443,18 +444,13 @@ public class SessionEditor extends SharedHeaderFormEditor implements ITabbedProp
session.getTransactionalEditingDomain().getCommandStack().removeCommandStackListener(listener);
}
}
- session = null;
- propertySheetPage = null;
- super.dispose();
- }
-
- @Override
- public void close(boolean save) {
if (pageRegistry != null) {
pageRegistry.removeRegistryListener(this);
pageRegistry = null;
- super.close(save);
}
+ session = null;
+ propertySheetPage = null;
+ super.dispose();
}
@Override

Back to the top