From 28438fa467ae60dd63515be2df724c6ff9c299c9 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Tue, 29 Oct 2019 12:55:05 +0200 Subject: [PATCH] Moved RouteGraphConnectionClass to org.simantics.g2d.elementclass 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 --- .../diagram/adapter/RouteGraphConnectionClassFactory.java | 2 +- .../src/org/simantics/diagram/adapter/RouteGraphUtils.java | 2 +- .../src/org/simantics/diagram/participant/ConnectTool2.java | 2 +- .../simantics/diagram/participant/RouteGraphConnectTool.java | 2 +- .../simantics/g2d/elementclass}/RouteGraphConnectionClass.java | 3 ++- .../modeling/ui/diagram/style/ConnectionPointNameStyle.java | 2 +- .../modeling/ui/diagram/style/TypicalInheritanceStyle.java | 2 +- .../src/org/simantics/modeling/typicals/TypicalUtil.java | 1 - 8 files changed, 8 insertions(+), 8 deletions(-) rename bundles/{org.simantics.diagram/src/org/simantics/diagram/connection => org.simantics.g2d/src/org/simantics/g2d/elementclass}/RouteGraphConnectionClass.java (99%) diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphConnectionClassFactory.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphConnectionClassFactory.java index fd1603d39..a3d907482 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphConnectionClassFactory.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphConnectionClassFactory.java @@ -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; 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 17ccbe351..d6a59a0cb 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 @@ -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; diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectTool2.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectTool2.java index 38bdc706c..09adef2c8 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectTool2.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectTool2.java @@ -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; diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/RouteGraphConnectTool.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/RouteGraphConnectTool.java index e39c73d80..f4add6387 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/RouteGraphConnectTool.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/RouteGraphConnectTool.java @@ -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; diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/RouteGraphConnectionClass.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/RouteGraphConnectionClass.java 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 72b8232c1..a9015fcfb 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/RouteGraphConnectionClass.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/elementclass/RouteGraphConnectionClass.java @@ -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; diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/ConnectionPointNameStyle.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/ConnectionPointNameStyle.java index 57b0bd9b8..804b35ddc 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/ConnectionPointNameStyle.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/ConnectionPointNameStyle.java @@ -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; diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/TypicalInheritanceStyle.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/TypicalInheritanceStyle.java index f29167653..fbec1abec 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/TypicalInheritanceStyle.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/TypicalInheritanceStyle.java @@ -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; diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java index 8aef62c7b..01960ba1d 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/TypicalUtil.java @@ -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; -- 2.47.1