X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fadapter%2FRouteGraphUtils.java;h=83a4f1b441e44f0011690d9db5c61c50b42e7d3e;hp=a957377f81dea0c8deb6ec8e3df104af27f9de47;hb=f992cbbaa65e3457d53ecf03180de98c684e091c;hpb=04007e0f8ce828baeb99272e2069930215117670 diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java index a957377f8..83a4f1b44 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java @@ -351,7 +351,7 @@ public class RouteGraphUtils { } - private static EdgeEnd toEdgeEnd(ReadGraph graph, Resource attachmentRelation, EdgeEnd defaultValue, DiagramResource DIA) + public static EdgeEnd toEdgeEnd(ReadGraph graph, Resource attachmentRelation, EdgeEnd defaultValue, DiagramResource DIA) throws DatabaseException { if (graph.isSubrelationOf(attachmentRelation, DIA.HasTailConnector)) return EdgeEnd.Begin; @@ -360,7 +360,7 @@ public class RouteGraphUtils { return defaultValue; } - private static Resource resolveFlagAttachment(ReadGraph graph, Resource connection, Resource flag, IModelingRules modelingRules, DiagramResource DIA) throws DatabaseException { + public static Resource resolveFlagAttachment(ReadGraph graph, Resource connection, Resource flag, IModelingRules modelingRules, DiagramResource DIA) throws DatabaseException { Type type = resolveFlagType(graph, connection, flag, modelingRules, DIA); if (type != null) { switch (type) { @@ -381,7 +381,7 @@ public class RouteGraphUtils { return type; } - private static Statement findTerminalStatement(ReadGraph graph, Resource connection, Resource connector, StructuralResource2 STR) + public static Statement findTerminalStatement(ReadGraph graph, Resource connection, Resource connector, StructuralResource2 STR) throws DatabaseException { for (Statement stm : graph.getStatements(connector, STR.Connects)) { if (connection.equals(stm.getObject())) @@ -391,7 +391,7 @@ public class RouteGraphUtils { return null; } - private static Resource getInverseAttachment(ReadGraph graph, Resource attachmentRelation, DiagramResource DIA) + public static Resource getInverseAttachment(ReadGraph graph, Resource attachmentRelation, DiagramResource DIA) throws DatabaseException { Resource inverse = graph.getPossibleObject(attachmentRelation, DIA.HasInverseAttachment); if (inverse != null) @@ -497,7 +497,7 @@ public class RouteGraphUtils { * @return * @throws DatabaseException */ - protected static StyledRouteGraphRenderer getRenderer(ReadGraph graph, ConnectionStyle style) + public static StyledRouteGraphRenderer getRenderer(ReadGraph graph, ConnectionStyle style) throws DatabaseException { return graph.syncRequest(new Renderer(style), TransientCacheListener.instance()); @@ -657,7 +657,7 @@ public class RouteGraphUtils { private static final double DEG_45 = Math.PI/4.; private static final double DEG_135 = Math.PI*3./4.; - static class BackendConnection { + public static class BackendConnection { public final Resource node; public final Resource terminal; public final EdgeEnd end;