]> gerrit.simantics Code Review - simantics/district.git/commitdiff
Adapt to platform OpenDiagramFromConfigurationAdapter changes 56/3056/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 5 Aug 2019 05:47:08 +0000 (08:47 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 5 Aug 2019 05:47:08 +0000 (08:47 +0300)
gitlab simantics/platform#325

Change-Id: I535714d4a39620caeb49e67424b09b50b544de7a

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

index 1c49acbcbc9a505772018badb9c2860f3cd8a4d8..e4e97d59eb6dcadc6ba5dc02254e3e9c9d854a41 100644 (file)
@@ -1,26 +1,26 @@
-package org.simantics.district.network.ui;\r
-\r
-import java.util.Collections;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.district.network.ontology.DistrictNetworkResource;\r
-\r
-public class OpenDiagramFromConfigurationAdapter\r
-        extends org.simantics.modeling.ui.diagramEditor.OpenDiagramFromConfigurationAdapter {\r
-\r
-    @Override\r
-    public boolean canHandle(ReadGraph g, Resource r) throws DatabaseException {\r
-        Resource diagram = getDiagram(g, r, Collections.emptySet());\r
-        if (diagram == null)\r
-            return false;\r
-        DistrictNetworkResource DN = DistrictNetworkResource.getInstance(g);\r
-        return g.isInstanceOf(diagram, DN.Diagram) && !isLocked(g, diagram);\r
-    }\r
-\r
-    @Override\r
-    protected String getEditorId() {\r
-        return DistrictDiagramEditor.ID;\r
-    }\r
-}\r
+package org.simantics.district.network.ui;
+
+import java.util.Collections;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.district.network.ontology.DistrictNetworkResource;
+
+public class OpenDiagramFromConfigurationAdapter
+        extends org.simantics.modeling.ui.diagramEditor.OpenDiagramFromConfigurationAdapter {
+
+    @Override
+    public boolean canHandle(ReadGraph g, Resource r) throws DatabaseException {
+        Resource diagram = getDiagram(g, r, Collections.emptySet());
+        if (diagram == null)
+            return false;
+        DistrictNetworkResource DN = DistrictNetworkResource.getInstance(g);
+        return g.isInstanceOf(diagram, DN.Diagram) && !isLocked(g, diagram);
+    }
+
+    @Override
+    protected String getEditorId(ReadGraph g, Resource composite) throws DatabaseException {
+        return DistrictDiagramEditor.ID;
+    }
+}