From: Jussi Koskela Date: Mon, 27 Jan 2020 12:43:30 +0000 (+0200) Subject: Grant access to diagram APIs to enable web based diagram editing X-Git-Tag: v1.43.0~115 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=e353ca45b2ad3ce36ea48336feca56e86ad0b089;p=simantics%2Fplatform.git Grant access to diagram APIs to enable web based diagram editing gitlab #455 Change-Id: Iacbfc3eece3c49712cdfa240395d8b2df58c51b4 --- diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteLine.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteLine.java index 91a53d854..315b11c12 100644 --- a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteLine.java +++ b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteLine.java @@ -188,6 +188,10 @@ public class RouteLine implements RouteNode, Serializable { return terminal; } + public RouteLine getNextTransient() { + return nextTransient; + } + public boolean beginsWithTerminal() { RoutePoint begin = points.get(0); if(begin == terminal) diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java index 4ef9c6369..61305ade0 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java @@ -171,6 +171,10 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi } } + public GraphToDiagramSynchronizer getGraphToDiagramSynchronizer() { + return synchronizer; + } + protected CopyPasteStrategy getCopyPasteStrategy() { try { CopyPasteStrategy cpStrategy = Simantics.getSession().syncRequest(new PossibleAdapter(resource, CopyPasteStrategy.class)); diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/connection/RouteGraphNode.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/connection/RouteGraphNode.java index 048514f3a..b0e9147f6 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/connection/RouteGraphNode.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/connection/RouteGraphNode.java @@ -379,7 +379,7 @@ public class RouteGraphNode extends G2DNode implements ISelectionPainterNode, In * @param after * @return true if changes were fired */ - private boolean setRouteGraphAndFireChanges(RouteGraph before, RouteGraph after) { + public boolean setRouteGraphAndFireChanges(RouteGraph before, RouteGraph after) { RouteGraphDelta delta = new RouteGraphDelta(before, after); if (!delta.isEmpty()) { setRouteGraph(after);