Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGClass.java46
-rw-r--r--examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGModelPackage.java58
-rw-r--r--examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGClassImpl.java103
-rw-r--r--examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGModelPackageImpl.java50
-rw-r--r--examples/org.eclipse.ocl.examples.codegen/model/cgmodel.ecore9
-rw-r--r--examples/org.eclipse.ocl.examples.codegen/model/cgmodel.genmodel2
6 files changed, 251 insertions, 17 deletions
diff --git a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGClass.java b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGClass.java
index cafcca7407..7d3972c9aa 100644
--- a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGClass.java
+++ b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGClass.java
@@ -30,6 +30,8 @@ import org.eclipse.jdt.annotation.NonNull;
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getSuperTypes <em>Super Types</em>}</li>
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#isInterface <em>Interface</em>}</li>
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getTemplateParameters <em>Template Parameters</em>}</li>
+ * <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getClasses <em>Classes</em>}</li>
+ * <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getContainingClass <em>Containing Class</em>}</li>
* </ul>
*
* @see org.eclipse.ocl.examples.codegen.cgmodel.CGModelPackage#getCGClass()
@@ -140,6 +142,50 @@ public interface CGClass extends CGNamedElement {
List<CGClass> getTemplateParameters();
/**
+ * Returns the value of the '<em><b>Classes</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getContainingClass <em>Containing Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Classes</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Classes</em>' containment reference list.
+ * @see org.eclipse.ocl.examples.codegen.cgmodel.CGModelPackage#getCGClass_Classes()
+ * @see org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getContainingClass
+ * @generated
+ */
+ List<CGClass> getClasses();
+
+ /**
+ * Returns the value of the '<em><b>Containing Class</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getClasses <em>Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containing Class</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Containing Class</em>' container reference.
+ * @see #setContainingClass(CGClass)
+ * @see org.eclipse.ocl.examples.codegen.cgmodel.CGModelPackage#getCGClass_ContainingClass()
+ * @see org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getClasses
+ * @generated
+ */
+ CGClass getContainingClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getContainingClass <em>Containing Class</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Containing Class</em>' container reference.
+ * @see #getContainingClass()
+ * @generated
+ */
+ void setContainingClass(CGClass value);
+
+ /**
* Returns the value of the '<em><b>Containing Package</b></em>' container reference.
* It is bidirectional and its opposite is '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGPackage#getClasses <em>Classes</em>}'.
* <!-- begin-user-doc -->
diff --git a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGModelPackage.java b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGModelPackage.java
index ac2d84023e..4bbb65fb68 100644
--- a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGModelPackage.java
+++ b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/CGModelPackage.java
@@ -2181,13 +2181,31 @@ public interface CGModelPackage extends EPackage {
int CG_CLASS__TEMPLATE_PARAMETERS = CG_NAMED_ELEMENT_FEATURE_COUNT + 6;
/**
+ * The feature id for the '<em><b>Classes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CG_CLASS__CLASSES = CG_NAMED_ELEMENT_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>Containing Class</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CG_CLASS__CONTAINING_CLASS = CG_NAMED_ELEMENT_FEATURE_COUNT + 8;
+
+ /**
* The number of structural features of the '<em>CG Class</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int CG_CLASS_FEATURE_COUNT = CG_NAMED_ELEMENT_FEATURE_COUNT + 7;
+ int CG_CLASS_FEATURE_COUNT = CG_NAMED_ELEMENT_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Ast</b></em>' attribute.
@@ -9109,6 +9127,28 @@ public interface CGModelPackage extends EPackage {
EReference getCGClass_TemplateParameters();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getClasses <em>Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Classes</em>'.
+ * @see org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getClasses()
+ * @see #getCGClass()
+ * @generated
+ */
+ EReference getCGClass_Classes();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getContainingClass <em>Containing Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Containing Class</em>'.
+ * @see org.eclipse.ocl.examples.codegen.cgmodel.CGClass#getContainingClass()
+ * @see #getCGClass()
+ * @generated
+ */
+ EReference getCGClass_ContainingClass();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGCallExp <em>CG Call Exp</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -11250,6 +11290,22 @@ public interface CGModelPackage extends EPackage {
EReference CG_CLASS__TEMPLATE_PARAMETERS = eINSTANCE.getCGClass_TemplateParameters();
/**
+ * The meta object literal for the '<em><b>Classes</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CG_CLASS__CLASSES = eINSTANCE.getCGClass_Classes();
+
+ /**
+ * The meta object literal for the '<em><b>Containing Class</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CG_CLASS__CONTAINING_CLASS = eINSTANCE.getCGClass_ContainingClass();
+
+ /**
* The meta object literal for the '{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGCallExpImpl <em>CG Call Exp</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGClassImpl.java b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGClassImpl.java
index d3aef2bfa7..7aea840c10 100644
--- a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGClassImpl.java
+++ b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGClassImpl.java
@@ -4,7 +4,7 @@
* 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:
* E.D.Willink(CEA LIST) - Initial API and implementation
*******************************************************************************/
@@ -48,6 +48,8 @@ import org.eclipse.ocl.examples.codegen.cgmodel.util.CGModelVisitor;
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGClassImpl#getSuperTypes <em>Super Types</em>}</li>
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGClassImpl#isInterface <em>Interface</em>}</li>
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGClassImpl#getTemplateParameters <em>Template Parameters</em>}</li>
+ * <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGClassImpl#getClasses <em>Classes</em>}</li>
+ * <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGClassImpl#getContainingClass <em>Containing Class</em>}</li>
* </ul>
*
* @generated
@@ -124,6 +126,16 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
protected EList<CGClass> templateParameters;
/**
+ * The cached value of the '{@link #getClasses() <em>Classes</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getClasses()
+ * @generated
+ * @ordered
+ */
+ protected EList<CGClass> classes;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -288,6 +300,62 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
* @generated
*/
@Override
+ public List<CGClass> getClasses() {
+ if (classes == null) {
+ classes = new EObjectContainmentWithInverseEList<CGClass>(CGClass.class, this, CGModelPackage.CG_CLASS__CLASSES, CGModelPackage.CG_CLASS__CONTAINING_CLASS);
+ }
+ return classes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public CGClass getContainingClass() {
+ if (eContainerFeatureID() != CGModelPackage.CG_CLASS__CONTAINING_CLASS) return null;
+ return (CGClass)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetContainingClass(CGClass newContainingClass, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newContainingClass, CGModelPackage.CG_CLASS__CONTAINING_CLASS, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setContainingClass(CGClass newContainingClass) {
+ if (newContainingClass != eInternalContainer() || (eContainerFeatureID() != CGModelPackage.CG_CLASS__CONTAINING_CLASS && newContainingClass != null)) {
+ if (EcoreUtil.isAncestor(this, newContainingClass))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newContainingClass != null)
+ msgs = ((InternalEObject)newContainingClass).eInverseAdd(this, CGModelPackage.CG_CLASS__CLASSES, CGClass.class, msgs);
+ msgs = basicSetContainingClass(newContainingClass, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CGModelPackage.CG_CLASS__CONTAINING_CLASS, newContainingClass, newContainingClass));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public String toString() {
return super.toString();
}
@@ -309,6 +377,12 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
return ((InternalEList<InternalEObject>)(InternalEList<?>)getOperations()).basicAdd(otherEnd, msgs);
case CGModelPackage.CG_CLASS__PROPERTIES:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getProperties()).basicAdd(otherEnd, msgs);
+ case CGModelPackage.CG_CLASS__CLASSES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getClasses()).basicAdd(otherEnd, msgs);
+ case CGModelPackage.CG_CLASS__CONTAINING_CLASS:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetContainingClass((CGClass)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -329,6 +403,10 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
case CGModelPackage.CG_CLASS__INVARIANTS:
return ((InternalEList<?>)getInvariants()).basicRemove(otherEnd, msgs);
+ case CGModelPackage.CG_CLASS__CLASSES:
+ return ((InternalEList<?>)getClasses()).basicRemove(otherEnd, msgs);
+ case CGModelPackage.CG_CLASS__CONTAINING_CLASS:
+ return basicSetContainingClass(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -343,6 +421,8 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
switch (eContainerFeatureID()) {
case CGModelPackage.CG_CLASS__CONTAINING_PACKAGE:
return eInternalContainer().eInverseRemove(this, CGModelPackage.CG_PACKAGE__CLASSES, CGPackage.class, msgs);
+ case CGModelPackage.CG_CLASS__CONTAINING_CLASS:
+ return eInternalContainer().eInverseRemove(this, CGModelPackage.CG_CLASS__CLASSES, CGClass.class, msgs);
}
return super.eBasicRemoveFromContainerFeature(msgs);
}
@@ -369,6 +449,10 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
return isInterface();
case CGModelPackage.CG_CLASS__TEMPLATE_PARAMETERS:
return getTemplateParameters();
+ case CGModelPackage.CG_CLASS__CLASSES:
+ return getClasses();
+ case CGModelPackage.CG_CLASS__CONTAINING_CLASS:
+ return getContainingClass();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -408,6 +492,13 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
getTemplateParameters().clear();
getTemplateParameters().addAll((Collection<? extends CGClass>)newValue);
return;
+ case CGModelPackage.CG_CLASS__CLASSES:
+ getClasses().clear();
+ getClasses().addAll((Collection<? extends CGClass>)newValue);
+ return;
+ case CGModelPackage.CG_CLASS__CONTAINING_CLASS:
+ setContainingClass((CGClass)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -441,6 +532,12 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
case CGModelPackage.CG_CLASS__TEMPLATE_PARAMETERS:
getTemplateParameters().clear();
return;
+ case CGModelPackage.CG_CLASS__CLASSES:
+ getClasses().clear();
+ return;
+ case CGModelPackage.CG_CLASS__CONTAINING_CLASS:
+ setContainingClass((CGClass)null);
+ return;
}
super.eUnset(featureID);
}
@@ -467,6 +564,10 @@ public class CGClassImpl extends CGNamedElementImpl implements CGClass {
return interface_ != INTERFACE_EDEFAULT;
case CGModelPackage.CG_CLASS__TEMPLATE_PARAMETERS:
return templateParameters != null && !templateParameters.isEmpty();
+ case CGModelPackage.CG_CLASS__CLASSES:
+ return classes != null && !classes.isEmpty();
+ case CGModelPackage.CG_CLASS__CONTAINING_CLASS:
+ return getContainingClass() != null;
}
return super.eIsSet(featureID);
}
diff --git a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGModelPackageImpl.java b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGModelPackageImpl.java
index a38d43c4f1..418c6d1951 100644
--- a/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGModelPackageImpl.java
+++ b/examples/org.eclipse.ocl.examples.codegen/emf-gen/org/eclipse/ocl/examples/codegen/cgmodel/impl/CGModelPackageImpl.java
@@ -4,7 +4,7 @@
* 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:
* E.D.Willink(CEA LIST) - Initial API and implementation
*******************************************************************************/
@@ -34,8 +34,6 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGCollectionPart;
import org.eclipse.ocl.examples.codegen.cgmodel.CGConstant;
import org.eclipse.ocl.examples.codegen.cgmodel.CGConstantExp;
import org.eclipse.ocl.examples.codegen.cgmodel.CGConstraint;
-import org.eclipse.ocl.examples.codegen.cgmodel.CGShadowExp;
-import org.eclipse.ocl.examples.codegen.cgmodel.CGShadowPart;
import org.eclipse.ocl.examples.codegen.cgmodel.CGEcoreClassShadowExp;
import org.eclipse.ocl.examples.codegen.cgmodel.CGEcoreDataTypeShadowExp;
import org.eclipse.ocl.examples.codegen.cgmodel.CGEcoreExp;
@@ -46,7 +44,6 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGEcorePropertyCallExp;
import org.eclipse.ocl.examples.codegen.cgmodel.CGElement;
import org.eclipse.ocl.examples.codegen.cgmodel.CGElementId;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorCompositionProperty;
-import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorShadowPart;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorNavigationProperty;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorOperation;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorOperationCallExp;
@@ -54,6 +51,7 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorOppositeProperty;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorOppositePropertyCallExp;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorProperty;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorPropertyCallExp;
+import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorShadowPart;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorType;
import org.eclipse.ocl.examples.codegen.cgmodel.CGFinalVariable;
import org.eclipse.ocl.examples.codegen.cgmodel.CGGuardExp;
@@ -96,6 +94,8 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGProperty;
import org.eclipse.ocl.examples.codegen.cgmodel.CGPropertyCallExp;
import org.eclipse.ocl.examples.codegen.cgmodel.CGReal;
import org.eclipse.ocl.examples.codegen.cgmodel.CGSettableVariable;
+import org.eclipse.ocl.examples.codegen.cgmodel.CGShadowExp;
+import org.eclipse.ocl.examples.codegen.cgmodel.CGShadowPart;
import org.eclipse.ocl.examples.codegen.cgmodel.CGString;
import org.eclipse.ocl.examples.codegen.cgmodel.CGText;
import org.eclipse.ocl.examples.codegen.cgmodel.CGTextParameter;
@@ -909,7 +909,7 @@ public class CGModelPackageImpl extends EPackageImpl implements CGModelPackage {
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
+ *
* <p>This method is used to initialize {@link CGModelPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
@@ -937,7 +937,7 @@ public class CGModelPackageImpl extends EPackageImpl implements CGModelPackage {
// Mark meta-data to indicate it can't be changed
theCGModelPackage.freeze();
-
+
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(CGModelPackage.eNS_URI, theCGModelPackage);
return theCGModelPackage;
@@ -1199,6 +1199,26 @@ public class CGModelPackageImpl extends EPackageImpl implements CGModelPackage {
* @generated
*/
@Override
+ public EReference getCGClass_Classes() {
+ return (EReference)cgClassEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EReference getCGClass_ContainingClass() {
+ return (EReference)cgClassEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public EClass getCGCollectionExp() {
return cgCollectionExpEClass;
}
@@ -3056,6 +3076,8 @@ public class CGModelPackageImpl extends EPackageImpl implements CGModelPackage {
createEReference(cgClassEClass, CG_CLASS__SUPER_TYPES);
createEAttribute(cgClassEClass, CG_CLASS__INTERFACE);
createEReference(cgClassEClass, CG_CLASS__TEMPLATE_PARAMETERS);
+ createEReference(cgClassEClass, CG_CLASS__CLASSES);
+ createEReference(cgClassEClass, CG_CLASS__CONTAINING_CLASS);
cgCollectionExpEClass = createEClass(CG_COLLECTION_EXP);
createEReference(cgCollectionExpEClass, CG_COLLECTION_EXP__PARTS);
@@ -3468,13 +3490,15 @@ public class CGModelPackageImpl extends EPackageImpl implements CGModelPackage {
initEClass(cgCatchExpEClass, CGCatchExp.class, "CGCatchExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(cgClassEClass, CGClass.class, "CGClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getCGClass_ContainingPackage(), this.getCGPackage(), this.getCGPackage_Classes(), "containingPackage", null, 1, 1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCGClass_ContainingPackage(), this.getCGPackage(), this.getCGPackage_Classes(), "containingPackage", null, 0, 1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getCGClass_Operations(), this.getCGOperation(), this.getCGOperation_ContainingClass(), "operations", null, 0, -1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getCGClass_Properties(), this.getCGProperty(), this.getCGProperty_ContainingClass(), "properties", null, 0, -1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getCGClass_Invariants(), this.getCGConstraint(), null, "invariants", null, 0, -1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getCGClass_SuperTypes(), this.getCGClass(), null, "superTypes", null, 0, -1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCGClass_Interface(), ecorePackage.getEBoolean(), "interface", "false", 1, 1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getCGClass_TemplateParameters(), this.getCGClass(), null, "templateParameters", null, 0, -1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCGClass_Classes(), this.getCGClass(), this.getCGClass_ContainingClass(), "classes", null, 0, -1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getCGClass_ContainingClass(), this.getCGClass(), this.getCGClass_Classes(), "containingClass", null, 0, 1, CGClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(cgCollectionExpEClass, CGCollectionExp.class, "CGCollectionExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getCGCollectionExp_Parts(), this.getCGCollectionPart(), this.getCGCollectionPart_CollectionExp(), "parts", null, 0, -1, CGCollectionExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -3754,13 +3778,13 @@ public class CGModelPackageImpl extends EPackageImpl implements CGModelPackage {
* @generated
*/
protected void createImportAnnotations() {
- String source = "http://www.eclipse.org/OCL/Import";
+ String source = "http://www.eclipse.org/OCL/Import";
addAnnotation
- (this,
- source,
- new String[] {
- "ecore", "http://www.eclipse.org/emf/2002/Ecore#/"
- });
+ (this,
+ source,
+ new String[] {
+ "ecore", "http://www.eclipse.org/emf/2002/Ecore#/"
+ });
}
} //CGModelPackageImpl
diff --git a/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.ecore b/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.ecore
index cb3187d914..dd294e6ec6 100644
--- a/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.ecore
+++ b/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.ecore
@@ -88,8 +88,8 @@
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CGClass" eSuperTypes="#//CGNamedElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="containingPackage" lowerBound="1"
- eType="#//CGPackage" resolveProxies="false" eOpposite="#//CGPackage/classes"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="containingPackage" eType="#//CGPackage"
+ resolveProxies="false" eOpposite="#//CGPackage/classes"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="operations" ordered="false"
upperBound="-1" eType="#//CGOperation" containment="true" resolveProxies="false"
eOpposite="#//CGOperation/containingClass"/>
@@ -112,6 +112,11 @@
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EReference" name="templateParameters" unique="false"
upperBound="-1" eType="#//CGClass" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="classes" ordered="false"
+ upperBound="-1" eType="#//CGClass" containment="true" resolveProxies="false"
+ eOpposite="#//CGClass/containingClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="containingClass" eType="#//CGClass"
+ resolveProxies="false" eOpposite="#//CGClass/classes"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CGCollectionExp" eSuperTypes="#//CGValuedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="parts" upperBound="-1"
diff --git a/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.genmodel b/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.genmodel
index 7873a551a5..5565699e69 100644
--- a/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.genmodel
+++ b/examples/org.eclipse.ocl.examples.codegen/model/cgmodel.genmodel
@@ -68,6 +68,8 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cgmodel.ecore#//CGClass/superTypes"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute cgmodel.ecore#//CGClass/interface"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cgmodel.ecore#//CGClass/templateParameters"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cgmodel.ecore#//CGClass/classes"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference cgmodel.ecore#//CGClass/containingClass"/>
</genClasses>
<genClasses ecoreClass="cgmodel.ecore#//CGCollectionExp">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cgmodel.ecore#//CGCollectionExp/parts"/>

Back to the top