summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-07-27 08:25:25 (EDT)
committerHenrik Rentz-Reichert2011-07-27 08:25:25 (EDT)
commit7d66927bddff25be08ce96bcb0ea264b8d53bebe (patch)
treed5ad54d83e0e0d87e4089e8497a0f212266facfd
parentcf093a190c905d05d44680bc4d85c85bbec221fb (diff)
downloadorg.eclipse.etrice-7d66927bddff25be08ce96bcb0ea264b8d53bebe.zip
org.eclipse.etrice-7d66927bddff25be08ce96bcb0ea264b8d53bebe.tar.gz
org.eclipse.etrice-7d66927bddff25be08ce96bcb0ea264b8d53bebe.tar.bz2
[core.room] added helpers for flat state machine
-rw-r--r--plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java
index e9ce3df..4eeeb79 100644
--- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java
+++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java
@@ -502,4 +502,19 @@ public class RoomHelpers {
}
return "";
}
+
+ public static boolean hasFlatStateMachine(ActorClass ac) {
+ if (ac.getStateMachine()==null)
+ return false;
+
+ if (!ac.getStateMachine().getTrPoints().isEmpty())
+ return false;
+
+ for (State st : ac.getStateMachine().getStates()) {
+ if (hasDirectSubStructure(st))
+ return false;
+ }
+
+ return true;
+ }
}