]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Prevent DistrictDiagramEditor from disposing to save load time 13/3013/1
authorJaniSimomaa <JaniSimomaa@DESKTOP-91EJL8G>
Thu, 11 Jul 2019 09:44:11 +0000 (12:44 +0300)
committerJaniSimomaa <JaniSimomaa@DESKTOP-91EJL8G>
Thu, 11 Jul 2019 09:44:11 +0000 (12:44 +0300)
gitlab #55

Change-Id: I389045f81545e1f056b060b4560f0df5d3e70543

org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramEditor.java

index 9862cde2f143decd67f93349409911b2701af035..7805ea1b016d214c003b5fc8a6407b26b5fea0b3 100644 (file)
@@ -1,5 +1,6 @@
 package org.simantics.district.network.ui;\r
 \r
+import org.eclipse.ui.IWorkbenchPartReference;\r
 import org.eclipse.ui.PartInitException;\r
 import org.simantics.modeling.ui.diagramEditor.DiagramEditor;\r
 import org.simantics.modeling.ui.diagramEditor.DiagramViewer;\r
@@ -7,9 +8,16 @@ import org.simantics.modeling.ui.diagramEditor.DiagramViewer;
 public class DistrictDiagramEditor extends DiagramEditor {\r
 \r
     public static final String ID = "org.simantics.district.network.ui.diagrameditor";\r
-    \r
+\r
     @Override\r
     protected DiagramViewer createViewer() throws PartInitException {\r
         return new DistrictDiagramViewer();\r
     }\r
+\r
+    @Override\r
+    public void partHidden(IWorkbenchPartReference partRef) {\r
+        // we do not want to have disposer for district diagram viewer\r
+        // to add disposer with default settings uncomment the following line\r
+        // super.partHidden(partRef);\r
+    }\r
 }\r