]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java
RouteGraph related methods are now public for code reuse
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / adapter / RouteGraphUtils.java
index a957377f81dea0c8deb6ec8e3df104af27f9de47..83a4f1b441e44f0011690d9db5c61c50b42e7d3e 100644 (file)
@@ -351,7 +351,7 @@ public class RouteGraphUtils {
 \r
     }\r
 \r
-    private static EdgeEnd toEdgeEnd(ReadGraph graph, Resource attachmentRelation, EdgeEnd defaultValue, DiagramResource DIA)\r
+    public static EdgeEnd toEdgeEnd(ReadGraph graph, Resource attachmentRelation, EdgeEnd defaultValue, DiagramResource DIA)\r
             throws DatabaseException {\r
         if (graph.isSubrelationOf(attachmentRelation, DIA.HasTailConnector))\r
             return EdgeEnd.Begin;\r
@@ -360,7 +360,7 @@ public class RouteGraphUtils {
         return defaultValue;\r
     }\r
 \r
-    private static Resource resolveFlagAttachment(ReadGraph graph, Resource connection, Resource flag, IModelingRules modelingRules, DiagramResource DIA) throws DatabaseException {\r
+    public static Resource resolveFlagAttachment(ReadGraph graph, Resource connection, Resource flag, IModelingRules modelingRules, DiagramResource DIA) throws DatabaseException {\r
         Type type = resolveFlagType(graph, connection, flag, modelingRules, DIA);\r
         if (type != null) {\r
             switch (type) {\r
@@ -381,7 +381,7 @@ public class RouteGraphUtils {
         return type;\r
     }\r
 \r
-    private static Statement findTerminalStatement(ReadGraph graph, Resource connection, Resource connector, StructuralResource2 STR)\r
+    public static Statement findTerminalStatement(ReadGraph graph, Resource connection, Resource connector, StructuralResource2 STR)\r
             throws DatabaseException {\r
         for (Statement stm : graph.getStatements(connector, STR.Connects)) {\r
             if (connection.equals(stm.getObject()))\r
@@ -391,7 +391,7 @@ public class RouteGraphUtils {
         return null;\r
     }\r
 \r
-    private static Resource getInverseAttachment(ReadGraph graph, Resource attachmentRelation, DiagramResource DIA)\r
+    public static Resource getInverseAttachment(ReadGraph graph, Resource attachmentRelation, DiagramResource DIA)\r
             throws DatabaseException {\r
         Resource inverse = graph.getPossibleObject(attachmentRelation, DIA.HasInverseAttachment);\r
         if (inverse != null)\r
@@ -497,7 +497,7 @@ public class RouteGraphUtils {
      * @return\r
      * @throws DatabaseException\r
      */\r
-    protected static StyledRouteGraphRenderer getRenderer(ReadGraph graph, ConnectionStyle style)\r
+    public static StyledRouteGraphRenderer getRenderer(ReadGraph graph, ConnectionStyle style)\r
             throws DatabaseException {\r
         return graph.syncRequest(new Renderer(style),\r
                 TransientCacheListener.<StyledRouteGraphRenderer>instance());\r
@@ -657,7 +657,7 @@ public class RouteGraphUtils {
     private static final double DEG_45 = Math.PI/4.;\r
     private static final double DEG_135 = Math.PI*3./4.;\r
 \r
-    static class BackendConnection {\r
+    public static class BackendConnection {\r
         public final Resource node;\r
         public final Resource terminal;\r
         public final EdgeEnd  end;\r