Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo SBH2016-08-29 17:16:35 +0000
committerEd Willink2016-10-22 14:16:04 +0000
commit2ab6aed778254efe1115be3075ad80799c169e28 (patch)
treec6deb1188d273a8471bd442e7d767140274f02ea
parent9f986b0270e9ba260d6d4bc657c84a1a62df3231 (diff)
downloadorg.eclipse.qvtd-2ab6aed778254efe1115be3075ad80799c169e28.tar.gz
org.eclipse.qvtd-2ab6aed778254efe1115be3075ad80799c169e28.tar.xz
org.eclipse.qvtd-2ab6aed778254efe1115be3075ad80799c169e28.zip
[cs2as] - Supporting ambigous fallback mapping
- Minor improvements in generated minioclfull.ocl files
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/IteratorExp.java32
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLPackage.java69
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLTables.java62
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/Variable.java33
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/IteratorExpImpl.java122
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/MiniOCLPackageImpl.java22
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/VariableImpl.java80
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentPackage.java16
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentTables.java16
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/LookupEnvironment.java4
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/EnvironmentPackageImpl.java8
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/LookupEnvironmentImpl.java10
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/util/MiniOCLSingleResultLookupEnvironment.java4
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/util/MiniOCLUnqualifiedVariableLookupVisitor.java16
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.ecore6
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.genmodel4
-rw-r--r--doc/org.eclipse.qvtd.doc.miniocl/model/MiniOCL.genmodel8
-rw-r--r--doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.cs2as15
-rw-r--r--doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.ocl37
-rw-r--r--doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFullLookup.ocl20
20 files changed, 481 insertions, 103 deletions
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/IteratorExp.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/IteratorExp.java
index 326791dc9..9b7d1e8a2 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/IteratorExp.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/IteratorExp.java
@@ -8,10 +8,42 @@ package org.eclipse.qvtd.doc.miniocl;
* A representation of the model object '<em><b>Iterator Exp</b></em>'.
* <!-- end-user-doc -->
*
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.qvtd.doc.miniocl.IteratorExp#getIterator <em>Iterator</em>}</li>
+ * </ul>
*
* @see org.eclipse.qvtd.doc.miniocl.MiniOCLPackage#getIteratorExp()
* @model
* @generated
*/
public interface IteratorExp extends LoopExp {
+
+ /**
+ * Returns the value of the '<em><b>Iterator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Iterator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Iterator</em>' attribute.
+ * @see #setIterator(String)
+ * @see org.eclipse.qvtd.doc.miniocl.MiniOCLPackage#getIteratorExp_Iterator()
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvtd/doc/MiniOCL/1.0!IteratorExp!iterator'"
+ * @generated
+ */
+ String getIterator();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.qvtd.doc.miniocl.IteratorExp#getIterator <em>Iterator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Iterator</em>' attribute.
+ * @see #getIterator()
+ * @generated
+ */
+ void setIterator(String value);
} // IteratorExp
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLPackage.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLPackage.java
index 57263800a..dc9d9ea7f 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLPackage.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLPackage.java
@@ -1241,13 +1241,22 @@ public interface MiniOCLPackage extends EPackage {
int ITERATOR_EXP__OWNED_BODY = LOOP_EXP__OWNED_BODY;
/**
+ * The feature id for the '<em><b>Iterator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ITERATOR_EXP__ITERATOR = LOOP_EXP_FEATURE_COUNT + 0;
+
+ /**
* The number of structural features of the '<em>Iterator Exp</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ITERATOR_EXP_FEATURE_COUNT = LOOP_EXP_FEATURE_COUNT + 0;
+ int ITERATOR_EXP_FEATURE_COUNT = LOOP_EXP_FEATURE_COUNT + 1;
/**
* The number of operations of the '<em>Iterator Exp</em>' class.
@@ -1584,13 +1593,22 @@ public interface MiniOCLPackage extends EPackage {
int VARIABLE__TYPE = NAMED_ELEMENT_FEATURE_COUNT + 0;
/**
+ * The feature id for the '<em><b>Owned Init Exp</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VARIABLE__OWNED_INIT_EXP = NAMED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
* The number of structural features of the '<em>Variable</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int VARIABLE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 1;
+ int VARIABLE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2;
/**
* The number of operations of the '<em>Variable</em>' class.
@@ -1620,6 +1638,15 @@ public interface MiniOCLPackage extends EPackage {
int PARAMETER__TYPE = VARIABLE__TYPE;
/**
+ * The feature id for the '<em><b>Owned Init Exp</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAMETER__OWNED_INIT_EXP = VARIABLE__OWNED_INIT_EXP;
+
+ /**
* The number of structural features of the '<em>Parameter</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1911,6 +1938,17 @@ public interface MiniOCLPackage extends EPackage {
EClass getIteratorExp();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.qvtd.doc.miniocl.IteratorExp#getIterator <em>Iterator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Iterator</em>'.
+ * @see org.eclipse.qvtd.doc.miniocl.IteratorExp#getIterator()
+ * @see #getIteratorExp()
+ * @generated
+ */
+ EAttribute getIteratorExp_Iterator();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.qvtd.doc.miniocl.IterateExp <em>Iterate Exp</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2576,6 +2614,17 @@ public interface MiniOCLPackage extends EPackage {
EClass getVariable();
/**
+ * Returns the meta object for the containment reference '{@link org.eclipse.qvtd.doc.miniocl.Variable#getOwnedInitExp <em>Owned Init Exp</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Owned Init Exp</em>'.
+ * @see org.eclipse.qvtd.doc.miniocl.Variable#getOwnedInitExp()
+ * @see #getVariable()
+ * @generated
+ */
+ EReference getVariable_OwnedInitExp();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.qvtd.doc.miniocl.VariableExp <em>Variable Exp</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2723,6 +2772,14 @@ public interface MiniOCLPackage extends EPackage {
EClass ITERATOR_EXP = eINSTANCE.getIteratorExp();
/**
+ * The meta object literal for the '<em><b>Iterator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ITERATOR_EXP__ITERATOR = eINSTANCE.getIteratorExp_Iterator();
+
+ /**
* The meta object literal for the '{@link org.eclipse.qvtd.doc.miniocl.impl.IterateExpImpl <em>Iterate Exp</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -3283,6 +3340,14 @@ public interface MiniOCLPackage extends EPackage {
EClass VARIABLE = eINSTANCE.getVariable();
/**
+ * The meta object literal for the '<em><b>Owned Init Exp</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference VARIABLE__OWNED_INIT_EXP = eINSTANCE.getVariable_OwnedInitExp();
+
+ /**
* The meta object literal for the '{@link org.eclipse.qvtd.doc.miniocl.impl.VariableExpImpl <em>Variable Exp</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLTables.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLTables.java
index ef4cab65d..663e9b0a4 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLTables.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/MiniOCLTables.java
@@ -604,6 +604,8 @@ public class MiniOCLTables
public static final @NonNull ExecutorProperty _IterateExp__ownedResult = new EcoreExecutorProperty(MiniOCLPackage.Literals.ITERATE_EXP__OWNED_RESULT, Types._IterateExp, 0);
+ public static final @NonNull ExecutorProperty _IteratorExp__iterator = new EcoreExecutorProperty(MiniOCLPackage.Literals.ITERATOR_EXP__ITERATOR, Types._IteratorExp, 0);
+
public static final @NonNull ExecutorProperty _LetExp__ownedIn = new EcoreExecutorProperty(MiniOCLPackage.Literals.LET_EXP__OWNED_IN, Types._LetExp, 0);
public static final @NonNull ExecutorProperty _LetExp__ownedVariable = new EcoreExecutorProperty(MiniOCLPackage.Literals.LET_EXP__OWNED_VARIABLE, Types._LetExp, 1);
@@ -620,6 +622,7 @@ public class MiniOCLTables
public static final @NonNull ExecutorProperty _OCLExpression__LetExp__ownedIn = new ExecutorPropertyWithImplementation("LetExp", Types._OCLExpression, 5, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.LET_EXP__OWNED_IN));
public static final @NonNull ExecutorProperty _OCLExpression__LoopExp__ownedBody = new ExecutorPropertyWithImplementation("LoopExp", Types._OCLExpression, 6, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.LOOP_EXP__OWNED_BODY));
public static final @NonNull ExecutorProperty _OCLExpression__OperationCallExp__ownedArguments = new ExecutorPropertyWithImplementation("OperationCallExp", Types._OCLExpression, 7, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.OPERATION_CALL_EXP__OWNED_ARGUMENTS));
+ public static final @NonNull ExecutorProperty _OCLExpression__Variable__ownedInitExp = new ExecutorPropertyWithImplementation("Variable", Types._OCLExpression, 8, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.VARIABLE__OWNED_INIT_EXP));
public static final @NonNull ExecutorProperty _OpaqueExpression__language = new EcoreExecutorProperty(MiniOCLPackage.Literals.OPAQUE_EXPRESSION__LANGUAGE, Types._OpaqueExpression, 0);
@@ -651,11 +654,12 @@ public class MiniOCLTables
public static final @NonNull ExecutorProperty _TypedElement__type = new EcoreExecutorProperty(MiniOCLPackage.Literals.TYPED_ELEMENT__TYPE, Types._TypedElement, 0);
- public static final @NonNull ExecutorProperty _Variable__ExpressionInOCL__ownedSelfVar = new ExecutorPropertyWithImplementation("ExpressionInOCL", Types._Variable, 0, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.EXPRESSION_IN_OCL__OWNED_SELF_VAR));
- public static final @NonNull ExecutorProperty _Variable__IterateExp__ownedResult = new ExecutorPropertyWithImplementation("IterateExp", Types._Variable, 1, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.ITERATE_EXP__OWNED_RESULT));
- public static final @NonNull ExecutorProperty _Variable__LetExp__ownedVariable = new ExecutorPropertyWithImplementation("LetExp", Types._Variable, 2, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.LET_EXP__OWNED_VARIABLE));
- public static final @NonNull ExecutorProperty _Variable__LoopExp__ownedIterator = new ExecutorPropertyWithImplementation("LoopExp", Types._Variable, 3, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.LOOP_EXP__OWNED_ITERATOR));
- public static final @NonNull ExecutorProperty _Variable__VariableExp__referredVariable = new ExecutorPropertyWithImplementation("VariableExp", Types._Variable, 4, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.VARIABLE_EXP__REFERRED_VARIABLE));
+ public static final @NonNull ExecutorProperty _Variable__ownedInitExp = new EcoreExecutorProperty(MiniOCLPackage.Literals.VARIABLE__OWNED_INIT_EXP, Types._Variable, 0);
+ public static final @NonNull ExecutorProperty _Variable__ExpressionInOCL__ownedSelfVar = new ExecutorPropertyWithImplementation("ExpressionInOCL", Types._Variable, 1, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.EXPRESSION_IN_OCL__OWNED_SELF_VAR));
+ public static final @NonNull ExecutorProperty _Variable__IterateExp__ownedResult = new ExecutorPropertyWithImplementation("IterateExp", Types._Variable, 2, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.ITERATE_EXP__OWNED_RESULT));
+ public static final @NonNull ExecutorProperty _Variable__LetExp__ownedVariable = new ExecutorPropertyWithImplementation("LetExp", Types._Variable, 3, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.LET_EXP__OWNED_VARIABLE));
+ public static final @NonNull ExecutorProperty _Variable__LoopExp__ownedIterator = new ExecutorPropertyWithImplementation("LoopExp", Types._Variable, 4, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.LOOP_EXP__OWNED_ITERATOR));
+ public static final @NonNull ExecutorProperty _Variable__VariableExp__referredVariable = new ExecutorPropertyWithImplementation("VariableExp", Types._Variable, 5, new EcoreLibraryOppositeProperty(MiniOCLPackage.Literals.VARIABLE_EXP__REFERRED_VARIABLE));
public static final @NonNull ExecutorProperty _VariableExp__referredVariable = new EcoreExecutorProperty(MiniOCLPackage.Literals.VARIABLE_EXP__REFERRED_VARIABLE, Types._VariableExp, 0);
static {
@@ -2629,7 +2633,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _CallExp = {
@@ -2642,7 +2647,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _Class = {
@@ -2675,7 +2681,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _CollectionLiteralPart = {
@@ -2729,7 +2736,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _IterateExp = {
@@ -2745,10 +2753,12 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _IteratorExp = {
+ MiniOCLTables.Properties._IteratorExp__iterator,
MiniOCLTables.Properties._LoopExp__ownedBody,
MiniOCLTables.Properties._LoopExp__ownedIterator,
MiniOCLTables.Properties._CallExp__ownedSource,
@@ -2760,7 +2770,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _LetExp = {
@@ -2774,7 +2785,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _LiteralExp = {
@@ -2786,7 +2798,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _LoopExp = {
@@ -2801,7 +2814,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _NamedElement = {
@@ -2821,7 +2835,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _OCLExpression = {
@@ -2833,7 +2848,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _OpaqueExpression = {
@@ -2862,7 +2878,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _Package = {
@@ -2875,6 +2892,7 @@ public class MiniOCLTables
private static final @NonNull ExecutorProperty @NonNull [] _Parameter = {
MiniOCLTables.Properties._NamedElement__name,
+ MiniOCLTables.Properties._Variable__ownedInitExp,
MiniOCLTables.Properties._TypedElement__type,
MiniOCLTables.Properties._Variable__ExpressionInOCL__ownedSelfVar,
MiniOCLTables.Properties._Variable__IterateExp__ownedResult,
@@ -2893,7 +2911,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _Property = {
@@ -2916,7 +2935,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _Root = {
@@ -2931,6 +2951,7 @@ public class MiniOCLTables
private static final @NonNull ExecutorProperty @NonNull [] _Variable = {
MiniOCLTables.Properties._NamedElement__name,
+ MiniOCLTables.Properties._Variable__ownedInitExp,
MiniOCLTables.Properties._TypedElement__type,
MiniOCLTables.Properties._Variable__ExpressionInOCL__ownedSelfVar,
MiniOCLTables.Properties._Variable__IterateExp__ownedResult,
@@ -2949,7 +2970,8 @@ public class MiniOCLTables
MiniOCLTables.Properties._OCLExpression__ExpressionInOCL__ownedBody,
MiniOCLTables.Properties._OCLExpression__LetExp__ownedIn,
MiniOCLTables.Properties._OCLExpression__LoopExp__ownedBody,
- MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments
+ MiniOCLTables.Properties._OCLExpression__OperationCallExp__ownedArguments,
+ MiniOCLTables.Properties._OCLExpression__Variable__ownedInitExp
};
private static final @NonNull ExecutorProperty @NonNull [] _Visitable = {};
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/Variable.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/Variable.java
index 37903afca..6cc9397bb 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/Variable.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/Variable.java
@@ -8,10 +8,43 @@ package org.eclipse.qvtd.doc.miniocl;
* A representation of the model object '<em><b>Variable</b></em>'.
* <!-- end-user-doc -->
*
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.qvtd.doc.miniocl.Variable#getOwnedInitExp <em>Owned Init Exp</em>}</li>
+ * </ul>
*
* @see org.eclipse.qvtd.doc.miniocl.MiniOCLPackage#getVariable()
* @model
* @generated
*/
public interface Variable extends NamedElement, TypedElement {
+
+ /**
+ * Returns the value of the '<em><b>Owned Init Exp</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Owned Init Exp</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Owned Init Exp</em>' containment reference.
+ * @see #setOwnedInitExp(OCLExpression)
+ * @see org.eclipse.qvtd.doc.miniocl.MiniOCLPackage#getVariable_OwnedInitExp()
+ * @model containment="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvtd/doc/MiniOCL/1.0!Variable!ownedInitExp'"
+ * @generated
+ */
+ OCLExpression getOwnedInitExp();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.qvtd.doc.miniocl.Variable#getOwnedInitExp <em>Owned Init Exp</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Owned Init Exp</em>' containment reference.
+ * @see #getOwnedInitExp()
+ * @generated
+ */
+ void setOwnedInitExp(OCLExpression value);
} // Variable
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/IteratorExpImpl.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/IteratorExpImpl.java
index 98bb61420..190aa45f6 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/IteratorExpImpl.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/IteratorExpImpl.java
@@ -2,8 +2,10 @@
*/
package org.eclipse.qvtd.doc.miniocl.impl;
+import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.qvtd.doc.miniocl.IteratorExp;
@@ -15,11 +17,36 @@ import org.eclipse.qvtd.doc.miniocl.util.Visitor;
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Iterator Exp</b></em>'.
* <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.qvtd.doc.miniocl.impl.IteratorExpImpl#getIterator <em>Iterator</em>}</li>
+ * </ul>
*
* @generated
*/
public class IteratorExpImpl extends LoopExpImpl implements IteratorExp {
/**
+ * The default value of the '{@link #getIterator() <em>Iterator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIterator()
+ * @generated
+ * @ordered
+ */
+ protected static final String ITERATOR_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getIterator() <em>Iterator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIterator()
+ * @generated
+ * @ordered
+ */
+ protected String iterator = ITERATOR_EDEFAULT;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -39,6 +66,101 @@ public class IteratorExpImpl extends LoopExpImpl implements IteratorExp {
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getIterator() {
+ return iterator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIterator(String newIterator) {
+ String oldIterator = iterator;
+ iterator = newIterator;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MiniOCLPackage.ITERATOR_EXP__ITERATOR, oldIterator, iterator));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case MiniOCLPackage.ITERATOR_EXP__ITERATOR:
+ return getIterator();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case MiniOCLPackage.ITERATOR_EXP__ITERATOR:
+ setIterator((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case MiniOCLPackage.ITERATOR_EXP__ITERATOR:
+ setIterator(ITERATOR_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MiniOCLPackage.ITERATOR_EXP__ITERATOR:
+ return ITERATOR_EDEFAULT == null ? iterator != null : !ITERATOR_EDEFAULT.equals(iterator);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (iterator: ");
+ result.append(iterator);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
* {@inheritDoc}
* @generated
*/
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/MiniOCLPackageImpl.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/MiniOCLPackageImpl.java
index af5c4d2bf..02d5b6654 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/MiniOCLPackageImpl.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/MiniOCLPackageImpl.java
@@ -463,6 +463,15 @@ public class MiniOCLPackageImpl extends EPackageImpl implements MiniOCLPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getIteratorExp_Iterator() {
+ return (EAttribute)iteratorExpEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getIterateExp() {
return iterateExpEClass;
}
@@ -1030,6 +1039,15 @@ public class MiniOCLPackageImpl extends EPackageImpl implements MiniOCLPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getVariable_OwnedInitExp() {
+ return (EReference)variableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getVariableExp() {
return variableExpEClass;
}
@@ -1124,6 +1142,7 @@ public class MiniOCLPackageImpl extends EPackageImpl implements MiniOCLPackage {
createEAttribute(integerLiteralExpEClass, INTEGER_LITERAL_EXP__INTEGER_SYMBOL);
iteratorExpEClass = createEClass(ITERATOR_EXP);
+ createEAttribute(iteratorExpEClass, ITERATOR_EXP__ITERATOR);
iterateExpEClass = createEClass(ITERATE_EXP);
createEReference(iterateExpEClass, ITERATE_EXP__OWNED_RESULT);
@@ -1181,6 +1200,7 @@ public class MiniOCLPackageImpl extends EPackageImpl implements MiniOCLPackage {
createEReference(rootEClass, ROOT__OWNED_PACKAGES);
variableEClass = createEClass(VARIABLE);
+ createEReference(variableEClass, VARIABLE__OWNED_INIT_EXP);
variableExpEClass = createEClass(VARIABLE_EXP);
createEReference(variableExpEClass, VARIABLE_EXP__REFERRED_VARIABLE);
@@ -1304,6 +1324,7 @@ public class MiniOCLPackageImpl extends EPackageImpl implements MiniOCLPackage {
initEAttribute(getIntegerLiteralExp_IntegerSymbol(), ecorePackage.getEInt(), "integerSymbol", null, 0, 1, IntegerLiteralExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(iteratorExpEClass, IteratorExp.class, "IteratorExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getIteratorExp_Iterator(), ecorePackage.getEString(), "iterator", null, 0, 1, IteratorExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(iterateExpEClass, IterateExp.class, "IterateExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getIterateExp_OwnedResult(), this.getVariable(), null, "ownedResult", null, 1, 1, IterateExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1361,6 +1382,7 @@ public class MiniOCLPackageImpl extends EPackageImpl implements MiniOCLPackage {
initEReference(getRoot_OwnedPackages(), this.getPackage(), null, "ownedPackages", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(variableEClass, Variable.class, "Variable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getVariable_OwnedInitExp(), this.getOCLExpression(), null, "ownedInitExp", null, 0, 1, Variable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(variableExpEClass, VariableExp.class, "VariableExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getVariableExp_ReferredVariable(), this.getVariable(), null, "referredVariable", null, 1, 1, VariableExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/VariableImpl.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/VariableImpl.java
index e7733591c..9a7dd074b 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/VariableImpl.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/impl/VariableImpl.java
@@ -3,11 +3,13 @@
package org.eclipse.qvtd.doc.miniocl.impl;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.qvtd.doc.miniocl.MiniOCLPackage;
+import org.eclipse.qvtd.doc.miniocl.OCLExpression;
import org.eclipse.qvtd.doc.miniocl.TypedElement;
import org.eclipse.qvtd.doc.miniocl.Variable;
import org.eclipse.qvtd.doc.miniocl.util.Visitor;
@@ -21,6 +23,7 @@ import org.eclipse.qvtd.doc.miniocl.util.Visitor;
* </p>
* <ul>
* <li>{@link org.eclipse.qvtd.doc.miniocl.impl.VariableImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.qvtd.doc.miniocl.impl.VariableImpl#getOwnedInitExp <em>Owned Init Exp</em>}</li>
* </ul>
*
* @generated
@@ -37,6 +40,16 @@ public class VariableImpl extends NamedElementImpl implements Variable {
protected org.eclipse.qvtd.doc.miniocl.Class type;
/**
+ * The cached value of the '{@link #getOwnedInitExp() <em>Owned Init Exp</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOwnedInitExp()
+ * @generated
+ * @ordered
+ */
+ protected OCLExpression ownedInitExp;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -98,12 +111,71 @@ public class VariableImpl extends NamedElementImpl implements Variable {
* <!-- end-user-doc -->
* @generated
*/
+ public OCLExpression getOwnedInitExp() {
+ return ownedInitExp;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOwnedInitExp(OCLExpression newOwnedInitExp, NotificationChain msgs) {
+ OCLExpression oldOwnedInitExp = ownedInitExp;
+ ownedInitExp = newOwnedInitExp;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, MiniOCLPackage.VARIABLE__OWNED_INIT_EXP, oldOwnedInitExp, newOwnedInitExp);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOwnedInitExp(OCLExpression newOwnedInitExp) {
+ if (newOwnedInitExp != ownedInitExp) {
+ NotificationChain msgs = null;
+ if (ownedInitExp != null)
+ msgs = ((InternalEObject)ownedInitExp).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MiniOCLPackage.VARIABLE__OWNED_INIT_EXP, null, msgs);
+ if (newOwnedInitExp != null)
+ msgs = ((InternalEObject)newOwnedInitExp).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - MiniOCLPackage.VARIABLE__OWNED_INIT_EXP, null, msgs);
+ msgs = basicSetOwnedInitExp(newOwnedInitExp, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MiniOCLPackage.VARIABLE__OWNED_INIT_EXP, newOwnedInitExp, newOwnedInitExp));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case MiniOCLPackage.VARIABLE__OWNED_INIT_EXP:
+ return basicSetOwnedInitExp(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MiniOCLPackage.VARIABLE__TYPE:
if (resolve) return getType();
return basicGetType();
+ case MiniOCLPackage.VARIABLE__OWNED_INIT_EXP:
+ return getOwnedInitExp();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -119,6 +191,9 @@ public class VariableImpl extends NamedElementImpl implements Variable {
case MiniOCLPackage.VARIABLE__TYPE:
setType((org.eclipse.qvtd.doc.miniocl.Class)newValue);
return;
+ case MiniOCLPackage.VARIABLE__OWNED_INIT_EXP:
+ setOwnedInitExp((OCLExpression)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -134,6 +209,9 @@ public class VariableImpl extends NamedElementImpl implements Variable {
case MiniOCLPackage.VARIABLE__TYPE:
setType((org.eclipse.qvtd.doc.miniocl.Class)null);
return;
+ case MiniOCLPackage.VARIABLE__OWNED_INIT_EXP:
+ setOwnedInitExp((OCLExpression)null);
+ return;
}
super.eUnset(featureID);
}
@@ -148,6 +226,8 @@ public class VariableImpl extends NamedElementImpl implements Variable {
switch (featureID) {
case MiniOCLPackage.VARIABLE__TYPE:
return type != null;
+ case MiniOCLPackage.VARIABLE__OWNED_INIT_EXP:
+ return ownedInitExp != null;
}
return super.eIsSet(featureID);
}
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentPackage.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentPackage.java
index 5f1efa042..bf6c4a884 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentPackage.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentPackage.java
@@ -168,13 +168,13 @@ public interface EnvironmentPackage extends EPackage {
int LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION = ENV4_CG_OPERATION_COUNT + 0;
/**
- * The operation id for the '<em>Add Element</em>' operation.
+ * The operation id for the '<em>Add Elements</em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int LOOKUP_ENVIRONMENT___ADD_ELEMENT__NAMEDELEMENT = ENV4_CG_OPERATION_COUNT + 1;
+ int LOOKUP_ENVIRONMENT___ADD_ELEMENTS__NAMEDELEMENT = ENV4_CG_OPERATION_COUNT + 1;
/**
* The number of operations of the '<em>Lookup Environment</em>' class.
@@ -257,14 +257,14 @@ public interface EnvironmentPackage extends EPackage {
EOperation getLookupEnvironment__AddElements__Collection();
/**
- * Returns the meta object for the '{@link org.eclipse.qvtd.doc.miniocl.lookup.LookupEnvironment#addElement(org.eclipse.qvtd.doc.miniocl.NamedElement) <em>Add Element</em>}' operation.
+ * Returns the meta object for the '{@link org.eclipse.qvtd.doc.miniocl.lookup.LookupEnvironment#addElements(org.eclipse.qvtd.doc.miniocl.NamedElement) <em>Add Elements</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the '<em>Add Element</em>' operation.
- * @see org.eclipse.qvtd.doc.miniocl.lookup.LookupEnvironment#addElement(org.eclipse.qvtd.doc.miniocl.NamedElement)
+ * @return the meta object for the '<em>Add Elements</em>' operation.
+ * @see org.eclipse.qvtd.doc.miniocl.lookup.LookupEnvironment#addElements(org.eclipse.qvtd.doc.miniocl.NamedElement)
* @generated
*/
- EOperation getLookupEnvironment__AddElement__NamedElement();
+ EOperation getLookupEnvironment__AddElements__NamedElement();
/**
* Returns the meta object for class '{@link org.eclipse.qvtd.doc.miniocl.lookup.Env4CG <em>Env4 CG</em>}'.
@@ -365,12 +365,12 @@ public interface EnvironmentPackage extends EPackage {
EOperation LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION = eINSTANCE.getLookupEnvironment__AddElements__Collection();
/**
- * The meta object literal for the '<em><b>Add Element</b></em>' operation.
+ * The meta object literal for the '<em><b>Add Elements</b></em>' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EOperation LOOKUP_ENVIRONMENT___ADD_ELEMENT__NAMEDELEMENT = eINSTANCE.getLookupEnvironment__AddElement__NamedElement();
+ EOperation LOOKUP_ENVIRONMENT___ADD_ELEMENTS__NAMEDELEMENT = eINSTANCE.getLookupEnvironment__AddElements__NamedElement();
/**
* The meta object literal for the '{@link org.eclipse.qvtd.doc.miniocl.lookup.Env4CG <em>Env4 CG</em>}' class.
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentTables.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentTables.java
index 40b461bee..de61d2cc3 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentTables.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/EnvironmentTables.java
@@ -78,7 +78,7 @@ public class EnvironmentTables
Init.initStart();
EnvironmentTables.init();
}
- public static final @NonNull ExecutorTypeParameter __LookupEnvironment__addElements_NE = new ExecutorTypeParameter(TypeId.T_1, "NE");
+ public static final @NonNull ExecutorTypeParameter __LookupEnvironment__0_addElements_NE = new ExecutorTypeParameter(TypeId.T_1, "NE");
static {
Init.initEnd();
@@ -164,7 +164,7 @@ public class EnvironmentTables
Fragments.init();
}
- public static final @NonNull ParameterTypes _Collection__LookupEnvironment_addElements_NE__ = TypeUtil.createParameterTypes(new ExecutorSpecializedType("Collection", EnvironmentTables.TypeParameters.__LookupEnvironment__addElements_NE));
+ public static final @NonNull ParameterTypes _Collection__LookupEnvironment_0_addElements_NE__ = TypeUtil.createParameterTypes(new ExecutorSpecializedType("Collection", EnvironmentTables.TypeParameters.__LookupEnvironment__0_addElements_NE));
public static final @NonNull ParameterTypes _NamedElement = TypeUtil.createParameterTypes(MiniOCLTables.Types._NamedElement);
static {
@@ -191,10 +191,10 @@ public class EnvironmentTables
public static final @NonNull ExecutorOperation _Env4CG__hasFinalResult = new ExecutorOperation("hasFinalResult", TypeUtil.EMPTY_PARAMETER_TYPES, Types._Env4CG,
1, TemplateParameters.EMPTY_LIST, null);
- public static final @NonNull ExecutorOperation _LookupEnvironment__addElement = new ExecutorOperation("addElement", Parameters._NamedElement, Types._LookupEnvironment,
- 0, TemplateParameters.EMPTY_LIST, null);
- public static final @NonNull ExecutorOperation _LookupEnvironment__addElements = new ExecutorOperation("addElements", Parameters._Collection__LookupEnvironment_addElements_NE__, Types._LookupEnvironment,
- 1, TypeUtil.createTemplateParameters(TypeParameters.__LookupEnvironment__addElements_NE), null);
+ public static final @NonNull ExecutorOperation _LookupEnvironment__0_addElements = new ExecutorOperation("addElements", Parameters._Collection__LookupEnvironment_0_addElements_NE__, Types._LookupEnvironment,
+ 0, TypeUtil.createTemplateParameters(TypeParameters.__LookupEnvironment__0_addElements_NE), null);
+ public static final @NonNull ExecutorOperation _LookupEnvironment__1_addElements = new ExecutorOperation("addElements", Parameters._NamedElement, Types._LookupEnvironment,
+ 1, TemplateParameters.EMPTY_LIST, null);
static {
Init.initEnd();
@@ -349,8 +349,8 @@ public class EnvironmentTables
};
private static final @NonNull ExecutorOperation @NonNull [] _LookupEnvironment__LookupEnvironment = {
- EnvironmentTables.Operations._LookupEnvironment__addElement /* addElement(NamedElement[?]) */,
- EnvironmentTables.Operations._LookupEnvironment__addElements /* addElements(NE)(Collection(NE)) */
+ EnvironmentTables.Operations._LookupEnvironment__0_addElements /* addElements(NE)(Collection(NE)) */,
+ EnvironmentTables.Operations._LookupEnvironment__1_addElements /* addElements(NamedElement[?]) */
};
private static final @NonNull ExecutorOperation @NonNull [] _LookupEnvironment__Env4CG = {
EnvironmentTables.Operations._Env4CG__getExecutor /* getExecutor() */,
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/LookupEnvironment.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/LookupEnvironment.java
index 925908362..cda22a9c3 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/LookupEnvironment.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/LookupEnvironment.java
@@ -80,9 +80,9 @@ public interface LookupEnvironment extends Env4CG {
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model required="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * \n * LookupEnvironment{\n * namedElements = namedElements->including(element), parentEnv = parentEnv\n * }\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property CTORid_namedElements = idResolver.getProperty(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.PROPid_namedElements);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property CTORid_parentEnv = idResolver.getProperty(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.PROPid_parentEnv);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.CLSSid_LookupEnvironment, null);\nfinal /*@Thrown\052/ org.eclipse.qvtd.doc.miniocl.lookup.@<%org.eclipse.jdt.annotation.NonNull%> LookupEnvironment symbol_0 = (<%org.eclipse.qvtd.doc.miniocl.lookup.LookupEnvironment%>)TYP_lookup_c_c_LookupEnvironment_0.createInstance();\n@SuppressWarnings(\"null\")\nfinal /*@Thrown\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.qvtd.doc.miniocl.NamedElement%>> namedElements = this.getNamedElements();\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_namedElements = idResolver.createOrderedSetOfAll(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.ORD_CLSSid_NamedElement, namedElements);\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue including = (<%org.eclipse.ocl.pivot.values.OrderedSetValue%>)<%org.eclipse.ocl.pivot.library.collection.CollectionIncludingOperation%>.INSTANCE.evaluate(BOXED_namedElements, element);\nfinal <%java.util.List%><<%org.eclipse.qvtd.doc.miniocl.NamedElement%>> UNBOXED_including = including.asEcoreObjects(idResolver, <%org.eclipse.qvtd.doc.miniocl.NamedElement%>.class);\nassert UNBOXED_including != null;\nCTORid_namedElements.initValue(symbol_0, UNBOXED_including);\nfinal /*@Thrown\052/ org.eclipse.qvtd.doc.miniocl.lookup.@<%org.eclipse.jdt.annotation.Nullable%> LookupEnvironment parentEnv = this.getParentEnv();\nCTORid_parentEnv.initValue(symbol_0, parentEnv);\nreturn symbol_0;'"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * \n * LookupEnvironment{\n * namedElements = namedElements->including(elements), parentEnv = parentEnv\n * }\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property CTORid_namedElements = idResolver.getProperty(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.PROPid_namedElements);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property CTORid_parentEnv = idResolver.getProperty(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.PROPid_parentEnv);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.CLSSid_LookupEnvironment, null);\nfinal /*@Thrown\052/ org.eclipse.qvtd.doc.miniocl.lookup.@<%org.eclipse.jdt.annotation.NonNull%> LookupEnvironment symbol_0 = (<%org.eclipse.qvtd.doc.miniocl.lookup.LookupEnvironment%>)TYP_lookup_c_c_LookupEnvironment_0.createInstance();\n@SuppressWarnings(\"null\")\nfinal /*@Thrown\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.qvtd.doc.miniocl.NamedElement%>> namedElements = this.getNamedElements();\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_namedElements = idResolver.createOrderedSetOfAll(<%org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentTables%>.ORD_CLSSid_NamedElement, namedElements);\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue including = (<%org.eclipse.ocl.pivot.values.OrderedSetValue%>)<%org.eclipse.ocl.pivot.library.collection.CollectionIncludingOperation%>.INSTANCE.evaluate(BOXED_namedElements, elements);\nfinal <%java.util.List%><<%org.eclipse.qvtd.doc.miniocl.NamedElement%>> UNBOXED_including = including.asEcoreObjects(idResolver, <%org.eclipse.qvtd.doc.miniocl.NamedElement%>.class);\nassert UNBOXED_including != null;\nCTORid_namedElements.initValue(symbol_0, UNBOXED_including);\nfinal /*@Thrown\052/ org.eclipse.qvtd.doc.miniocl.lookup.@<%org.eclipse.jdt.annotation.Nullable%> LookupEnvironment parentEnv = this.getParentEnv();\nCTORid_parentEnv.initValue(symbol_0, parentEnv);\nreturn symbol_0;'"
* @generated
*/
- LookupEnvironment addElement(NamedElement element);
+ LookupEnvironment addElements(NamedElement elements);
} // LookupEnvironment
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/EnvironmentPackageImpl.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/EnvironmentPackageImpl.java
index 6d4c1e5e3..8f0912f59 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/EnvironmentPackageImpl.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/EnvironmentPackageImpl.java
@@ -152,7 +152,7 @@ public class EnvironmentPackageImpl extends EPackageImpl implements EnvironmentP
* <!-- end-user-doc -->
* @generated
*/
- public EOperation getLookupEnvironment__AddElement__NamedElement() {
+ public EOperation getLookupEnvironment__AddElements__NamedElement() {
return lookupEnvironmentEClass.getEOperations().get(1);
}
@@ -224,7 +224,7 @@ public class EnvironmentPackageImpl extends EPackageImpl implements EnvironmentP
createEReference(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT__NAMED_ELEMENTS);
createEReference(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT__PARENT_ENV);
createEOperation(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION);
- createEOperation(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT___ADD_ELEMENT__NAMEDELEMENT);
+ createEOperation(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT___ADD_ELEMENTS__NAMEDELEMENT);
env4CGEClass = createEClass(ENV4_CG);
createEOperation(env4CGEClass, ENV4_CG___HAS_FINAL_RESULT);
@@ -281,8 +281,8 @@ public class EnvironmentPackageImpl extends EPackageImpl implements EnvironmentP
g1.getETypeArguments().add(g2);
addEParameter(op, g1, "elements", 1, 1, IS_UNIQUE, IS_ORDERED);
- op = initEOperation(getLookupEnvironment__AddElement__NamedElement(), this.getLookupEnvironment(), "addElement", 1, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theMiniOCLPackage.getNamedElement(), "element", 0, 1, IS_UNIQUE, IS_ORDERED);
+ op = initEOperation(getLookupEnvironment__AddElements__NamedElement(), this.getLookupEnvironment(), "addElements", 1, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theMiniOCLPackage.getNamedElement(), "elements", 0, 1, IS_UNIQUE, IS_ORDERED);
initEClass(env4CGEClass, Env4CG.class, "Env4CG", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/LookupEnvironmentImpl.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/LookupEnvironmentImpl.java
index d59db3268..09f8dae87 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/LookupEnvironmentImpl.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/impl/LookupEnvironmentImpl.java
@@ -165,11 +165,11 @@ public class LookupEnvironmentImpl extends MinimalEObjectImpl.Container implemen
* <!-- end-user-doc -->
* @generated
*/
- public LookupEnvironment addElement(final NamedElement element) {
+ public LookupEnvironment addElements(final NamedElement elements) {
/**
*
* LookupEnvironment{
- * namedElements = namedElements->including(element), parentEnv = parentEnv
+ * namedElements = namedElements->including(elements), parentEnv = parentEnv
* }
*/
final /*@NonInvalid*/ org.eclipse.ocl.pivot.evaluation.@NonNull Executor executor = PivotUtilInternal.getExecutor(this);
@@ -181,7 +181,7 @@ public class LookupEnvironmentImpl extends MinimalEObjectImpl.Container implemen
@SuppressWarnings("null")
final /*@Thrown*/ java.util.@NonNull List<NamedElement> namedElements = this.getNamedElements();
final /*@Thrown*/ org.eclipse.ocl.pivot.values.@NonNull OrderedSetValue BOXED_namedElements = idResolver.createOrderedSetOfAll(EnvironmentTables.ORD_CLSSid_NamedElement, namedElements);
- final /*@Thrown*/ org.eclipse.ocl.pivot.values.@NonNull OrderedSetValue including = (OrderedSetValue)CollectionIncludingOperation.INSTANCE.evaluate(BOXED_namedElements, element);
+ final /*@Thrown*/ org.eclipse.ocl.pivot.values.@NonNull OrderedSetValue including = (OrderedSetValue)CollectionIncludingOperation.INSTANCE.evaluate(BOXED_namedElements, elements);
final List<NamedElement> UNBOXED_including = including.asEcoreObjects(idResolver, NamedElement.class);
assert UNBOXED_including != null;
CTORid_namedElements.initValue(symbol_0, UNBOXED_including);
@@ -290,8 +290,8 @@ public class LookupEnvironmentImpl extends MinimalEObjectImpl.Container implemen
switch (operationID) {
case EnvironmentPackage.LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION:
return addElements((Collection)arguments.get(0));
- case EnvironmentPackage.LOOKUP_ENVIRONMENT___ADD_ELEMENT__NAMEDELEMENT:
- return addElement((NamedElement)arguments.get(0));
+ case EnvironmentPackage.LOOKUP_ENVIRONMENT___ADD_ELEMENTS__NAMEDELEMENT:
+ return addElements((NamedElement)arguments.get(0));
case EnvironmentPackage.LOOKUP_ENVIRONMENT___HAS_FINAL_RESULT:
return hasFinalResult();
case EnvironmentPackage.LOOKUP_ENVIRONMENT___GET_EXECUTOR:
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/util/MiniOCLSingleResultLookupEnvironment.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/util/MiniOCLSingleResultLookupEnvironment.java
index ac207b8f8..0eeb79652 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/util/MiniOCLSingleResultLookupEnvironment.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/lookup/util/MiniOCLSingleResultLookupEnvironment.java
@@ -60,7 +60,7 @@ public class MiniOCLSingleResultLookupEnvironment extends LookupEnvironmentImpl
@Override
@NonNull
- public LookupEnvironment addElement(@Nullable NamedElement namedElement) {
+ public LookupEnvironment addElements(@Nullable NamedElement namedElement) {
if (namedElement != null) {
if (name.equals(namedElement.getName())) {
if (typeFilter.isInstance(namedElement)) {
@@ -84,7 +84,7 @@ public class MiniOCLSingleResultLookupEnvironment extends LookupEnvironmentImpl
if (namedElements != null) {
for (NamedElement namedElement : namedElements) {
- addElement(namedElement);
+ addElements(namedElement);
}
}
return this;
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/util/MiniOCLUnqualifiedVariableLookupVisitor.java b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/util/MiniOCLUnqualifiedVariableLookupVisitor.java
index dbf2ff966..d1160ff84 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/util/MiniOCLUnqualifiedVariableLookupVisitor.java
+++ b/doc/org.eclipse.qvtd.doc.miniocl/emf-gen/org/eclipse/qvtd/doc/miniocl/util/MiniOCLUnqualifiedVariableLookupVisitor.java
@@ -21,12 +21,14 @@ import org.eclipse.ocl.pivot.ids.IdResolver;
import org.eclipse.ocl.pivot.ids.NsURIPackageId;
import org.eclipse.ocl.pivot.ids.RootPackageId;
import org.eclipse.ocl.pivot.ids.TypeId;
+import org.eclipse.ocl.pivot.library.oclany.OclAnyUnsupportedOperation;
import org.eclipse.ocl.pivot.utilities.ClassUtil;
+import org.eclipse.ocl.pivot.values.InvalidValueException;
import org.eclipse.qvtd.doc.miniocl.ExpressionInOCL;
import org.eclipse.qvtd.doc.miniocl.MiniOCLPackage;
import org.eclipse.qvtd.doc.miniocl.Operation;
import org.eclipse.qvtd.doc.miniocl.Parameter;
-import org.eclipse.qvtd.doc.miniocl.Variable;
+import org.eclipse.qvtd.doc.miniocl.lookup.Env4CG;
import org.eclipse.qvtd.doc.miniocl.lookup.EnvironmentPackage;
import org.eclipse.qvtd.doc.miniocl.lookup.LookupEnvironment;
import org.eclipse.qvtd.doc.miniocl.util.AbstractMiniOCLCommonLookupVisitor;
@@ -49,7 +51,6 @@ public class MiniOCLUnqualifiedVariableLookupVisitor
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_OclElement = PACKid_$metamodel$.getClassId("OclElement", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Operation = PACKid_http_c_s_s_www_eclipse_org_s_qvtd_s_doc_s_MiniOCL_s_1_0.getClassId("Operation", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Parameter = PACKid_http_c_s_s_www_eclipse_org_s_qvtd_s_doc_s_MiniOCL_s_1_0.getClassId("Parameter", 0);
- public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Variable = PACKid_http_c_s_s_www_eclipse_org_s_qvtd_s_doc_s_MiniOCL_s_1_0.getClassId("Variable", 0);
public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Parameter = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Parameter);
protected final /*@Thrown*/ org.eclipse.ocl.pivot.evaluation.@org.eclipse.jdt.annotation.NonNull Executor executor;
@@ -84,18 +85,15 @@ public class MiniOCLUnqualifiedVariableLookupVisitor
/**
* visitExpressionInOCL(element : miniocl::ExpressionInOCL[1]) : lookup::LookupEnvironment[?]
*
- * _'null' : lookup::LookupEnvironment[1]
+ * _'null' : lookup::LookupEnvironment[?]
*/
@Override
public /*@NonInvalid*/ LookupEnvironment visitExpressionInOCL(final /*@NonInvalid*/ org.eclipse.qvtd.doc.miniocl.@org.eclipse.jdt.annotation.NonNull ExpressionInOCL element) {
- @SuppressWarnings("null")
- final /*@Thrown*/ org.eclipse.qvtd.doc.miniocl.@org.eclipse.jdt.annotation.NonNull Variable ownedSelfVar = element.getOwnedSelfVar();
- @SuppressWarnings("null")
- final /*@Thrown*/ org.eclipse.qvtd.doc.miniocl.lookup.@org.eclipse.jdt.annotation.NonNull LookupEnvironment inner = context.addElement(ownedSelfVar);
- final /*@Thrown*/ boolean hasFinalResult = inner.hasFinalResult();
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.values.@org.eclipse.jdt.annotation.NonNull InvalidValueException inner = ClassUtil.nonNullState((InvalidValueException)OclAnyUnsupportedOperation.INSTANCE.evaluate(executor, TypeId.OCL_INVALID, context));
+ final /*@Thrown*/ boolean hasFinalResult = ((Env4CG)inner).hasFinalResult();
/*@Thrown*/ org.eclipse.qvtd.doc.miniocl.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment symbol_0;
if (hasFinalResult) {
- symbol_0 = inner;
+ symbol_0 = (LookupEnvironment)inner;
}
else {
final /*@Thrown*/ org.eclipse.qvtd.doc.miniocl.lookup.@org.eclipse.jdt.annotation.Nullable LookupEnvironment parentEnv = this.parentEnv(element);
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.ecore b/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.ecore
index 0b164a783..a8445ffe6 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.ecore
+++ b/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.ecore
@@ -24,11 +24,11 @@
</eGenericType>
</eParameters>
</eOperations>
- <eOperations name="addElement" lowerBound="1" eType="#//LookupEnvironment">
+ <eOperations name="addElements" lowerBound="1" eType="#//LookupEnvironment">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="LookupEnvironment{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;namedElements = namedElements->including(element),&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;parentEnv = parentEnv&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}"/>
+ <details key="body" value="LookupEnvironment{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;namedElements = namedElements->including(elements),&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;parentEnv = parentEnv&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}"/>
</eAnnotations>
- <eParameters name="element" eType="ecore:EClass MiniOCL.ecore#//NamedElement"/>
+ <eParameters name="elements" eType="ecore:EClass MiniOCL.ecore#//NamedElement"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="namedElements" upperBound="-1"
eType="ecore:EClass MiniOCL.ecore#//NamedElement"/>
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.genmodel b/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.genmodel
index 6e48a105f..d4da4fdc5 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.genmodel
+++ b/doc/org.eclipse.qvtd.doc.miniocl/model/Lookup.genmodel
@@ -19,8 +19,8 @@
<genParameters ecoreParameter="Lookup.ecore#//LookupEnvironment/addElements/elements"/>
<genTypeParameters ecoreTypeParameter="Lookup.ecore#//LookupEnvironment/addElements/NE"/>
</genOperations>
- <genOperations ecoreOperation="Lookup.ecore#//LookupEnvironment/addElement">
- <genParameters ecoreParameter="Lookup.ecore#//LookupEnvironment/addElement/element"/>
+ <genOperations ecoreOperation="Lookup.ecore#//LookupEnvironment/addElements.1">
+ <genParameters ecoreParameter="Lookup.ecore#//LookupEnvironment/addElements.1/elements"/>
</genOperations>
</genClasses>
<genClasses image="false" ecoreClass="Lookup.ecore#//Env4CG">
diff --git a/doc/org.eclipse.qvtd.doc.miniocl/model/MiniOCL.genmodel b/doc/org.eclipse.qvtd.doc.miniocl/model/MiniOCL.genmodel
index 21a448b6f..0717c227f 100644
--- a/doc/org.eclipse.qvtd.doc.miniocl/model/MiniOCL.genmodel
+++ b/doc/org.eclipse.qvtd.doc.miniocl/model/MiniOCL.genmodel
@@ -58,7 +58,9 @@
<genClasses ecoreClass="MiniOCL.ecore#//IntegerLiteralExp">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute MiniOCL.ecore#//IntegerLiteralExp/integerSymbol"/>
</genClasses>
- <genClasses ecoreClass="MiniOCL.ecore#//IteratorExp"/>
+ <genClasses ecoreClass="MiniOCL.ecore#//IteratorExp">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute MiniOCL.ecore#//IteratorExp/iterator"/>
+ </genClasses>
<genClasses ecoreClass="MiniOCL.ecore#//IterateExp">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference MiniOCL.ecore#//IterateExp/ownedResult"/>
</genClasses>
@@ -108,7 +110,9 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference MiniOCL.ecore#//Root/ownedImports"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference MiniOCL.ecore#//Root/ownedPackages"/>
</genClasses>
- <genClasses ecoreClass="MiniOCL.ecore#//Variable"/>
+ <genClasses ecoreClass="MiniOCL.ecore#//Variable">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference MiniOCL.ecore#//Variable/ownedInitExp"/>
+ </genClasses>
<genClasses ecoreClass="MiniOCL.ecore#//VariableExp">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference MiniOCL.ecore#//VariableExp/referredVariable"/>
</genClasses>
diff --git a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.cs2as b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.cs2as
index a16fd012c..e95ab8f1f 100644
--- a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.cs2as
+++ b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.cs2as
@@ -69,7 +69,6 @@ disambiguation {
multipleVarDecls := letVars->size() > 1;
}
}
-
mappings {
create Root from RootCS {
ownedImports := imports.trace;
@@ -106,7 +105,7 @@ mappings {
create Operation from OperationCS {
name := name;
type := lookup(Class, resultRef);
- ownedParameters := parameters.trace;
+ ownedParameters := params.trace;
ownedBodyExpression := as::ExpressionInOCL {
language = 'OCL',
ownedBody = body.trace,
@@ -136,11 +135,11 @@ mappings {
opName, trace.ownedArguments);
}
-- TODO
--- create VariableExp from NameExpCS
--- when fall_back {
--- referredVariable := null;
--- type := lookup(Class, 'OclVoid');
--- }
+ create VariableExp from NameExpCS
+ when fall_back {
+ referredVariable := null;
+ type := lookup(Class, 'OclVoid');
+ }
create VariableExp from NameExpCS
when isVariableExp {
referredVariable := lookup(Variable, expName.pathElements->first());
@@ -215,7 +214,7 @@ mappings {
}
create IteratorExp from CollectExpCS {
- name := 'collect';
+ iterator := 'collect';
ownedIterator := if itVar = null
then as::Variable { name='self', type=lookup(Class,'OclAny') }
else itVar.trace
diff --git a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.ocl b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.ocl
index 3675d3ffa..85772fb49 100644
--- a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.ocl
+++ b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFull.ocl
@@ -22,19 +22,18 @@ ownedConstraints = constraints.invariants.ast()
}
context ImportCS
def : ast() : as::Import =
- as::Import {
+as::Import {
alias = if alias = null then null else alias endif,
- uri = uri
+uri = uri
}
-
context InvariantCS
def : ast() : as::Constraint =
as::Constraint {
ownedSpecification = as::ExpressionInOCL {
- language = 'OCL',
+ language = 'OCL' ,
ownedBody = exp.ast(),
ownedSelfVar = as::Variable {
- name = ' self' ,
+ name = 'self' ,
type = ast().constrainedElement
}
},
@@ -62,14 +61,20 @@ as::Operation {
type = ast().lookupClass(resultRef),
ownedParameters = params.ast(),
ownedBodyExpression = as::ExpressionInOCL {
- language = 'OCL',
+ language = 'OCL' ,
ownedBody = _body.ast(),
ownedSelfVar = as::Variable {
- name = ' self' ,
+ name = 'self' ,
type = ast().owningClass
}
}
}
+context ParameterCS
+def : ast() : as::Variable =
+as::Variable {
+ name = name,
+type = ast().lookupClass(typeRef)
+}
context PropertyCS
def : ast() : as::Property =
as::Property {
@@ -78,13 +83,6 @@ lowerBound = computeLowerBound(),
upperBound = computeUpperBound(),
type = ast().lookupClass(typeRef)
}
-context ParameterCS
-def : ast() : as::Variable =
-as::Variable {
- name = name,
-type = ast().lookupClass(typeRef)
-}
-
context CallExpCS
def : ast() : as::CallExp =
self.navExp.ast()
@@ -143,7 +141,10 @@ else
type = ast().oclAsType(as::PropertyCallExp).referredProperty ?. type
}
else
- invalid
+ as::VariableExp {
+ referredVariable = null,
+ type = ast().lookupClass(' OclVoid' )
+ }
endif
endif
endif
@@ -177,8 +178,8 @@ context LetVarCS
def : ast() : as::Variable =
as::Variable {
name = name,
- ownedInitExp = initExp.ast(),
- type = if typeRef <> null then ast().lookupClass(typeRef) else ast().ownedInitExp.type endif
+ownedInitExp = initExp.ast(),
+type = if typeRef <> null then ast().lookupClass(typeRef) else ast().ownedInitExp.type endif
}
context IterateExpCS
def : ast() : as::IterateExp =
@@ -203,7 +204,7 @@ context IteratorVarCS
def : ast() : as::Variable =
as::Variable {
name = itName,
- type = if itType <> null then ast().lookupClass(itType) else ast().lookupClass(' OclAny' ) endif
+type = if itType <> null then ast().lookupClass(itType) else ast().lookupClass(' OclAny' ) endif
}
context AccVarCS
def : ast() : as::Variable =
diff --git a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFullLookup.ocl b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFullLookup.ocl
index 5f2a50a6b..843e0db50 100644
--- a/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFullLookup.ocl
+++ b/doc/org.eclipse.qvtd.doc.minioclcs.xtext/model/MiniOCLFullLookup.ocl
@@ -383,8 +383,8 @@ def : _lookupExportedOperation(importer : ocl::OclElement, oName : String, argum
then null
else foundOperation->first()
endif
-def : lookupExportedOperation(oName : String, arguments : OrderedSet(OCLExpression)) : Operation[?] =
- _lookupExportedOperation(oName, arguments)
+def : lookupExportedOperation(importer : ocl::OclElement, oName : String, arguments : OrderedSet(OCLExpression)) : Operation[?] =
+ _lookupExportedOperation(importer, oName, arguments)
def : lookupExportedOperation(importer : ocl::OclElement, aPathElementCS : cs::PathElementCS, arguments : OrderedSet(OCLExpression)) : Operation[?] =
_lookupExportedOperation(importer, aPathElementCS.elementName, arguments)
@@ -395,17 +395,17 @@ def : _lookupExportedProperty(importer : ocl::OclElement, pName : String) : Prop
then null
else foundProperty->first()
endif
-def : lookupExportedProperty(pName : String) : Property[?] =
- _lookupExportedProperty(pName)
+def : lookupExportedProperty(importer : ocl::OclElement, pName : String) : Property[?] =
+ _lookupExportedProperty(importer, pName)
def : lookupExportedProperty(importer : ocl::OclElement, aPathElementCS : cs::PathElementCS) : Property[?] =
_lookupExportedProperty(importer, aPathElementCS.elementName)
context Visitable
-- Class exports Operation
-
+def : lookupOperationFrom(exporter : Class , cName : String, arguments : OrderedSet(OCLExpression)) : Operation[?] =
+ exporter.lookupExportedOperation(self, cName, arguments)
def : lookupOperationFrom(exporter : Class, aPathElementCS : cs::PathElementCS, arguments : OrderedSet(OCLExpression)) : Operation[?] =
exporter.lookupExportedOperation(self, aPathElementCS, arguments)
-
def : lookupOperationFrom(exporter : Class, aPathNameCS : cs::PathNameCS, arguments : OrderedSet(OCLExpression)) : Operation[?] =
lookupOperationFrom(exporter, aPathNameCS.pathElements, arguments)
@@ -417,10 +417,10 @@ def : lookupOperationFrom(exporter : Class, segments : OrderedSet(cs::PathElemen
in qualifier?.lookupQualifiedOperation(segments->last(), arguments)
endif
-- Class exports Property
-
+def : lookupPropertyFrom(exporter : Class , cName : String) : Property[?] =
+ exporter.lookupExportedProperty(self, cName)
def : lookupPropertyFrom(exporter : Class, aPathElementCS : cs::PathElementCS) : Property[?] =
exporter.lookupExportedProperty(self, aPathElementCS)
-
def : lookupPropertyFrom(exporter : Class, aPathNameCS : cs::PathNameCS) : Property[?] =
lookupPropertyFrom(exporter, aPathNameCS.pathElements)
@@ -439,14 +439,14 @@ def : _unqualified_env_Variable(child : ocl::OclElement) : lookup::LookupEnviron
context ExpressionInOCL
def : _unqualified_env_Variable(child : ocl::OclElement) : lookup::LookupEnvironment =
parentEnv_Variable().nestedEnv()
- .addElement(ownedSelfVar)
+ .addElements(ownedSelfVar)
context LetExp
def : _unqualified_env_Variable(child : ocl::OclElement) : lookup::LookupEnvironment =
if not (ownedVariable->includes(child)
)
then parentEnv_Variable().nestedEnv()
- .addElement(ownedVariable)
+ .addElements(ownedVariable)
else parentEnv_Variable()
endif

Back to the top