]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Moved RouteGraphConnectionClass to org.simantics.g2d.elementclass 17/3417/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 29 Oct 2019 10:55:05 +0000 (12:55 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 29 Oct 2019 10:56:43 +0000 (10:56 +0000)
Previously the class was in bundle org.simantics.diagram, which depends
on database bundles and other things that RouteGraphConnectionClass does
not need or use.

In #396 the RouteGraphConnectionClass.KEY_RG_NODE would be needed in
org.simantics.g2d and therefore it makes sense to move it there.

gitlab #410

Change-Id: I491b8caeffa1a3c455af7815ce9372a9e5df722e

bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphConnectionClassFactory.java
bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java
bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectTool2.java
bundles/org.simantics.diagram/src/org/simantics/diagram/participant/RouteGraphConnectTool.java
bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/RouteGraphConnectionClass.java [moved from bundles/org.simantics.diagram/src/org/simantics/diagram/connection/RouteGraphConnectionClass.java with 99% similarity]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/ConnectionPointNameStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/TypicalInheritanceStyle.java
bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java

index fd1603d393682211fea293a25c8f92a17c744f33..a3d9074827f57b94f402448c071b6e4e1d07d478 100644 (file)
@@ -25,7 +25,6 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.procedure.AsyncProcedure;
 import org.simantics.diagram.adapter.RouteGraphUtils.BackendConnection;
 import org.simantics.diagram.connection.RouteGraph;
-import org.simantics.diagram.connection.RouteGraphConnectionClass;
 import org.simantics.diagram.connection.rendering.ConnectionStyle;
 import org.simantics.diagram.connection.rendering.StyledRouteGraphRenderer;
 import org.simantics.diagram.connection.rendering.arrows.ILineEndStyle;
@@ -43,6 +42,7 @@ import org.simantics.g2d.element.ElementHints;
 import org.simantics.g2d.element.IElement;
 import org.simantics.g2d.element.handler.TerminalTopology;
 import org.simantics.g2d.element.handler.impl.StaticObjectAdapter;
+import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
 import org.simantics.g2d.utils.TopologicalSelectionExpander;
 import org.simantics.layer0.Layer0;
 import org.simantics.modeling.ModelingResources;
index 17ccbe351e0941380bf0b2db94ef9a6a34fc1f96..d6a59a0cbc26a9284e0e656c2062c3b6fae4a2a1 100644 (file)
@@ -35,7 +35,6 @@ import org.simantics.db.common.utils.NameUtils;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.diagram.connection.ConnectionVisuals;
 import org.simantics.diagram.connection.RouteGraph;
-import org.simantics.diagram.connection.RouteGraphConnectionClass;
 import org.simantics.diagram.connection.RouteLine;
 import org.simantics.diagram.connection.RouteNode;
 import org.simantics.diagram.connection.RouteTerminal;
@@ -66,6 +65,7 @@ import org.simantics.g2d.element.ElementUtils;
 import org.simantics.g2d.element.IElement;
 import org.simantics.g2d.element.handler.EdgeVisuals.EdgeEnd;
 import org.simantics.g2d.element.handler.TerminalLayout;
+import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
 import org.simantics.g2d.elementclass.FlagClass.Type;
 import org.simantics.layer0.Layer0;
 import org.simantics.scenegraph.g2d.nodes.connection.RouteGraphChangeEvent;
index 38bdc706cb88e8b20a959b03d18bfac02ec17de9..09adef2c8088ebb9f6527627c228d4544244c660 100644 (file)
@@ -37,7 +37,6 @@ import org.simantics.db.common.request.WriteRequest;
 import org.simantics.db.common.utils.NameUtils;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.diagram.connection.RouteGraph;
-import org.simantics.diagram.connection.RouteGraphConnectionClass;
 import org.simantics.diagram.connection.RouteLine;
 import org.simantics.diagram.connection.RouteTerminal;
 import org.simantics.diagram.connection.delta.RouteGraphDelta;
@@ -79,6 +78,7 @@ import org.simantics.g2d.elementclass.BranchPoint;
 import org.simantics.g2d.elementclass.BranchPoint.Direction;
 import org.simantics.g2d.elementclass.FlagClass;
 import org.simantics.g2d.elementclass.FlagHandler;
+import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
 import org.simantics.g2d.participant.RenderingQualityInteractor;
 import org.simantics.g2d.participant.TransformUtil;
 import org.simantics.g2d.utils.geom.DirectionSet;
index e39c73d809120b760110c3476d44368f76e78336..f4add638742601fd3737cdee33fd44776e8a7f1b 100644 (file)
@@ -33,7 +33,6 @@ import org.simantics.db.WriteGraph;
 import org.simantics.db.common.request.WriteRequest;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.diagram.connection.RouteGraph;
-import org.simantics.diagram.connection.RouteGraphConnectionClass;
 import org.simantics.diagram.connection.RouteLine;
 import org.simantics.diagram.connection.RoutePoint;
 import org.simantics.diagram.connection.RouteTerminal;
@@ -77,6 +76,7 @@ import org.simantics.g2d.element.handler.impl.BranchPointTerminal;
 import org.simantics.g2d.element.impl.Element;
 import org.simantics.g2d.elementclass.FlagClass;
 import org.simantics.g2d.elementclass.FlagHandler;
+import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
 import org.simantics.g2d.participant.TransformUtil;
 import org.simantics.g2d.utils.geom.DirectionSet;
 import org.simantics.scenegraph.g2d.G2DParentNode;
similarity index 99%
rename from bundles/org.simantics.diagram/src/org/simantics/diagram/connection/RouteGraphConnectionClass.java
rename to bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/RouteGraphConnectionClass.java
index 72b8232c131040ed9951c7d6159fd09c52d95dc4..a9015fcfb95c9918f7ebaea362d677c1517abea8 100644 (file)
@@ -9,13 +9,14 @@
  * Contributors:
  *     VTT Technical Research Centre of Finland - initial API and implementation
  *******************************************************************************/
-package org.simantics.diagram.connection;
+package org.simantics.g2d.elementclass;
 
 import java.awt.Shape;
 import java.awt.geom.Rectangle2D;
 import java.util.Collection;
 import java.util.Collections;
 
+import org.simantics.diagram.connection.RouteGraph;
 import org.simantics.diagram.connection.rendering.IRouteGraphRenderer;
 import org.simantics.g2d.connection.ConnectionEntity;
 import org.simantics.g2d.connection.handler.ConnectionHandler;
index 57b0bd9b86af26ce112aff5101b4bff12be24133..804b35ddc75c2aa1772960ab5a43bb7e32917f5a 100644 (file)
@@ -27,12 +27,12 @@ import org.simantics.db.common.primitiverequest.OrderedSet;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.variable.Variable;
 import org.simantics.diagram.adapter.RouteGraphUtils;
-import org.simantics.diagram.connection.RouteGraphConnectionClass;
 import org.simantics.diagram.connection.RouteTerminal;
 import org.simantics.diagram.elements.TextNode;
 import org.simantics.diagram.profile.StyleBase;
 import org.simantics.diagram.synchronization.graph.BasicResources;
 import org.simantics.diagram.synchronization.graph.DiagramGraphUtil;
+import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
 import org.simantics.g2d.utils.Alignment;
 import org.simantics.layer0.Layer0;
 import org.simantics.modeling.ModelingResources;
index f29167653f180539fd6ba76858ff47b42961fb63..fbec1abec13d169d982df9251fe89aa2104a33c9 100644 (file)
@@ -18,7 +18,6 @@ import org.simantics.db.common.request.PossibleTypedParent;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.variable.Variable;
 import org.simantics.diagram.connection.RouteGraph;
-import org.simantics.diagram.connection.RouteGraphConnectionClass;
 import org.simantics.diagram.connection.RouteTerminal;
 import org.simantics.diagram.content.ConnectionUtil;
 import org.simantics.diagram.handler.Paster;
@@ -33,6 +32,7 @@ import org.simantics.g2d.element.ElementUtils;
 import org.simantics.g2d.element.IElement;
 import org.simantics.g2d.element.handler.SelectionOutline;
 import org.simantics.g2d.element.handler.impl.ConnectionSelectionOutline;
+import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
 import org.simantics.modeling.ModelingResources;
 import org.simantics.scenegraph.INode;
 import org.simantics.scenegraph.ParentNode;
index 8aef62c7b2dfe3e6e34d9a8629400fbf245ebedf..01960ba1ddfad60a11786a396642a6017f6a4577 100644 (file)
@@ -71,7 +71,6 @@ import org.simantics.scl.runtime.function.Function2;
 import org.simantics.scl.runtime.function.Function4;
 import org.simantics.structural.stubs.StructuralResource2;
 import org.simantics.structural2.utils.StructuralUtils;
-import org.simantics.ui.SimanticsUI;
 import org.simantics.utils.datastructures.Pair;
 import org.simantics.utils.ui.dialogs.ShowMessage;