Commit e8b8f640 authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Hier. Plat.: Generalize Cluster Composition Rules

Issue-Ref: 3964
Issue-Url: https://af3-developer.fortiss.org/issues/3964

Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent b3fd0c1f
HierarchicPlatformArchitectureCompositor.java b28db7b67c60f4323d575890730bffbb2674b7a1 YELLOW
HierarchicPlatformArchitectureCompositor.java bbd67a9699b73eb051a815aa513f61621e3836d4 YELLOW
HierarchicalCompositionRules.java e6c585b4bcca6ecd4fed7d8b7f3feef0b0a9d46f YELLOW
......@@ -23,7 +23,6 @@ import org.fortiss.af3.platform.hierarchic.compose.base.IPlatformHierarchicalCom
import org.fortiss.af3.platform.hierarchic.compose.base.PlatformArchitectureCompositorBase;
import org.fortiss.af3.platform.hierarchic.model.cluster.Cluster;
import org.fortiss.af3.platform.hierarchic.model.cluster.IClusterDomain;
import org.fortiss.af3.platform.hierarchic.model.node.Node;
import org.fortiss.af3.platform.hierarchic.model.node.OffChipNetworkInterface;
import org.fortiss.af3.platform.hierarchic.model.node.OffChipNetworkPort;
import org.fortiss.af3.platform.model.IArchitectureDomain;
......@@ -62,10 +61,10 @@ public class HierarchicPlatformArchitectureCompositor extends PlatformArchitectu
// Clusters and Nodes are used at the top-level.
EList<IHierarchicElement> paChildren = container.getContainedElements();
boolean containsCluster = pickFirstInstanceOf(Cluster.class, paChildren) != null;
boolean containsNode = pickFirstInstanceOf(Node.class, paChildren) != null;
boolean containsNonCluster = !containsCluster && !paChildren.isEmpty();
if((containsCluster && !(contained instanceof IClusterDomain)) ||
(containsNode && contained instanceof Cluster)) {
(containsNonCluster && contained instanceof Cluster)) {
return false;
}
......
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