]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Grant access to diagram APIs to enable web based diagram editing 40/3840/1
authorJussi Koskela <jussi.koskela@semantum.fi>
Mon, 27 Jan 2020 12:43:30 +0000 (14:43 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Wed, 12 Feb 2020 10:44:59 +0000 (10:44 +0000)
gitlab #455

Change-Id: Iacbfc3eece3c49712cdfa240395d8b2df58c51b4
(cherry picked from commit e353ca45b2ad3ce36ea48336feca56e86ad0b089)

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 9e7d07721f1852d915840fd46280be2507b5226c..a6a4f22d2ff1b5ba0be0add013fe7d9c412ff29a 100644 (file)
@@ -196,6 +196,10 @@ public class RouteLine implements RouteNode, Serializable {
                this.terminal = 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);