Commit ee86435c authored by Alexander Diewald's avatar Alexander Diewald

Merge branch '3998' into 'master'


See merge request !324
parents b6f97e82 59c5ffbe
......@@ -3,6 +3,6 @@ fb4774202dcb216450b206c6bec17ae0786cf79c GR 166faf6111d527724d966a734b702650706a20ce GREEN 1b972b98efb662fc0e51b9abd0389ccabf314445 GREEN 17115be2194e0a0581bf350f0b0013c270381939 GREEN 3f2f5f557061557792f82c5d93441fde14ed9c44 GREEN 7e5869de82be61d684369ad0e573661080e048b6 GREEN 0e3dcd3e839e275dd7a23e83388d66ae0cd180df GREEN e6a47934d3b561fdde707ca1abeb56b27bb78ea2 GREEN
......@@ -105,17 +105,16 @@ public class ComponentConnectionCompositor
Component sourceComponent = sourcePort.getComponent();
Component targetComponent = targetPort.getComponent();
boolean isNeighbouringLevels = (parentComponent.equals(sourceComponent) ||
parentComponent.equals(targetComponent)) &&
boolean sourceIsParentComponentPort = parentComponent.equals(sourceComponent);
boolean targetIsParentComponentPort = parentComponent.equals(targetComponent);
// Inside the parent component, the ports of the parent component change their kind.
// Input ports become output ports and vice versa.
boolean sourceIsOutput = sourceIsParentComponentPort ? (sourcePort instanceof InputPort)
: (sourcePort instanceof OutputPort);
boolean targetIsInput = targetIsParentComponentPort ? (targetPort instanceof OutputPort)
: (targetPort instanceof InputPort);
// If the connection goes from one level to a higher one, both ports must be of same type
if(isNeighbouringLevels) {
return sourcePort.getClass() == targetPort.getClass();
// If on the same level, channels must be modeled from the output to the input port.
return sourcePort instanceof OutputPort && targetPort instanceof InputPort;
return sourceIsOutput && targetIsInput;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment