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

Hier. Plat.: Fix exclusiveness of Clusters

* If a cluster exists, only clusters and OffChipNetworks to connect them
  are allowed in a PlatformArchitecture.
* If any other element exists, clusters may not be added.

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

Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent c8fb1008
HierarchicPlatformArchitectureCompositor.java 93e171754ce52fcdf5792ead7e021927aa0d51d0 GREEN
HierarchicPlatformArchitectureCompositor.java b28db7b67c60f4323d575890730bffbb2674b7a1 YELLOW
HierarchicalCompositionRules.java e6c585b4bcca6ecd4fed7d8b7f3feef0b0a9d46f YELLOW
......@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.platform.hierarchic.compose.base.IPlatformHierarchicalCompositionRules;
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;
......@@ -63,7 +64,7 @@ public class HierarchicPlatformArchitectureCompositor extends PlatformArchitectu
boolean containsCluster = pickFirstInstanceOf(Cluster.class, paChildren) != null;
boolean containsNode = pickFirstInstanceOf(Node.class, paChildren) != null;
if((containsCluster && contained instanceof Node) ||
if((containsCluster && !(contained instanceof IClusterDomain)) ||
(containsNode && 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