diff options
author | acuccuru | 2013-04-18 17:53:38 +0000 |
---|---|---|
committer | acuccuru | 2013-04-18 17:53:38 +0000 |
commit | 523ec13c5e4ba4a7f9650f67ed134232f5a74f8d (patch) | |
tree | 1168a1e050479883636766104e3d7dd131dd719d /sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus | |
parent | fffafe2a0a72647c48e2b54ecd5239ba69b508a7 (diff) | |
download | org.eclipse.papyrus-523ec13c5e4ba4a7f9650f67ed134232f5a74f8d.tar.gz org.eclipse.papyrus-523ec13c5e4ba4a7f9650f67ed134232f5a74f8d.tar.xz org.eclipse.papyrus-523ec13c5e4ba4a7f9650f67ed134232f5a74f8d.zip |
405389: [Moka] Papyrus shall provide a generic and extendible framework for execution and debugging of models
https://bugs.eclipse.org/bugs/show_bug.cgi?id=405389
405391: [Moka] Moka shall provide an implementation of the fUML Execution Model
https://bugs.eclipse.org/bugs/show_bug.cgi?id=405391
Adjustements for management of multi-threaded executions
Diffstat (limited to 'sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus')
2 files changed, 14 insertions, 4 deletions
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java index a4effaace84..853de76fd72 100644 --- a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java +++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/ActivityEdgeInstance.java @@ -53,6 +53,9 @@ public class ActivityEdgeInstance { // Keep the offered tokens until taken by the target. // (Note that any one edge should only be handling either all object // tokens or all control tokens.) + if (! FUMLExecutionEngine.eInstance.getControlDelegate().control(this)) { // Added for connection with the debug API + return ; + } Offer offer = new Offer(); for(int i = 0; i < tokens.size(); i++) { Token token = tokens.get(i); @@ -60,9 +63,6 @@ public class ActivityEdgeInstance { offer.offeredTokens.add(token); } this.offers.add(offer); - if (! FUMLExecutionEngine.eInstance.getControlDelegate().control(this)) { // Added for connection with the debug API - return ; - } this.target.receiveOffer(); } diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java index c5c3fdc8f51..bc87dfa5794 100644 --- a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java +++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Activities/IntermediateActivities/DecisionNodeActivation.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.papyrus.moka.fuml.debug.Debug; +import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.BooleanValue; import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value; import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution; import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue; @@ -135,7 +136,16 @@ public class DecisionNodeActivation extends ControlNodeActivation { this.decisionInputExecution.execute(); List<ParameterValue> outputParameterValues = this.decisionInputExecution.getOutputParameterValues(); decisionInputExecution.destroy(); - decisionInputResult = outputParameterValues.get(0).values.get(0); + if (outputParameterValues.get(0).values.size() == 0) { + // FIXME Added for connection with debug API + // When execution stops due to client request, outputParameterValues is empty + // Just puts true. Execution flow is supposed to stop "by itself" then + decisionInputResult = new BooleanValue() ; + ((BooleanValue)decisionInputResult).value = true ; + } + else { + decisionInputResult = outputParameterValues.get(0).values.get(0); + } } return decisionInputResult; } |