Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-02-08 09:10:06 +0000
committerHenrik Rentz-Reichert2012-02-08 09:10:06 +0000
commitbc1ff1fc3201ab2be207b51f29a4dee56d4fa121 (patch)
tree12bb56d13567ae06d62c161fadec4bd5dfc84306 /plugins
parent7fbce23b3ab14bd1605939dee2a7a7efa1f48b02 (diff)
downloadorg.eclipse.etrice-bc1ff1fc3201ab2be207b51f29a4dee56d4fa121.tar.gz
org.eclipse.etrice-bc1ff1fc3201ab2be207b51f29a4dee56d4fa121.tar.xz
org.eclipse.etrice-bc1ff1fc3201ab2be207b51f29a4dee56d4fa121.zip
[generator] bug fix in isHandler of TransitionChainImpl
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java32
1 files changed, 15 insertions, 17 deletions
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java
index 7518d6881..700506fe6 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java
@@ -13,23 +13,22 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.etrice.core.room.State;
-import org.eclipse.etrice.core.room.TriggeredTransition;
-import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
import org.eclipse.etrice.core.naming.RoomNameProvider;
-
import org.eclipse.etrice.core.room.CPBranchTransition;
import org.eclipse.etrice.core.room.ChoicePoint;
import org.eclipse.etrice.core.room.ContinuationTransition;
import org.eclipse.etrice.core.room.EntryPoint;
import org.eclipse.etrice.core.room.ExitPoint;
import org.eclipse.etrice.core.room.NonInitialTransition;
+import org.eclipse.etrice.core.room.State;
import org.eclipse.etrice.core.room.StateGraphNode;
import org.eclipse.etrice.core.room.SubStateTrPointTerminal;
import org.eclipse.etrice.core.room.TrPoint;
import org.eclipse.etrice.core.room.TrPointTerminal;
import org.eclipse.etrice.core.room.Transition;
+import org.eclipse.etrice.core.room.TransitionChainStartTransition;
import org.eclipse.etrice.core.room.TransitionPoint;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
import org.eclipse.etrice.generator.etricegen.ITransitionChainVisitor;
import org.eclipse.etrice.generator.etricegen.TransitionChain;
@@ -174,19 +173,18 @@ public class TransitionChainImpl extends EObjectImpl implements TransitionChain
* @generated NOT
*/
public boolean isHandler() {
- if (!(getTransition() instanceof TriggeredTransition))
- return false;
-
- TriggeredTransition trans = (TriggeredTransition)getTransition();
- if (trans.getFrom() instanceof TrPointTerminal) {
- TrPoint tp = ((TrPointTerminal)trans.getFrom()).getTrPoint();
- if (tp instanceof TransitionPoint)
- return ((TransitionPoint)tp).isHandler();
- }
- else if (trans.getFrom() instanceof SubStateTrPointTerminal) {
- TrPoint tp = ((SubStateTrPointTerminal)trans.getFrom()).getTrPoint();
- if (tp instanceof TransitionPoint)
- return ((TransitionPoint)tp).isHandler();
+ if (getTransition() instanceof TransitionChainStartTransition) {
+ TransitionChainStartTransition trans = (TransitionChainStartTransition)getTransition();
+ if (trans.getFrom() instanceof TrPointTerminal) {
+ TrPoint tp = ((TrPointTerminal)trans.getFrom()).getTrPoint();
+ if (tp instanceof TransitionPoint)
+ return ((TransitionPoint)tp).isHandler();
+ }
+ else if (trans.getFrom() instanceof SubStateTrPointTerminal) {
+ TrPoint tp = ((SubStateTrPointTerminal)trans.getFrom()).getTrPoint();
+ if (tp instanceof TransitionPoint)
+ assert(false): "not allowed to connect TransitionPoint to exterior";
+ }
}
return false;
}

Back to the top