Skip to content

Commit

Permalink
eclipse-capella#2062 fix proposal.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebausson-obeo committed Sep 6, 2023
1 parent d876113 commit 28d46ee
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3113,7 +3113,10 @@ private boolean isEObjectInHierarchyOfContainer(EObject eObject, NamedElement co
if (eObject == container) {
return true;
} else if (eObject instanceof AbstractFunction) {
if (((AbstractFunction) eObject).getComponentFunctionalAllocations().stream().anyMatch(cfa -> isEObjectInHierarchyOfContainer(cfa, container))) {
AbstractFunction eFunction = (AbstractFunction) eObject;
if (eFunction.getComponentFunctionalAllocations().stream().anyMatch(cfa -> isEObjectInHierarchyOfContainer(cfa, container))) {
return true;
} else if (container instanceof Component && eFunction.getAllocationBlocks().stream().anyMatch(e -> ComponentExt.getAllSubUsedComponents((Component) container).contains(eObject))) {
return true;
}
} else if (eObject instanceof ModelElement && eObject.eContainer() != null) {
Expand Down

0 comments on commit 28d46ee

Please sign in to comment.