Skip to content
Snippets Groups Projects
Commit 787811d0 authored by Andreas Bayha's avatar Andreas Bayha
Browse files

Kernel: Enabled reconnect for connections in fx diagram editors


The respective controller uses the IConnectionCompositorService to
reconnect connections.

Issue-ref: 4279
Issue-URL: af3#4279

Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent 0083d70b
No related branches found
No related tags found
1 merge request!2114279
......@@ -10,7 +10,7 @@ LayoutedCurveLinkBendPointController.java d963a5e227de7bd8ba910c733df2ac7acf4fa1
LayoutedDiagramAnchorageController.java 89ee56e8e71a5fa635cfac81e84bbfe1d50e5776 GREEN
LayoutedEllipticResizableContentController.java 00037188773eb65866863ab89331bc981873957e GREEN
LayoutedLineLinkBendPointController.java 8022cc66c4d33d7bf357ceb4c9ca1694f4f2fda8 GREEN
LayoutedLinkBendPointController.java d3f22ffb43426da62e849074a9d5a64e4d70a7ad GREEN
LayoutedLinkBendPointController.java bc2b542f5e3321eb3f901b1e11f6ab3b3ddd0ff4 YELLOW
LayoutedRectangularResizableContentController.java 341f4a7da0d69360d7026af6d9b3d44dfd7d9bb1 GREEN
ModelElementFXEditorUIProviderBase.java 6bdd31d033228315e99c973b4986cdabc135ec9f GREEN
NamedCommentedLayoutModelChangeProvider.java 223e82c1b1cba842f6fae115182f5d0c6acb44b0 GREEN
......@@ -22,6 +22,7 @@ import static org.fortiss.tooling.base.utils.LayoutDataUtils.removeConnectionPoi
import java.util.List;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
import org.fortiss.tooling.base.model.layout.Point;
import org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewer;
......@@ -119,7 +120,17 @@ public abstract class LayoutedLinkBendPointController<T extends INamedCommentedE
@Override
protected void updateModelAfterLinkMove(ILinkMVCBundle linkBundle, IMVCBundle startBundle,
IMVCBundle endBundle) {
// ignored
EObject connectionObj = (EObject)linkBundle.getModel();
EObject sourceObj = (EObject)startBundle.getModel();
EObject targetObj = (EObject)endBundle.getModel();
if(IConnectionCompositorService.getInstance().canReconnect(connectionObj, sourceObj,
targetObj, null)) {
IConnectionCompositorService.getInstance().reconnect(connectionObj, sourceObj,
targetObj, null);
getViewer().updateFromModel();
}
}
/** Returns the list of bend-points. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment