Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2015-02-25 10:39:26 +0000
committerLaurent Redor2015-02-25 11:03:42 +0000
commit341da504dd31742f48059e974eeb6bb270f03ffd (patch)
tree5619f5b5a47284340a96e22cfa46db7283693de8
parent9393d3b43397b3946b81ae3c75d30e48afeaf82d (diff)
downloadorg.eclipse.sirius-341da504dd31742f48059e974eeb6bb270f03ffd.tar.gz
org.eclipse.sirius-341da504dd31742f48059e974eeb6bb270f03ffd.tar.xz
org.eclipse.sirius-341da504dd31742f48059e974eeb6bb270f03ffd.zip
[460432] Tabbar dispose is finally only called during the dispose
Calling the dispose of tabbar directly in the close of the editor can have side effect on session/UISession closing. Change-Id: I4fe0cee4b5c479d4c3456d9d344686e1e5373dad Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorImpl.java18
1 files changed, 5 insertions, 13 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorImpl.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorImpl.java
index 19c502dde9..79b2e0d471 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorImpl.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/editor/DDiagramEditorImpl.java
@@ -653,6 +653,11 @@ public class DDiagramEditorImpl extends SiriusDiagramEditor implements DDiagramE
@Override
public void dispose() {
isClosing = true;
+ // Dispose the tabbar (to avoid memory leak)
+ if (getTabbar() != null) {
+ getTabbar().dispose();
+ setTabbar(null);
+ }
disposeGraphicalListeners();
if (getDiagram() != null && getDiagram().eResource() != null) {
if (dRepresentationLockStatusListener != null) {
@@ -732,19 +737,6 @@ public class DDiagramEditorImpl extends SiriusDiagramEditor implements DDiagramE
* react to notification whereas the editor will be closed.
*/
protected void disposeGraphicalListeners() {
- // Dispose the tabbar (to avoir memory leak)
- if (getTabbar() != null) {
- if (Display.getCurrent() == null) {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- getTabbar().dispose();
- }
- });
- } else {
- getTabbar().dispose();
- }
- setTabbar(null);
- }
// Dispose post-commit listener
disposePostCommitListener();

Back to the top