Skip to content

Commit

Permalink
boiled down 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillipus committed Dec 11, 2024
1 parent a1590b1 commit 98c7ca9
Showing 1 changed file with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,24 +289,16 @@ public static boolean shouldBeHiddenConnection(IDiagramModelArchimateConnection
return isNestedConnectionTypeRelationship(connection.getArchimateRelationship());
}

// If the connection's target is a connection and is a hidden type
// and the target connection's source is the target connection's target's parent
// or the target connection's target is the target connection's source's parent
if(target instanceof IDiagramModelArchimateConnection targetConnection && isNestedConnectionTypeRelationship(targetConnection.getArchimateRelationship())
&& (targetConnection.getSource() == targetConnection.getTarget().eContainer()
|| targetConnection.getTarget() == targetConnection.getSource().eContainer())) {
return true;
// If the connection's source is a connection and is a hidden type
if(source instanceof IDiagramModelArchimateConnection dmc) {
return shouldBeHiddenConnection(dmc);
}

// If the connection's source is a connection and is a hidden type
// and the source connection's source is the source connection's target's parent
// or the source connection's target is the source connection's source's parent
if(source instanceof IDiagramModelArchimateConnection sourceConnection && isNestedConnectionTypeRelationship(sourceConnection.getArchimateRelationship())
&& (sourceConnection.getSource() == sourceConnection.getTarget().eContainer()
|| sourceConnection.getTarget() == sourceConnection.getSource().eContainer())) {
return true;
// If the connection's target is a connection and is a hidden type
if(target instanceof IDiagramModelArchimateConnection dmc) {
return shouldBeHiddenConnection(dmc);
}

return false;
}

Expand Down

0 comments on commit 98c7ca9

Please sign in to comment.