From 5eb3452642ab8ed908f7958e6f70241e1a220288 Mon Sep 17 00:00:00 2001 From: JaniSimomaa Date: Thu, 11 Jul 2019 12:44:11 +0300 Subject: [PATCH] Prevent DistrictDiagramEditor from disposing to save load time gitlab #55 Change-Id: I389045f81545e1f056b060b4560f0df5d3e70543 --- .../district/network/ui/DistrictDiagramEditor.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java index 9862cde2..7805ea1b 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java @@ -1,5 +1,6 @@ package org.simantics.district.network.ui; +import org.eclipse.ui.IWorkbenchPartReference; import org.eclipse.ui.PartInitException; import org.simantics.modeling.ui.diagramEditor.DiagramEditor; import org.simantics.modeling.ui.diagramEditor.DiagramViewer; @@ -7,9 +8,16 @@ import org.simantics.modeling.ui.diagramEditor.DiagramViewer; public class DistrictDiagramEditor extends DiagramEditor { public static final String ID = "org.simantics.district.network.ui.diagrameditor"; - + @Override protected DiagramViewer createViewer() throws PartInitException { return new DistrictDiagramViewer(); } + + @Override + public void partHidden(IWorkbenchPartReference partRef) { + // we do not want to have disposer for district diagram viewer + // to add disposer with default settings uncomment the following line + // super.partHidden(partRef); + } } -- 2.47.1