Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeremie.tatibouet2016-10-21 13:31:28 +0000
committerjeremie.tatibouet2016-10-21 13:31:28 +0000
commitec2d2b2deba4fcbb548c2c8afd6240cc9fc43572 (patch)
treeb26b1516799f45b39b8b3261292b6bedbf68eb8e
parentc176df38933553cadadf16552cbce6143c476c47 (diff)
downloadorg.eclipse.papyrus-ec2d2b2deba4fcbb548c2c8afd6240cc9fc43572.tar.gz
org.eclipse.papyrus-ec2d2b2deba4fcbb548c2c8afd6240cc9fc43572.tar.xz
org.eclipse.papyrus-ec2d2b2deba4fcbb548c2c8afd6240cc9fc43572.zip
Complete code documentation and add missing headers.
Change-Id: I0dd105246f9079c8bd68e62e4cf048f2048ea986 Signed-off-by: jeremie.tatibouet <jeremie.tatibouet@cea.fr>
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Actions/IntermediateActions/SM_ReadSelfAction.java13
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/CommonBehavior/SM_ObjectActivation.java13
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_ExecutionFactory.java5
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_Locus.java2
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/CompletionEventOccurrence.java2
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateActivation.java5
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateMachineSemanticVisitor.java5
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/TerminatePseudostateActivation.java13
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StructuredClassifiers/SM_Object.java13
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Values/SM_OpaqueExpressionEvaluation.java6
10 files changed, 74 insertions, 3 deletions
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Actions/IntermediateActions/SM_ReadSelfAction.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Actions/IntermediateActions/SM_ReadSelfAction.java
index a46d3caf5e6..3d5982402a0 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Actions/IntermediateActions/SM_ReadSelfAction.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Actions/IntermediateActions/SM_ReadSelfAction.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Jeremie Tatibouet (CEA LIST)
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.moka.fuml.statemachines.Semantics.Actions.IntermediateActions;
import org.eclipse.papyrus.moka.composites.Semantics.Actions.IntermediateActions.CS_ReadSelfActionActivation;
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/CommonBehavior/SM_ObjectActivation.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/CommonBehavior/SM_ObjectActivation.java
index a573067d188..3abb9a7fb75 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/CommonBehavior/SM_ObjectActivation.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/CommonBehavior/SM_ObjectActivation.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Jeremie Tatibouet (CEA LIST)
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.moka.fuml.statemachines.Semantics.CommonBehavior;
import java.util.ArrayList;
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_ExecutionFactory.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_ExecutionFactory.java
index 7b5dfb548b1..6d46bec6256 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_ExecutionFactory.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_ExecutionFactory.java
@@ -47,8 +47,9 @@ import org.eclipse.uml2.uml.Transition;
public class SM_ExecutionFactory extends CS_ExecutionFactory {
public SemanticVisitor instantiateVisitor(Element element) {
- // Provide the semantic visitor corresponding to the syntactic
- // element provided as a parameter
+ // Return the semantic visitor corresponding to the given model element.
+ // If no visitor can be created for this model element then null is
+ // returned.
SemanticVisitor visitor = null ;
if(element instanceof StateMachine){
visitor = new StateMachineExecution();
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_Locus.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_Locus.java
index 8c382fb6029..a16bcb640af 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_Locus.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Loci/SM_Locus.java
@@ -22,6 +22,8 @@ import org.eclipse.uml2.uml.Class;
public class SM_Locus extends CS_Locus {
public Object_ instantiate(Class type) {
+ // Behaves like in fUML except that type instance are not
+ // Object_ but SM_Object.
Object_ object = null;
if (type instanceof Behavior) {
object = super.instantiate(type);
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/CompletionEventOccurrence.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/CompletionEventOccurrence.java
index 6da5e742f6c..1da0efc3486 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/CompletionEventOccurrence.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/CompletionEventOccurrence.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * CEA LIST - Initial API and implementation
+ * Jeremie Tatibouet (CEA LIST)
*
*****************************************************************************/
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateActivation.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateActivation.java
index dea6bdd2e7e..d112ac071e4 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateActivation.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateActivation.java
@@ -82,6 +82,7 @@ public class StateActivation extends VertexActivation {
}
public ConnectionPointActivation getConnectionPointActivation(Vertex vertex){
+ // Return the activation for the exit point or the entry point.
ConnectionPointActivation activation = null;
int i = 0;
while(i < this.connectionPointActivation.size() && activation==null){
@@ -117,6 +118,10 @@ public class StateActivation extends VertexActivation {
protected VertexActivation getVertexActivation(Vertex vertex){
+ // Return the activation corresponding to the vertex. Search
+ // is propagated through the owned region activation of the
+ // state activation if this latter is composite. If no activation
+ // is found null is returned.
VertexActivation vertexActivation = null;
State state = (State) this.getNode();
if(state.isComposite()){
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateMachineSemanticVisitor.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateMachineSemanticVisitor.java
index 4d349b44260..c87736ea112 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateMachineSemanticVisitor.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/StateMachineSemanticVisitor.java
@@ -115,6 +115,11 @@ public abstract class StateMachineSemanticVisitor extends SemanticVisitor {
}
protected Execution getExecutionFor(Behavior behavior, EventOccurrence eventOccurrence){
+ // Create an Execution for the specified behavior. In addition to the creation of this
+ // Execution, if the behavior execution is triggered by the dispatching of an event (i.e.
+ // a CallEvent or a SignalEvent) then an EventTriggeredExecution is provided. This
+ // execution wraps the original execution and ensures passing of event data to the
+ // wrapped execution.
Execution execution = null;
if(behavior != null){
Execution originalExecution = this.getExecutionLocus().factory.createExecution(behavior, this.getExecutionContext());
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/TerminatePseudostateActivation.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/TerminatePseudostateActivation.java
index b5e8e7f093b..62a2649af54 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/TerminatePseudostateActivation.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StateMachines/TerminatePseudostateActivation.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Jeremie Tatibouet (CEA LIST)
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.moka.fuml.statemachines.Semantics.StateMachines;
import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.Execution;
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StructuredClassifiers/SM_Object.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StructuredClassifiers/SM_Object.java
index 3d4c165d90a..cf7daf46eaf 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StructuredClassifiers/SM_Object.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/StructuredClassifiers/SM_Object.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Jeremie Tatibouet (CEA LIST)
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.moka.fuml.statemachines.Semantics.StructuredClassifiers;
import java.util.List;
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Values/SM_OpaqueExpressionEvaluation.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Values/SM_OpaqueExpressionEvaluation.java
index e5f4a4faa79..03ff405790d 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Values/SM_OpaqueExpressionEvaluation.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.statemachines/src/org/eclipse/papyrus/moka/fuml/statemachines/Semantics/Values/SM_OpaqueExpressionEvaluation.java
@@ -44,6 +44,12 @@ public class SM_OpaqueExpressionEvaluation extends CS_OpaqueExpressionEvaluation
}
public void initialize(EventOccurrence eventOccurrence){
+ // The event occurrence that is about or is currently dispatched can
+ // have data. In such situation if the behavior that is associated
+ // to the OpaqueExpression input conforms with the proposed signal
+ // event occurrence or the input parameters of the call event occurrence
+ // then event occurrence data are passed to this behavior and used
+ // to produce the guard verdict.
this.parameterValues.clear();
OpaqueExpression expression = (OpaqueExpression)this.specification;
if(expression.getBehavior().getOwnedParameters().size() > 0){

Back to the top