Skip to content
Snippets Groups Projects

Resolve "Inherited components of a type can not be chosen as port targets"

Files
6
@@ -101,14 +101,18 @@ aspect Analysis {
syn boolean TokenComponent.needProxyToken() {
for (Component comp : meOwnedByOthers()) {
TokenComponent tokenComp = comp.asTokenComponent();
if (!tokenComp.getDependencySourceDefinitionList().isEmpty() ||
tokenComp.getTokenPortTargetList().stream()
.map(PortTarget::containingPortDefinition)
.anyMatch(PortDefinition::shouldNotResetValue)) {
if (tokenComp.directNeedProxyToken()) {
return true;
}
}
return false;
return directNeedProxyToken();
}
syn boolean TokenComponent.directNeedProxyToken() {
return !getDependencySourceDefinitionList().isEmpty() ||
getTokenPortTargetList().stream()
.map(PortTarget::containingPortDefinition)
.anyMatch(PortDefinition::shouldNotResetValue);
}
// --- effectiveUsedAt ---
Loading