summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2013-04-17 09:03:33 (EDT)
committer Juergen Haug2013-04-17 09:03:33 (EDT)
commit006ea28d66048af228916d490619546c9ba244b0 (patch)
tree807fa2640e10ca11c6b6db02f598ef9244d1208d
parent955539f0d645d2f599d5be48071105796421e119 (diff)
downloadorg.eclipse.etrice-006ea28d66048af228916d490619546c9ba244b0.zip
org.eclipse.etrice-006ea28d66048af228916d490619546c9ba244b0.tar.gz
org.eclipse.etrice-006ea28d66048af228916d490619546c9ba244b0.tar.bz2
[abstractexec] correct marker for sub state reachabilityrefs/changes/72/11972/1
-rw-r--r--plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java
index a44085f..a542a3e 100644
--- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java
+++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityCheck.java
@@ -40,6 +40,7 @@ public class ReachabilityCheck {
Queue<StateGraphNode> queue;
public Set<StateGraphItem> visited;
+ private Set<State> visitedSubStates;
private ExpandedActorClass xpAct;
//private Set<StateGraphItem> exitUsed;
@@ -48,6 +49,7 @@ public class ReachabilityCheck {
queue = new LinkedList<StateGraphNode>();
xpAct = xpac;
visited = new HashSet<StateGraphItem>();
+ visitedSubStates = new HashSet<State>();
//exitUsed = new HashSet<StateGraphItem>();
}
@@ -55,6 +57,7 @@ public class ReachabilityCheck {
StateGraph graph = xpAct.getStateMachine();
addStartingPoints(graph, true);
doTraversal();
+ visited.addAll(visitedSubStates);
}
private void addStartingPoints(StateGraph graph, boolean add_initial) {
@@ -114,15 +117,9 @@ public class ReachabilityCheck {
}
} else {
if (node instanceof EntryPoint) {
- // if container has no initial transition then mark it visited
- boolean markVisited = true;
+ // don't set container visited. otherwise its initial transition could not be visited any more
State container = (State) node.eContainer().eContainer();
- StateGraph parentGraph = container.getSubgraph();
- for (Transition tr : parentGraph.getTransitions())
- if (tr instanceof InitialTransition)
- markVisited = false;
- if (markVisited)
- visited.add(container);
+ visitedSubStates.add(container);
}
for (Transition trans : xpAct.getOutgoingTransitions(node))
visit(trans);