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

Diagram Editor: Removed reconnect default implementation

The default implementation for reconnecting is removed from
ConnectionCompositorBase and was moved to branch 390 for issue af3#390

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



Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent 91ad73c4
No related branches found
No related tags found
1 merge request!2114279
Pipeline #39223 passed
Pipeline: maven-releng

#39224

    ConnectionCompositorBase.java 4600e3d258169a6d84d8498e1071de69cd854856 YELLOW
    ConnectionCompositorBase.java 692689b535d7136acab2ab67a015f70809e64b6b GREEN
    ConnectorCompositorBase.java 0264edd4034da7187d1dbdf35a674c7067adf3cd GREEN
    ConnectorConnectionCompositorBase.java eed310a4710492b7ce3bc302c3db4e5c40f4d817 GREEN
    ConnectorHierarchicElementConnectionCompositorBase.java 7a8e4acf235d5eb006c859056cce89fbb0aac05d GREEN
    ......
    /*-------------------------------------------------------------------------+
    | Copyright 2013, 2023 fortiss GmbH |
    | Copyright 2013 fortiss GmbH |
    | |
    | Licensed under the Apache License, Version 2.0 (the "License"); |
    | you may not use this file except in compliance with the License. |
    ......@@ -70,38 +70,17 @@ public abstract class ConnectionCompositorBase<HE extends IHierarchicElement, S
    @Override
    public boolean reconnect(EObject connection, S source, T target,
    IConnectionCompositionContext context) {
    if(connection instanceof IConnection) {
    IConnection iConnection = (IConnection)connection;
    if(iConnection.getSource() == source) {
    if(target instanceof IConnector) {
    iConnection.setTarget((IConnector)target);
    return true;
    }
    } else {
    if(source instanceof IConnector) {
    iConnection.setSource((IConnector)source);
    return true;
    }
    }
    }
    // TODO (FH): https://af3.fortiss.org/issues/390
    // implement reconnect
    return false;
    }
    /** {@inheritDoc} */
    @SuppressWarnings("unchecked")
    @Override
    public boolean canReconnect(EObject connection, S source, T target,
    IConnectionCompositionContext context) {
    EObject parent = connection.eContainer();
    if(parent instanceof IHierarchicElement && connection instanceof IConnection) {
    boolean canConnect = canConnect(source, target, (HE)parent, context);
    return canConnect;
    }
    // TODO (FH): https://af3.fortiss.org/issues/390
    // implement reconnect
    return false;
    }
    ......
    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