Grant access to diagram APIs to enable web based diagram editing 18/3818/2
authorJussi Koskela <jussi.koskela@semantum.fi>
Mon, 27 Jan 2020 12:43:30 +0000 (14:43 +0200)
committerJussi Koskela <jussi.koskela@semantum.fi>
Mon, 27 Jan 2020 12:53:16 +0000 (14:53 +0200)
gitlab #455

Change-Id: Iacbfc3eece3c49712cdfa240395d8b2df58c51b4

bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteLine.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/connection/RouteGraphNode.java

index 91a53d85429fa0ac5a2cb0492deb53ea8573ac10..315b11c1290bceb0dc512ca58d8a9ebf3c0318b0 100644 (file)
@@ -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)
index 4ef9c6369c250bd873743ed929d99750b73bf37f..61305ade0c58e8bc8162ff5308e34b3e1dbf3ffe 100644 (file)
@@ -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<CopyPasteStrategy>(resource, CopyPasteStrategy.class));
index 048514f3a0eaae298b58bdf98149542a8a8fe13b..b0e9147f63134e5c2af5dee0c2436efbdbc016e3 100644 (file)
@@ -379,7 +379,7 @@ public class RouteGraphNode extends G2DNode implements ISelectionPainterNode, In
      * @param after
      * @return <code>true</code> 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);