Skip to content
Snippets Groups Projects
Commit 52a950e2 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

applies the fix discussed in jour fixe

refs 2533
parent 2c514fd9
No related branches found
No related tags found
No related merge requests found
......@@ -29,15 +29,15 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 1BD22D874FBCDB5B4FDA7536828BA425
* @ConQAT.Rating YELLOW Hash: 7A3C53940D04EA617F6AB4B38AB87C9E
*/
public abstract class HierarchicElementConnectionCompositorBase<HE extends IHierarchicElement, S extends IHierarchicElement, T extends IHierarchicElement>
extends ConnectionCompositorBase<HE, S, T> {
/** Creates the application specific source {@link IConnector} model element. */
/** Creates the application specific entry {@link IConnector} model element. */
protected abstract IConnector createEntryConnector();
/** Creates the application specific target {@link IConnector} model element. */
/** Creates the application specific exit {@link IConnector} model element. */
protected abstract IConnector createExitConnector();
/** {@inheritDoc} */
......@@ -49,9 +49,15 @@ public abstract class HierarchicElementConnectionCompositorBase<HE extends IHier
/** {@inheritDoc} */
@Override
public boolean connect(S source, T target, HE parent, IConnectionCompositionContext context) {
IConnector sourceConnector = createEntryConnector();
// By default, exit connectors are source connectors.
// Explanation: exit connectors exit a hierarchically contained model element, i.e., it goes
// from the "inside" to the "outside" of the element. Most of the time (hence the face that
// it is the default behavior) a connection is drawn from "outside" the element, therefore
// the exit connector is considered as the source by default.
IConnector sourceConnector = createExitConnector();
avoidDuplicateConnectorName(source, sourceConnector);
IConnector targetConnector = createExitConnector();
// And conversely entry connectors are target connectors.
IConnector targetConnector = createEntryConnector();
avoidDuplicateConnectorName(target, targetConnector);
ITopLevelElement topElement =
IPersistencyService.getInstance().getTopLevelElementFor(parent);
......
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