diff options
author | Ed Willink | 2014-08-17 13:32:38 +0000 |
---|---|---|
committer | Ed Willink | 2014-08-17 13:42:23 +0000 |
commit | d1830b840a062028b41e9d71ab8b78d1eb0a2691 (patch) | |
tree | 54170ee982c7119e9d0e0c9aec9eaf7406c1f23c | |
parent | 6658f466b223e6485dd72ec90007446f5bef547f (diff) | |
download | org.eclipse.qvtd-d1830b840a062028b41e9d71ab8b78d1eb0a2691.tar.gz org.eclipse.qvtd-d1830b840a062028b41e9d71ab8b78d1eb0a2691.tar.xz org.eclipse.qvtd-d1830b840a062028b41e9d71ab8b78d1eb0a2691.zip |
[441922] Introduce CGMappingStatement/Loop/Sequence
32 files changed, 1644 insertions, 911 deletions
diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCall.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCall.java index 03187d925..945b181aa 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCall.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCall.java @@ -22,7 +22,6 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; * <p> * The following features are supported: * <ul> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingExp <em>Mapping Exp</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingCallBindings <em>Mapping Call Bindings</em>}</li> * </ul> * </p> @@ -34,34 +33,6 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; public interface CGMappingCall extends CGValuedElement { /** - * Returns the value of the '<em><b>Mapping Exp</b></em>' container reference. - * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getMappingCalls <em>Mapping Calls</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Mapping Exp</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>Mapping Exp</em>' container reference. - * @see #setMappingExp(CGMappingExp) - * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGMappingCall_MappingExp() - * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getMappingCalls - * @model opposite="mappingCalls" resolveProxies="false" required="true" transient="false" - * @generated - */ - CGMappingExp getMappingExp(); - - /** - * Sets the value of the '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingExp <em>Mapping Exp</em>}' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Mapping Exp</em>' container reference. - * @see #getMappingExp() - * @generated - */ - void setMappingExp(CGMappingExp value); - - /** * Returns the value of the '<em><b>Mapping Call Bindings</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding}. * <!-- begin-user-doc --> diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCallBinding.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCallBinding.java index 1915f2998..66a94cff7 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCallBinding.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingCallBinding.java @@ -20,8 +20,7 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; * <p> * The following features are supported: * <ul> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValueOrValues <em>Value Or Values</em>}</li> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#isLoop <em>Loop</em>}</li> + * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValue <em>Value</em>}</li> * </ul> * </p> * @@ -31,56 +30,29 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; */ public interface CGMappingCallBinding extends CGValuedElement { /** - * Returns the value of the '<em><b>Value Or Values</b></em>' containment reference. + * Returns the value of the '<em><b>Value</b></em>' containment reference. * <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Value Or Values</em>' containment reference isn't clear, + * If the meaning of the '<em>Value</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>Value Or Values</em>' containment reference. - * @see #setValueOrValues(CGValuedElement) - * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGMappingCallBinding_ValueOrValues() + * @return the value of the '<em>Value</em>' containment reference. + * @see #setValue(CGValuedElement) + * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGMappingCallBinding_Value() * @model containment="true" required="true" * @generated */ - CGValuedElement getValueOrValues(); + CGValuedElement getValue(); /** - * Sets the value of the '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValueOrValues <em>Value Or Values</em>}' containment reference. + * Sets the value of the '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValue <em>Value</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @param value the new value of the '<em>Value Or Values</em>' containment reference. - * @see #getValueOrValues() + * @param value the new value of the '<em>Value</em>' containment reference. + * @see #getValue() * @generated */ - void setValueOrValues(CGValuedElement value); - - /** - * Returns the value of the '<em><b>Loop</b></em>' attribute. - * The default value is <code>"false"</code>. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Loop</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Loop</em>' attribute. - * @see #setLoop(boolean) - * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGMappingCallBinding_Loop() - * @model default="false" required="true" - * @generated - */ - boolean isLoop(); - - /** - * Sets the value of the '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#isLoop <em>Loop</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Loop</em>' attribute. - * @see #isLoop() - * @generated - */ - void setLoop(boolean value); + void setValue(CGValuedElement value); } // CGMappingCallBinding diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingExp.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingExp.java index fbc599a27..71fbee798 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingExp.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingExp.java @@ -24,9 +24,9 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; * <ul> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getAssignments <em>Assignments</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getMapping <em>Mapping</em>}</li> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getMappingCalls <em>Mapping Calls</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getPredicates <em>Predicates</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getRealizedVariables <em>Realized Variables</em>}</li> + * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getBody <em>Body</em>}</li> * </ul> * </p> * @@ -80,24 +80,6 @@ public interface CGMappingExp extends CGValuedElement { void setMapping(CGMapping value); /** - * Returns the value of the '<em><b>Mapping Calls</b></em>' containment reference list. - * The list contents are of type {@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall}. - * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingExp <em>Mapping Exp</em>}'. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Mapping Calls</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>Mapping Calls</em>' containment reference list. - * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGMappingExp_MappingCalls() - * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingExp - * @model opposite="mappingExp" containment="true" - * @generated - */ - List<CGMappingCall> getMappingCalls(); - - /** * Returns the value of the '<em><b>Predicates</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate}. * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate#getMappingExp <em>Mapping Exp</em>}'. @@ -131,4 +113,30 @@ public interface CGMappingExp extends CGValuedElement { */ List<CGValuedElement> getRealizedVariables(); + /** + * Returns the value of the '<em><b>Body</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Body</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>Body</em>' containment reference. + * @see #setBody(CGValuedElement) + * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGMappingExp_Body() + * @model containment="true" + * @generated + */ + CGValuedElement getBody(); + + /** + * Sets the value of the '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getBody <em>Body</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Body</em>' containment reference. + * @see #getBody() + * @generated + */ + void setBody(CGValuedElement value); + } // CGMappingExp diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingLoop.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingLoop.java new file mode 100644 index 000000000..958e8797b --- /dev/null +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGMappingLoop.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014 E.D.Willink and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * E.D.Willink - Initial API and implementation + *******************************************************************************/ +package org.eclipse.qvtd.codegen.qvticgmodel; + +import org.eclipse.ocl.examples.codegen.cgmodel.CGIterationCallExp; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>CG Mapping Loop</b></em>'. + * <!-- end-user-doc --> + * + * + * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGMappingLoop() + * @model + * @generated + */ +public interface CGMappingLoop extends CGIterationCallExp { + +} // CGMappingLoop diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGSequence.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGSequence.java new file mode 100644 index 000000000..5ecdf403c --- /dev/null +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/CGSequence.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2014 E.D.Willink and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * E.D.Willink - Initial API and implementation + *******************************************************************************/ +package org.eclipse.qvtd.codegen.qvticgmodel; + +import java.util.List; + +import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>CG Sequence</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.CGSequence#getStatements <em>Statements</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGSequence() + * @model + * @generated + */ +public interface CGSequence extends CGValuedElement { + /** + * Returns the value of the '<em><b>Statements</b></em>' containment reference list. + * The list contents are of type {@link org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Statements</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>Statements</em>' containment reference list. + * @see org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage#getCGSequence_Statements() + * @model containment="true" + * @generated + */ + List<CGValuedElement> getStatements(); + +} // CGSequence diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelFactory.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelFactory.java index b0c4960eb..678e0882d 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelFactory.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelFactory.java @@ -158,6 +158,15 @@ public interface QVTiCGModelFactory extends EFactory { @NonNull CGMappingExp createCGMappingExp(); /** + * Returns a new object of class '<em>CG Mapping Loop</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>CG Mapping Loop</em>'. + * @generated + */ + CGMappingLoop createCGMappingLoop(); + + /** * Returns a new object of class '<em>CG Middle Property Assignment</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -194,6 +203,15 @@ public interface QVTiCGModelFactory extends EFactory { @NonNull CGRealizedVariable createCGRealizedVariable(); /** + * Returns a new object of class '<em>CG Sequence</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>CG Sequence</em>'. + * @generated + */ + CGSequence createCGSequence(); + + /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelPackage.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelPackage.java index fb59ff75e..2f7ef3512 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelPackage.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/QVTiCGModelPackage.java @@ -92,7 +92,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGPropertyAssignment() * @generated */ - int CG_PROPERTY_ASSIGNMENT = 13; + int CG_PROPERTY_ASSIGNMENT = 14; /** * The feature id for the '<em><b>Ast</b></em>' attribute. @@ -347,7 +347,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGTransformation() * @generated */ - int CG_TRANSFORMATION = 15; + int CG_TRANSFORMATION = 17; /** * Returns the meta object for class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGEcorePropertyAssignment <em>CG Ecore Property Assignment</em>}'. @@ -503,7 +503,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGPredicate() * @generated */ - int CG_PREDICATE = 12; + int CG_PREDICATE = 13; /** * The meta object id for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGRealizedVariableImpl <em>CG Realized Variable</em>}' class. @@ -513,7 +513,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGRealizedVariable() * @generated */ - int CG_REALIZED_VARIABLE = 14; + int CG_REALIZED_VARIABLE = 15; /** * The feature id for the '<em><b>Ast</b></em>' attribute. @@ -1277,22 +1277,13 @@ public interface QVTiCGModelPackage extends EPackage { int CG_MAPPING_CALL__OWNS = CGModelPackage.CG_VALUED_ELEMENT__OWNS; /** - * The feature id for the '<em><b>Mapping Exp</b></em>' container reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int CG_MAPPING_CALL__MAPPING_EXP = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 0; - - /** * The feature id for the '<em><b>Mapping Call Bindings</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int CG_MAPPING_CALL__MAPPING_CALL_BINDINGS = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 1; + int CG_MAPPING_CALL__MAPPING_CALL_BINDINGS = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 0; /** * The number of structural features of the '<em>CG Mapping Call</em>' class. @@ -1301,7 +1292,7 @@ public interface QVTiCGModelPackage extends EPackage { * @generated * @ordered */ - int CG_MAPPING_CALL_FEATURE_COUNT = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 2; + int CG_MAPPING_CALL_FEATURE_COUNT = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>Ast</b></em>' attribute. @@ -1358,22 +1349,13 @@ public interface QVTiCGModelPackage extends EPackage { int CG_MAPPING_CALL_BINDING__OWNS = CGModelPackage.CG_VALUED_ELEMENT__OWNS; /** - * The feature id for the '<em><b>Value Or Values</b></em>' containment reference. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 0; - - /** - * The feature id for the '<em><b>Loop</b></em>' attribute. + * The feature id for the '<em><b>Value</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int CG_MAPPING_CALL_BINDING__LOOP = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 1; + int CG_MAPPING_CALL_BINDING__VALUE = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 0; /** * The number of structural features of the '<em>CG Mapping Call Binding</em>' class. @@ -1382,7 +1364,7 @@ public interface QVTiCGModelPackage extends EPackage { * @generated * @ordered */ - int CG_MAPPING_CALL_BINDING_FEATURE_COUNT = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 2; + int CG_MAPPING_CALL_BINDING_FEATURE_COUNT = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 1; /** * The meta object id for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl <em>CG Mapping Exp</em>}' class. @@ -1467,31 +1449,31 @@ public interface QVTiCGModelPackage extends EPackage { int CG_MAPPING_EXP__MAPPING = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 1; /** - * The feature id for the '<em><b>Mapping Calls</b></em>' containment reference list. + * The feature id for the '<em><b>Predicates</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int CG_MAPPING_EXP__MAPPING_CALLS = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 2; + int CG_MAPPING_EXP__PREDICATES = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 2; /** - * The feature id for the '<em><b>Predicates</b></em>' containment reference list. + * The feature id for the '<em><b>Realized Variables</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int CG_MAPPING_EXP__PREDICATES = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 3; + int CG_MAPPING_EXP__REALIZED_VARIABLES = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 3; /** - * The feature id for the '<em><b>Realized Variables</b></em>' containment reference list. + * The feature id for the '<em><b>Body</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int CG_MAPPING_EXP__REALIZED_VARIABLES = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 4; + int CG_MAPPING_EXP__BODY = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 4; /** * The number of structural features of the '<em>CG Mapping Exp</em>' class. @@ -1503,6 +1485,133 @@ public interface QVTiCGModelPackage extends EPackage { int CG_MAPPING_EXP_FEATURE_COUNT = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 5; /** + * The meta object id for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingLoopImpl <em>CG Mapping Loop</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingLoopImpl + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGMappingLoop() + * @generated + */ + int CG_MAPPING_LOOP = 10; + + /** + * The feature id for the '<em><b>Ast</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__AST = CGModelPackage.CG_ITERATION_CALL_EXP__AST; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__NAME = CGModelPackage.CG_ITERATION_CALL_EXP__NAME; + + /** + * The feature id for the '<em><b>Type Id</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__TYPE_ID = CGModelPackage.CG_ITERATION_CALL_EXP__TYPE_ID; + + /** + * The feature id for the '<em><b>Required</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__REQUIRED = CGModelPackage.CG_ITERATION_CALL_EXP__REQUIRED; + + /** + * The feature id for the '<em><b>Depends On</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__DEPENDS_ON = CGModelPackage.CG_ITERATION_CALL_EXP__DEPENDS_ON; + + /** + * The feature id for the '<em><b>Owns</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__OWNS = CGModelPackage.CG_ITERATION_CALL_EXP__OWNS; + + /** + * The feature id for the '<em><b>Invalidating</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__INVALIDATING = CGModelPackage.CG_ITERATION_CALL_EXP__INVALIDATING; + + /** + * The feature id for the '<em><b>Validating</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__VALIDATING = CGModelPackage.CG_ITERATION_CALL_EXP__VALIDATING; + + /** + * The feature id for the '<em><b>Source</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__SOURCE = CGModelPackage.CG_ITERATION_CALL_EXP__SOURCE; + + /** + * The feature id for the '<em><b>Referred Iteration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__REFERRED_ITERATION = CGModelPackage.CG_ITERATION_CALL_EXP__REFERRED_ITERATION; + + /** + * The feature id for the '<em><b>Iterators</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__ITERATORS = CGModelPackage.CG_ITERATION_CALL_EXP__ITERATORS; + + /** + * The feature id for the '<em><b>Body</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP__BODY = CGModelPackage.CG_ITERATION_CALL_EXP__BODY; + + /** + * The number of structural features of the '<em>CG Mapping Loop</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_MAPPING_LOOP_FEATURE_COUNT = CGModelPackage.CG_ITERATION_CALL_EXP_FEATURE_COUNT + 0; + + /** * The meta object id for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMiddlePropertyAssignmentImpl <em>CG Middle Property Assignment</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1510,7 +1619,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGMiddlePropertyAssignment() * @generated */ - int CG_MIDDLE_PROPERTY_ASSIGNMENT = 10; + int CG_MIDDLE_PROPERTY_ASSIGNMENT = 11; /** * The feature id for the '<em><b>Ast</b></em>' attribute. @@ -1637,7 +1746,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGMiddlePropertyCallExp() * @generated */ - int CG_MIDDLE_PROPERTY_CALL_EXP = 11; + int CG_MIDDLE_PROPERTY_CALL_EXP = 12; /** * The feature id for the '<em><b>Ast</b></em>' attribute. @@ -1829,6 +1938,88 @@ public interface QVTiCGModelPackage extends EPackage { int CG_PREDICATE_FEATURE_COUNT = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 3; /** + * The meta object id for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGSequenceImpl <em>CG Sequence</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.CGSequenceImpl + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGSequence() + * @generated + */ + int CG_SEQUENCE = 16; + + /** + * The feature id for the '<em><b>Ast</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE__AST = CGModelPackage.CG_VALUED_ELEMENT__AST; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE__NAME = CGModelPackage.CG_VALUED_ELEMENT__NAME; + + /** + * The feature id for the '<em><b>Type Id</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE__TYPE_ID = CGModelPackage.CG_VALUED_ELEMENT__TYPE_ID; + + /** + * The feature id for the '<em><b>Required</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE__REQUIRED = CGModelPackage.CG_VALUED_ELEMENT__REQUIRED; + + /** + * The feature id for the '<em><b>Depends On</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE__DEPENDS_ON = CGModelPackage.CG_VALUED_ELEMENT__DEPENDS_ON; + + /** + * The feature id for the '<em><b>Owns</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE__OWNS = CGModelPackage.CG_VALUED_ELEMENT__OWNS; + + /** + * The feature id for the '<em><b>Statements</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE__STATEMENTS = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>CG Sequence</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CG_SEQUENCE_FEATURE_COUNT = CGModelPackage.CG_VALUED_ELEMENT_FEATURE_COUNT + 1; + + /** * The feature id for the '<em><b>Ast</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1944,7 +2135,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGTypedModel() * @generated */ - int CG_TYPED_MODEL = 16; + int CG_TYPED_MODEL = 18; /** * The feature id for the '<em><b>Ast</b></em>' attribute. @@ -1999,7 +2190,7 @@ public interface QVTiCGModelPackage extends EPackage { * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGVariablePredicate() * @generated */ - int CG_VARIABLE_PREDICATE = 17; + int CG_VARIABLE_PREDICATE = 19; /** * The feature id for the '<em><b>Ast</b></em>' attribute. @@ -2304,17 +2495,6 @@ public interface QVTiCGModelPackage extends EPackage { EClass getCGMappingCall(); /** - * Returns the meta object for the container reference '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingExp <em>Mapping Exp</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the container reference '<em>Mapping Exp</em>'. - * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingExp() - * @see #getCGMappingCall() - * @generated - */ - EReference getCGMappingCall_MappingExp(); - - /** * Returns the meta object for the containment reference list '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall#getMappingCallBindings <em>Mapping Call Bindings</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2336,26 +2516,15 @@ public interface QVTiCGModelPackage extends EPackage { EClass getCGMappingCallBinding(); /** - * Returns the meta object for the containment reference '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValueOrValues <em>Value Or Values</em>}'. + * Returns the meta object for the containment reference '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValue <em>Value</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for the containment reference '<em>Value Or Values</em>'. - * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValueOrValues() + * @return the meta object for the containment reference '<em>Value</em>'. + * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#getValue() * @see #getCGMappingCallBinding() * @generated */ - EReference getCGMappingCallBinding_ValueOrValues(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#isLoop <em>Loop</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Loop</em>'. - * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding#isLoop() - * @see #getCGMappingCallBinding() - * @generated - */ - EAttribute getCGMappingCallBinding_Loop(); + EReference getCGMappingCallBinding_Value(); /** * Returns the meta object for class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp <em>CG Mapping Exp</em>}'. @@ -2390,17 +2559,6 @@ public interface QVTiCGModelPackage extends EPackage { EReference getCGMappingExp_Mapping(); /** - * Returns the meta object for the containment reference list '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getMappingCalls <em>Mapping Calls</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the containment reference list '<em>Mapping Calls</em>'. - * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getMappingCalls() - * @see #getCGMappingExp() - * @generated - */ - EReference getCGMappingExp_MappingCalls(); - - /** * Returns the meta object for the containment reference list '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getPredicates <em>Predicates</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2423,6 +2581,27 @@ public interface QVTiCGModelPackage extends EPackage { EReference getCGMappingExp_RealizedVariables(); /** + * Returns the meta object for the containment reference '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getBody <em>Body</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Body</em>'. + * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp#getBody() + * @see #getCGMappingExp() + * @generated + */ + EReference getCGMappingExp_Body(); + + /** + * Returns the meta object for class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop <em>CG Mapping Loop</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>CG Mapping Loop</em>'. + * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop + * @generated + */ + EClass getCGMappingLoop(); + + /** * Returns the meta object for class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment <em>CG Middle Property Assignment</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2507,6 +2686,27 @@ public interface QVTiCGModelPackage extends EPackage { EReference getCGRealizedVariable_TypedModel(); /** + * Returns the meta object for class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGSequence <em>CG Sequence</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>CG Sequence</em>'. + * @see org.eclipse.qvtd.codegen.qvticgmodel.CGSequence + * @generated + */ + EClass getCGSequence(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGSequence#getStatements <em>Statements</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Statements</em>'. + * @see org.eclipse.qvtd.codegen.qvticgmodel.CGSequence#getStatements() + * @see #getCGSequence() + * @generated + */ + EReference getCGSequence_Statements(); + + /** * Returns the meta object for the reference '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable#getExecutorType <em>Executor Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2813,14 +3013,6 @@ public interface QVTiCGModelPackage extends EPackage { EClass CG_MAPPING_CALL = eINSTANCE.getCGMappingCall(); /** - * The meta object literal for the '<em><b>Mapping Exp</b></em>' container reference feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EReference CG_MAPPING_CALL__MAPPING_EXP = eINSTANCE.getCGMappingCall_MappingExp(); - - /** * The meta object literal for the '<em><b>Mapping Call Bindings</b></em>' containment reference list feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -2839,20 +3031,12 @@ public interface QVTiCGModelPackage extends EPackage { EClass CG_MAPPING_CALL_BINDING = eINSTANCE.getCGMappingCallBinding(); /** - * The meta object literal for the '<em><b>Value Or Values</b></em>' containment reference feature. + * The meta object literal for the '<em><b>Value</b></em>' containment reference feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EReference CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES = eINSTANCE.getCGMappingCallBinding_ValueOrValues(); - - /** - * The meta object literal for the '<em><b>Loop</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute CG_MAPPING_CALL_BINDING__LOOP = eINSTANCE.getCGMappingCallBinding_Loop(); + EReference CG_MAPPING_CALL_BINDING__VALUE = eINSTANCE.getCGMappingCallBinding_Value(); /** * The meta object literal for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl <em>CG Mapping Exp</em>}' class. @@ -2881,28 +3065,38 @@ public interface QVTiCGModelPackage extends EPackage { EReference CG_MAPPING_EXP__MAPPING = eINSTANCE.getCGMappingExp_Mapping(); /** - * The meta object literal for the '<em><b>Mapping Calls</b></em>' containment reference list feature. + * The meta object literal for the '<em><b>Predicates</b></em>' containment reference list feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EReference CG_MAPPING_EXP__MAPPING_CALLS = eINSTANCE.getCGMappingExp_MappingCalls(); + EReference CG_MAPPING_EXP__PREDICATES = eINSTANCE.getCGMappingExp_Predicates(); /** - * The meta object literal for the '<em><b>Predicates</b></em>' containment reference list feature. + * The meta object literal for the '<em><b>Realized Variables</b></em>' containment reference list feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EReference CG_MAPPING_EXP__PREDICATES = eINSTANCE.getCGMappingExp_Predicates(); + EReference CG_MAPPING_EXP__REALIZED_VARIABLES = eINSTANCE.getCGMappingExp_RealizedVariables(); /** - * The meta object literal for the '<em><b>Realized Variables</b></em>' containment reference list feature. + * The meta object literal for the '<em><b>Body</b></em>' containment reference feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EReference CG_MAPPING_EXP__REALIZED_VARIABLES = eINSTANCE.getCGMappingExp_RealizedVariables(); + EReference CG_MAPPING_EXP__BODY = eINSTANCE.getCGMappingExp_Body(); + + /** + * The meta object literal for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingLoopImpl <em>CG Mapping Loop</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingLoopImpl + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGMappingLoop() + * @generated + */ + EClass CG_MAPPING_LOOP = eINSTANCE.getCGMappingLoop(); /** * The meta object literal for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMiddlePropertyAssignmentImpl <em>CG Middle Property Assignment</em>}' class. @@ -2977,6 +3171,24 @@ public interface QVTiCGModelPackage extends EPackage { EReference CG_REALIZED_VARIABLE__TYPED_MODEL = eINSTANCE.getCGRealizedVariable_TypedModel(); /** + * The meta object literal for the '{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGSequenceImpl <em>CG Sequence</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.CGSequenceImpl + * @see org.eclipse.qvtd.codegen.qvticgmodel.impl.QVTiCGModelPackageImpl#getCGSequence() + * @generated + */ + EClass CG_SEQUENCE = eINSTANCE.getCGSequence(); + + /** + * The meta object literal for the '<em><b>Statements</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference CG_SEQUENCE__STATEMENTS = eINSTANCE.getCGSequence_Statements(); + + /** * The meta object literal for the '<em><b>Executor Type</b></em>' reference feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallBindingImpl.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallBindingImpl.java index 1ca9448b3..25223d499 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallBindingImpl.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallBindingImpl.java @@ -31,8 +31,7 @@ import org.eclipse.qvtd.codegen.qvticgmodel.util.QVTiCGModelVisitor; * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingCallBindingImpl#getValueOrValues <em>Value Or Values</em>}</li> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingCallBindingImpl#isLoop <em>Loop</em>}</li> + * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingCallBindingImpl#getValue <em>Value</em>}</li> * </ul> * </p> * @@ -40,34 +39,14 @@ import org.eclipse.qvtd.codegen.qvticgmodel.util.QVTiCGModelVisitor; */ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGMappingCallBinding { /** - * The cached value of the '{@link #getValueOrValues() <em>Value Or Values</em>}' containment reference. + * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getValueOrValues() + * @see #getValue() * @generated * @ordered */ - protected CGValuedElement valueOrValues; - - /** - * The default value of the '{@link #isLoop() <em>Loop</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isLoop() - * @generated - * @ordered - */ - protected static final boolean LOOP_EDEFAULT = false; - - /** - * The cached value of the '{@link #isLoop() <em>Loop</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #isLoop() - * @generated - * @ordered - */ - protected boolean loop = LOOP_EDEFAULT; + protected CGValuedElement value; /** * <!-- begin-user-doc --> @@ -93,8 +72,8 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM * <!-- end-user-doc --> * @generated */ - public CGValuedElement getValueOrValues() { - return valueOrValues; + public CGValuedElement getValue() { + return value; } /** @@ -102,11 +81,11 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM * <!-- end-user-doc --> * @generated */ - public NotificationChain basicSetValueOrValues(CGValuedElement newValueOrValues, NotificationChain msgs) { - CGValuedElement oldValueOrValues = valueOrValues; - valueOrValues = newValueOrValues; + public NotificationChain basicSetValue(CGValuedElement newValue, NotificationChain msgs) { + CGValuedElement oldValue = value; + value = newValue; if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES, oldValueOrValues, newValueOrValues); + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE, oldValue, newValue); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; @@ -117,49 +96,18 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM * <!-- end-user-doc --> * @generated */ - public void setValueOrValues(CGValuedElement newValueOrValues) { - if (newValueOrValues != valueOrValues) { + public void setValue(CGValuedElement newValue) { + if (newValue != value) { NotificationChain msgs = null; - if (valueOrValues != null) - msgs = ((InternalEObject)valueOrValues).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES, null, msgs); - if (newValueOrValues != null) - msgs = ((InternalEObject)newValueOrValues).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES, null, msgs); - msgs = basicSetValueOrValues(newValueOrValues, msgs); + if (value != null) + msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE, null, msgs); + if (newValue != null) + msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE, null, msgs); + msgs = basicSetValue(newValue, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES, newValueOrValues, newValueOrValues)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean isLoop() { - return loop; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setLoop(boolean newLoop) { - boolean oldLoop = loop; - loop = newLoop; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__LOOP, oldLoop, loop)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String toString() { - return super.toString(); + eNotify(new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE, newValue, newValue)); } /** @@ -170,8 +118,8 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES: - return basicSetValueOrValues(null, msgs); + case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE: + return basicSetValue(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -184,10 +132,8 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES: - return getValueOrValues(); - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__LOOP: - return isLoop(); + case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE: + return getValue(); } return super.eGet(featureID, resolve, coreType); } @@ -200,11 +146,8 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES: - setValueOrValues((CGValuedElement)newValue); - return; - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__LOOP: - setLoop((Boolean)newValue); + case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE: + setValue((CGValuedElement)newValue); return; } super.eSet(featureID, newValue); @@ -218,11 +161,8 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM @Override public void eUnset(int featureID) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES: - setValueOrValues((CGValuedElement)null); - return; - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__LOOP: - setLoop(LOOP_EDEFAULT); + case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE: + setValue((CGValuedElement)null); return; } super.eUnset(featureID); @@ -236,10 +176,8 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM @Override public boolean eIsSet(int featureID) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES: - return valueOrValues != null; - case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__LOOP: - return loop != LOOP_EDEFAULT; + case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING__VALUE: + return value != null; } return super.eIsSet(featureID); } @@ -260,7 +198,7 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM */ @Override public boolean isBoxed() { - return (valueOrValues != null) && valueOrValues.isBoxed(); + return (value != null) && value.isBoxed(); } /** @@ -300,7 +238,7 @@ public class CGMappingCallBindingImpl extends CGValuedElementImpl implements CGM */ @Override public boolean isUnboxed() { - return (valueOrValues != null) && valueOrValues.isUnboxed(); + return (value != null) && value.isUnboxed(); } } //CGMappingCallBindingImpl diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallImpl.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallImpl.java index bb5f9119a..ec485cfe3 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallImpl.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingCallImpl.java @@ -13,14 +13,11 @@ package org.eclipse.qvtd.codegen.qvticgmodel.impl; import java.util.Collection; import java.util.List; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; @@ -29,7 +26,6 @@ import org.eclipse.ocl.examples.codegen.cgmodel.impl.CGValuedElementImpl; import org.eclipse.ocl.examples.codegen.cgmodel.util.CGModelVisitor; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; -import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; import org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage; import org.eclipse.qvtd.codegen.qvticgmodel.util.QVTiCGModelVisitor; @@ -40,7 +36,6 @@ import org.eclipse.qvtd.codegen.qvticgmodel.util.QVTiCGModelVisitor; * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingCallImpl#getMappingExp <em>Mapping Exp</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingCallImpl#getMappingCallBindings <em>Mapping Call Bindings</em>}</li> * </ul> * </p> @@ -82,47 +77,6 @@ public class CGMappingCallImpl extends CGValuedElementImpl implements CGMappingC * <!-- end-user-doc --> * @generated */ - public CGMappingExp getMappingExp() { - if (eContainerFeatureID() != QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP) return null; - return (CGMappingExp)eInternalContainer(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain basicSetMappingExp(CGMappingExp newMappingExp, NotificationChain msgs) { - msgs = eBasicSetContainer((InternalEObject)newMappingExp, QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP, msgs); - return msgs; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setMappingExp(CGMappingExp newMappingExp) { - if (newMappingExp != eInternalContainer() || (eContainerFeatureID() != QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP && newMappingExp != null)) { - if (EcoreUtil.isAncestor(this, newMappingExp)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newMappingExp != null) - msgs = ((InternalEObject)newMappingExp).eInverseAdd(this, QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS, CGMappingExp.class, msgs); - msgs = basicSetMappingExp(newMappingExp, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP, newMappingExp, newMappingExp)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ public List<CGMappingCallBinding> getMappingCallBindings() { if (mappingCallBindings == null) { mappingCallBindings = new EObjectContainmentEList<CGMappingCallBinding>(CGMappingCallBinding.class, this, QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_CALL_BINDINGS); @@ -136,26 +90,8 @@ public class CGMappingCallImpl extends CGValuedElementImpl implements CGMappingC * @generated */ @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetMappingExp((CGMappingExp)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP: - return basicSetMappingExp(null, msgs); case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_CALL_BINDINGS: return ((InternalEList<?>)getMappingCallBindings()).basicRemove(otherEnd, msgs); } @@ -168,24 +104,8 @@ public class CGMappingCallImpl extends CGValuedElementImpl implements CGMappingC * @generated */ @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { - switch (eContainerFeatureID()) { - case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP: - return eInternalContainer().eInverseRemove(this, QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS, CGMappingExp.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP: - return getMappingExp(); case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_CALL_BINDINGS: return getMappingCallBindings(); } @@ -201,9 +121,6 @@ public class CGMappingCallImpl extends CGValuedElementImpl implements CGMappingC @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP: - setMappingExp((CGMappingExp)newValue); - return; case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_CALL_BINDINGS: getMappingCallBindings().clear(); getMappingCallBindings().addAll((Collection<? extends CGMappingCallBinding>)newValue); @@ -220,9 +137,6 @@ public class CGMappingCallImpl extends CGValuedElementImpl implements CGMappingC @Override public void eUnset(int featureID) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP: - setMappingExp((CGMappingExp)null); - return; case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_CALL_BINDINGS: getMappingCallBindings().clear(); return; @@ -238,8 +152,6 @@ public class CGMappingCallImpl extends CGValuedElementImpl implements CGMappingC @Override public boolean eIsSet(int featureID) { switch (featureID) { - case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP: - return getMappingExp() != null; case QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_CALL_BINDINGS: return mappingCallBindings != null && !mappingCallBindings.isEmpty(); } diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingExpImpl.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingExpImpl.java index 16eb5b1ad..f0e5b6793 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingExpImpl.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingExpImpl.java @@ -13,10 +13,12 @@ package org.eclipse.qvtd.codegen.qvticgmodel.impl; import java.util.Collection; import java.util.List; +import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.InternalEList; @@ -27,7 +29,6 @@ import org.eclipse.ocl.examples.codegen.cgmodel.impl.CGValuedElementImpl; import org.eclipse.ocl.examples.codegen.cgmodel.util.CGModelVisitor; import org.eclipse.ocl.examples.domain.ids.TypeId; import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; -import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; @@ -44,9 +45,9 @@ import org.eclipse.qvtd.codegen.utilities.QVTiEquivalenceUtils; * <ul> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl#getAssignments <em>Assignments</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl#getMapping <em>Mapping</em>}</li> - * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl#getMappingCalls <em>Mapping Calls</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl#getPredicates <em>Predicates</em>}</li> * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl#getRealizedVariables <em>Realized Variables</em>}</li> + * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGMappingExpImpl#getBody <em>Body</em>}</li> * </ul> * </p> * @@ -64,34 +65,34 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx protected EList<CGPropertyAssignment> assignments; /** - * The cached value of the '{@link #getMappingCalls() <em>Mapping Calls</em>}' containment reference list. + * The cached value of the '{@link #getPredicates() <em>Predicates</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getMappingCalls() + * @see #getPredicates() * @generated * @ordered */ - protected EList<CGMappingCall> mappingCalls; + protected EList<CGPredicate> predicates; /** - * The cached value of the '{@link #getPredicates() <em>Predicates</em>}' containment reference list. + * The cached value of the '{@link #getRealizedVariables() <em>Realized Variables</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getPredicates() + * @see #getRealizedVariables() * @generated * @ordered */ - protected EList<CGPredicate> predicates; + protected EList<CGValuedElement> realizedVariables; /** - * The cached value of the '{@link #getRealizedVariables() <em>Realized Variables</em>}' containment reference list. + * The cached value of the '{@link #getBody() <em>Body</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see #getRealizedVariables() + * @see #getBody() * @generated * @ordered */ - protected EList<CGValuedElement> realizedVariables; + protected CGValuedElement body; /** * <!-- begin-user-doc --> @@ -151,18 +152,6 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx * <!-- end-user-doc --> * @generated */ - public List<CGMappingCall> getMappingCalls() { - if (mappingCalls == null) { - mappingCalls = new EObjectContainmentWithInverseEList<CGMappingCall>(CGMappingCall.class, this, QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS, QVTiCGModelPackage.CG_MAPPING_CALL__MAPPING_EXP); - } - return mappingCalls; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ public List<CGPredicate> getPredicates() { if (predicates == null) { predicates = new EObjectContainmentWithInverseEList<CGPredicate>(CGPredicate.class, this, QVTiCGModelPackage.CG_MAPPING_EXP__PREDICATES, QVTiCGModelPackage.CG_PREDICATE__MAPPING_EXP); @@ -187,14 +176,55 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx * <!-- end-user-doc --> * @generated */ + public CGValuedElement getBody() { + return body; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetBody(CGValuedElement newBody, NotificationChain msgs) { + CGValuedElement oldBody = body; + body = newBody; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_EXP__BODY, oldBody, newBody); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setBody(CGValuedElement newBody) { + if (newBody != body) { + NotificationChain msgs = null; + if (body != null) + msgs = ((InternalEObject)body).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - QVTiCGModelPackage.CG_MAPPING_EXP__BODY, null, msgs); + if (newBody != null) + msgs = ((InternalEObject)newBody).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - QVTiCGModelPackage.CG_MAPPING_EXP__BODY, null, msgs); + msgs = basicSetBody(newBody, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, QVTiCGModelPackage.CG_MAPPING_EXP__BODY, newBody, newBody)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case QVTiCGModelPackage.CG_MAPPING_EXP__ASSIGNMENTS: return ((InternalEList<InternalEObject>)(InternalEList<?>)getAssignments()).basicAdd(otherEnd, msgs); - case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS: - return ((InternalEList<InternalEObject>)(InternalEList<?>)getMappingCalls()).basicAdd(otherEnd, msgs); case QVTiCGModelPackage.CG_MAPPING_EXP__PREDICATES: return ((InternalEList<InternalEObject>)(InternalEList<?>)getPredicates()).basicAdd(otherEnd, msgs); } @@ -211,12 +241,12 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx switch (featureID) { case QVTiCGModelPackage.CG_MAPPING_EXP__ASSIGNMENTS: return ((InternalEList<?>)getAssignments()).basicRemove(otherEnd, msgs); - case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS: - return ((InternalEList<?>)getMappingCalls()).basicRemove(otherEnd, msgs); case QVTiCGModelPackage.CG_MAPPING_EXP__PREDICATES: return ((InternalEList<?>)getPredicates()).basicRemove(otherEnd, msgs); case QVTiCGModelPackage.CG_MAPPING_EXP__REALIZED_VARIABLES: return ((InternalEList<?>)getRealizedVariables()).basicRemove(otherEnd, msgs); + case QVTiCGModelPackage.CG_MAPPING_EXP__BODY: + return basicSetBody(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -233,12 +263,12 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx return getAssignments(); case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING: return getMapping(); - case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS: - return getMappingCalls(); case QVTiCGModelPackage.CG_MAPPING_EXP__PREDICATES: return getPredicates(); case QVTiCGModelPackage.CG_MAPPING_EXP__REALIZED_VARIABLES: return getRealizedVariables(); + case QVTiCGModelPackage.CG_MAPPING_EXP__BODY: + return getBody(); } return super.eGet(featureID, resolve, coreType); } @@ -259,10 +289,6 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING: setMapping((CGMapping)newValue); return; - case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS: - getMappingCalls().clear(); - getMappingCalls().addAll((Collection<? extends CGMappingCall>)newValue); - return; case QVTiCGModelPackage.CG_MAPPING_EXP__PREDICATES: getPredicates().clear(); getPredicates().addAll((Collection<? extends CGPredicate>)newValue); @@ -271,6 +297,9 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx getRealizedVariables().clear(); getRealizedVariables().addAll((Collection<? extends CGValuedElement>)newValue); return; + case QVTiCGModelPackage.CG_MAPPING_EXP__BODY: + setBody((CGValuedElement)newValue); + return; } super.eSet(featureID, newValue); } @@ -289,15 +318,15 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING: setMapping((CGMapping)null); return; - case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS: - getMappingCalls().clear(); - return; case QVTiCGModelPackage.CG_MAPPING_EXP__PREDICATES: getPredicates().clear(); return; case QVTiCGModelPackage.CG_MAPPING_EXP__REALIZED_VARIABLES: getRealizedVariables().clear(); return; + case QVTiCGModelPackage.CG_MAPPING_EXP__BODY: + setBody((CGValuedElement)null); + return; } super.eUnset(featureID); } @@ -314,12 +343,12 @@ public class CGMappingExpImpl extends CGValuedElementImpl implements CGMappingEx return assignments != null && !assignments.isEmpty(); case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING: return getMapping() != null; - case QVTiCGModelPackage.CG_MAPPING_EXP__MAPPING_CALLS: - return mappingCalls != null && !mappingCalls.isEmpty(); case QVTiCGModelPackage.CG_MAPPING_EXP__PREDICATES: return predicates != null && !predicates.isEmpty(); case QVTiCGModelPackage.CG_MAPPING_EXP__REALIZED_VARIABLES: return realizedVariables != null && !realizedVariables.isEmpty(); + case QVTiCGModelPackage.CG_MAPPING_EXP__BODY: + return body != null; } return super.eIsSet(featureID); } diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingLoopImpl.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingLoopImpl.java new file mode 100644 index 000000000..d503605d4 --- /dev/null +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGMappingLoopImpl.java @@ -0,0 +1,85 @@ +/******************************************************************************* + * Copyright (c) 2014 E.D.Willink and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * E.D.Willink - Initial API and implementation + *******************************************************************************/ +package org.eclipse.qvtd.codegen.qvticgmodel.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; +import org.eclipse.ocl.examples.codegen.cgmodel.impl.CGIterationCallExpImpl; +import org.eclipse.ocl.examples.codegen.cgmodel.util.CGModelVisitor; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; +import org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage; +import org.eclipse.qvtd.codegen.qvticgmodel.util.QVTiCGModelVisitor; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>CG Mapping Loop</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class CGMappingLoopImpl extends CGIterationCallExpImpl implements CGMappingLoop { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CGMappingLoopImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return QVTiCGModelPackage.Literals.CG_MAPPING_LOOP; + } + + /** + * {@inheritDoc} + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public @Nullable <R> R accept(@NonNull CGModelVisitor<R> visitor) { + return (R) ((QVTiCGModelVisitor<?>)visitor).visitCGMappingLoop(this); + } + + /** + * {@inheritDoc} + * @generated + */ + @Override + public boolean isCommonable() { + return false; + } + + /** + * {@inheritDoc} + * @generated + */ + public @Override + @Nullable Boolean isEquivalentToInternal(@NonNull CGValuedElement thatValue) { + if (this == thatValue) { + return Boolean.TRUE; + } + else { + return Boolean.FALSE; + } + } + +} //CGMappingLoopImpl diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGSequenceImpl.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGSequenceImpl.java new file mode 100644 index 000000000..5d50ba18e --- /dev/null +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/CGSequenceImpl.java @@ -0,0 +1,192 @@ +/******************************************************************************* + * Copyright (c) 2014 E.D.Willink and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * E.D.Willink - Initial API and implementation + *******************************************************************************/ +package org.eclipse.qvtd.codegen.qvticgmodel.impl; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; + +import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; + +import org.eclipse.ocl.examples.codegen.cgmodel.impl.CGValuedElementImpl; + +import org.eclipse.ocl.examples.codegen.cgmodel.util.CGModelVisitor; + +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; +import org.eclipse.qvtd.codegen.qvticgmodel.QVTiCGModelPackage; + +import org.eclipse.qvtd.codegen.qvticgmodel.util.QVTiCGModelVisitor; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>CG Sequence</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.qvtd.codegen.qvticgmodel.impl.CGSequenceImpl#getStatements <em>Statements</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CGSequenceImpl extends CGValuedElementImpl implements CGSequence { + /** + * The cached value of the '{@link #getStatements() <em>Statements</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStatements() + * @generated + * @ordered + */ + protected EList<CGValuedElement> statements; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CGSequenceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return QVTiCGModelPackage.Literals.CG_SEQUENCE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public List<CGValuedElement> getStatements() { + if (statements == null) { + statements = new EObjectContainmentEList<CGValuedElement>(CGValuedElement.class, this, QVTiCGModelPackage.CG_SEQUENCE__STATEMENTS); + } + return statements; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case QVTiCGModelPackage.CG_SEQUENCE__STATEMENTS: + return ((InternalEList<?>)getStatements()).basicRemove(otherEnd, 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 QVTiCGModelPackage.CG_SEQUENCE__STATEMENTS: + return getStatements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case QVTiCGModelPackage.CG_SEQUENCE__STATEMENTS: + getStatements().clear(); + getStatements().addAll((Collection<? extends CGValuedElement>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case QVTiCGModelPackage.CG_SEQUENCE__STATEMENTS: + getStatements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case QVTiCGModelPackage.CG_SEQUENCE__STATEMENTS: + return statements != null && !statements.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * {@inheritDoc} + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public @Nullable <R> R accept(@NonNull CGModelVisitor<R> visitor) { + return (R) ((QVTiCGModelVisitor<?>)visitor).visitCGSequence(this); + } + + /** + * {@inheritDoc} + * @generated + */ + public @Nullable Boolean isEquivalentToInternal(@NonNull CGValuedElement thatValue) { + if (this == thatValue) { + return Boolean.TRUE; + } + else { + return Boolean.FALSE; + } + } + +} //CGSequenceImpl diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelFactoryImpl.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelFactoryImpl.java index 44f9192f8..dd6acc1d3 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelFactoryImpl.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelFactoryImpl.java @@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.qvtd.codegen.qvticgmodel.*; import org.eclipse.qvtd.codegen.qvticgmodel.CGEcorePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGEcoreRealizedVariable; import org.eclipse.qvtd.codegen.qvticgmodel.CGFunction; @@ -91,11 +92,13 @@ public class QVTiCGModelFactoryImpl extends EFactoryImpl implements QVTiCGModelF case QVTiCGModelPackage.CG_MAPPING_CALL: return createCGMappingCall(); case QVTiCGModelPackage.CG_MAPPING_CALL_BINDING: return createCGMappingCallBinding(); case QVTiCGModelPackage.CG_MAPPING_EXP: return createCGMappingExp(); + case QVTiCGModelPackage.CG_MAPPING_LOOP: return createCGMappingLoop(); case QVTiCGModelPackage.CG_MIDDLE_PROPERTY_ASSIGNMENT: return createCGMiddlePropertyAssignment(); case QVTiCGModelPackage.CG_MIDDLE_PROPERTY_CALL_EXP: return createCGMiddlePropertyCallExp(); case QVTiCGModelPackage.CG_PREDICATE: return createCGPredicate(); case QVTiCGModelPackage.CG_PROPERTY_ASSIGNMENT: return createCGPropertyAssignment(); case QVTiCGModelPackage.CG_REALIZED_VARIABLE: return createCGRealizedVariable(); + case QVTiCGModelPackage.CG_SEQUENCE: return createCGSequence(); case QVTiCGModelPackage.CG_TRANSFORMATION: return createCGTransformation(); case QVTiCGModelPackage.CG_TYPED_MODEL: return createCGTypedModel(); case QVTiCGModelPackage.CG_VARIABLE_PREDICATE: return createCGVariablePredicate(); @@ -209,6 +212,16 @@ public class QVTiCGModelFactoryImpl extends EFactoryImpl implements QVTiCGModelF * <!-- end-user-doc --> * @generated */ + public CGMappingLoop createCGMappingLoop() { + CGMappingLoopImpl cgMappingLoop = new CGMappingLoopImpl(); + return cgMappingLoop; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public @NonNull CGMiddlePropertyAssignment createCGMiddlePropertyAssignment() { CGMiddlePropertyAssignmentImpl cgMiddlePropertyAssignment = new CGMiddlePropertyAssignmentImpl(); return cgMiddlePropertyAssignment; @@ -259,6 +272,16 @@ public class QVTiCGModelFactoryImpl extends EFactoryImpl implements QVTiCGModelF * <!-- end-user-doc --> * @generated */ + public CGSequence createCGSequence() { + CGSequenceImpl cgSequence = new CGSequenceImpl(); + return cgSequence; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public @NonNull CGTransformation createCGTransformation() { CGTransformationImpl cgTransformation = new CGTransformationImpl(); return cgTransformation; diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelPackageImpl.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelPackageImpl.java index 24045bcd7..a1ea5234c 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelPackageImpl.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/impl/QVTiCGModelPackageImpl.java @@ -26,11 +26,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -119,6 +121,13 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ + private EClass cgMappingLoopEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EClass cgMiddlePropertyAssignmentEClass = null; /** @@ -154,6 +163,13 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ + private EClass cgSequenceEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EClass cgTransformationEClass = null; /** @@ -392,17 +408,8 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ - public EReference getCGMappingCall_MappingExp() { - return (EReference)cgMappingCallEClass.getEStructuralFeatures().get(0); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ public EReference getCGMappingCall_MappingCallBindings() { - return (EReference)cgMappingCallEClass.getEStructuralFeatures().get(1); + return (EReference)cgMappingCallEClass.getEStructuralFeatures().get(0); } /** @@ -419,7 +426,7 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ - public EReference getCGMappingCallBinding_ValueOrValues() { + public EReference getCGMappingCallBinding_Value() { return (EReference)cgMappingCallBindingEClass.getEStructuralFeatures().get(0); } @@ -428,15 +435,6 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ - public EAttribute getCGMappingCallBinding_Loop() { - return (EAttribute)cgMappingCallBindingEClass.getEStructuralFeatures().get(1); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ public EClass getCGMappingExp() { return cgMappingExpEClass; } @@ -464,7 +462,7 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ - public EReference getCGMappingExp_MappingCalls() { + public EReference getCGMappingExp_Predicates() { return (EReference)cgMappingExpEClass.getEStructuralFeatures().get(2); } @@ -473,7 +471,7 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ - public EReference getCGMappingExp_Predicates() { + public EReference getCGMappingExp_RealizedVariables() { return (EReference)cgMappingExpEClass.getEStructuralFeatures().get(3); } @@ -482,7 +480,7 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ - public EReference getCGMappingExp_RealizedVariables() { + public EReference getCGMappingExp_Body() { return (EReference)cgMappingExpEClass.getEStructuralFeatures().get(4); } @@ -491,6 +489,15 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ + public EClass getCGMappingLoop() { + return cgMappingLoopEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EClass getCGMiddlePropertyAssignment() { return cgMiddlePropertyAssignmentEClass; } @@ -617,6 +624,24 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP * <!-- end-user-doc --> * @generated */ + public EClass getCGSequence() { + return cgSequenceEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getCGSequence_Statements() { + return (EReference)cgSequenceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EReference getCGRealizedVariable_ExecutorType() { return (EReference)cgRealizedVariableEClass.getEStructuralFeatures().get(0); } @@ -745,19 +770,19 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP createEReference(cgMappingEClass, CG_MAPPING__TRANSFORMATION); cgMappingCallEClass = createEClass(CG_MAPPING_CALL); - createEReference(cgMappingCallEClass, CG_MAPPING_CALL__MAPPING_EXP); createEReference(cgMappingCallEClass, CG_MAPPING_CALL__MAPPING_CALL_BINDINGS); cgMappingCallBindingEClass = createEClass(CG_MAPPING_CALL_BINDING); - createEReference(cgMappingCallBindingEClass, CG_MAPPING_CALL_BINDING__VALUE_OR_VALUES); - createEAttribute(cgMappingCallBindingEClass, CG_MAPPING_CALL_BINDING__LOOP); + createEReference(cgMappingCallBindingEClass, CG_MAPPING_CALL_BINDING__VALUE); cgMappingExpEClass = createEClass(CG_MAPPING_EXP); createEReference(cgMappingExpEClass, CG_MAPPING_EXP__ASSIGNMENTS); createEReference(cgMappingExpEClass, CG_MAPPING_EXP__MAPPING); - createEReference(cgMappingExpEClass, CG_MAPPING_EXP__MAPPING_CALLS); createEReference(cgMappingExpEClass, CG_MAPPING_EXP__PREDICATES); createEReference(cgMappingExpEClass, CG_MAPPING_EXP__REALIZED_VARIABLES); + createEReference(cgMappingExpEClass, CG_MAPPING_EXP__BODY); + + cgMappingLoopEClass = createEClass(CG_MAPPING_LOOP); cgMiddlePropertyAssignmentEClass = createEClass(CG_MIDDLE_PROPERTY_ASSIGNMENT); @@ -779,6 +804,9 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP createEReference(cgRealizedVariableEClass, CG_REALIZED_VARIABLE__EXECUTOR_TYPE); createEReference(cgRealizedVariableEClass, CG_REALIZED_VARIABLE__TYPED_MODEL); + cgSequenceEClass = createEClass(CG_SEQUENCE); + createEReference(cgSequenceEClass, CG_SEQUENCE__STATEMENTS); + cgTransformationEClass = createEClass(CG_TRANSFORMATION); createEReference(cgTransformationEClass, CG_TRANSFORMATION__MAPPINGS); createEReference(cgTransformationEClass, CG_TRANSFORMATION__TYPED_MODELS); @@ -832,11 +860,13 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP cgMappingCallEClass.getESuperTypes().add(theCGModelPackage.getCGValuedElement()); cgMappingCallBindingEClass.getESuperTypes().add(theCGModelPackage.getCGValuedElement()); cgMappingExpEClass.getESuperTypes().add(theCGModelPackage.getCGValuedElement()); + cgMappingLoopEClass.getESuperTypes().add(theCGModelPackage.getCGIterationCallExp()); cgMiddlePropertyAssignmentEClass.getESuperTypes().add(this.getCGEcorePropertyAssignment()); cgMiddlePropertyCallExpEClass.getESuperTypes().add(theCGModelPackage.getCGOppositePropertyCallExp()); cgPredicateEClass.getESuperTypes().add(theCGModelPackage.getCGValuedElement()); cgPropertyAssignmentEClass.getESuperTypes().add(theCGModelPackage.getCGValuedElement()); cgRealizedVariableEClass.getESuperTypes().add(theCGModelPackage.getCGVariable()); + cgSequenceEClass.getESuperTypes().add(theCGModelPackage.getCGValuedElement()); cgTransformationEClass.getESuperTypes().add(theCGModelPackage.getCGClass()); cgTypedModelEClass.getESuperTypes().add(theCGModelPackage.getCGNamedElement()); cgVariablePredicateEClass.getESuperTypes().add(this.getCGPredicate()); @@ -866,19 +896,19 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP initEReference(getCGMapping_Transformation(), this.getCGTransformation(), this.getCGTransformation_Mappings(), "transformation", null, 1, 1, CGMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(cgMappingCallEClass, CGMappingCall.class, "CGMappingCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCGMappingCall_MappingExp(), this.getCGMappingExp(), this.getCGMappingExp_MappingCalls(), "mappingExp", null, 1, 1, CGMappingCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCGMappingCall_MappingCallBindings(), this.getCGMappingCallBinding(), null, "mappingCallBindings", null, 0, -1, CGMappingCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(cgMappingCallBindingEClass, CGMappingCallBinding.class, "CGMappingCallBinding", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCGMappingCallBinding_ValueOrValues(), theCGModelPackage.getCGValuedElement(), null, "valueOrValues", null, 1, 1, CGMappingCallBinding.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getCGMappingCallBinding_Loop(), ecorePackage.getEBoolean(), "loop", "false", 1, 1, CGMappingCallBinding.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCGMappingCallBinding_Value(), theCGModelPackage.getCGValuedElement(), null, "value", null, 1, 1, CGMappingCallBinding.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(cgMappingExpEClass, CGMappingExp.class, "CGMappingExp", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getCGMappingExp_Assignments(), this.getCGPropertyAssignment(), this.getCGPropertyAssignment_MappingExp(), "assignments", null, 0, -1, CGMappingExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCGMappingExp_Mapping(), this.getCGMapping(), null, "mapping", null, 1, 1, CGMappingExp.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getCGMappingExp_MappingCalls(), this.getCGMappingCall(), this.getCGMappingCall_MappingExp(), "mappingCalls", null, 0, -1, CGMappingExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCGMappingExp_Predicates(), this.getCGPredicate(), this.getCGPredicate_MappingExp(), "predicates", null, 0, -1, CGMappingExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCGMappingExp_RealizedVariables(), theCGModelPackage.getCGValuedElement(), null, "realizedVariables", null, 0, -1, CGMappingExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCGMappingExp_Body(), theCGModelPackage.getCGValuedElement(), null, "body", null, 0, 1, CGMappingExp.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(cgMappingLoopEClass, CGMappingLoop.class, "CGMappingLoop", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(cgMiddlePropertyAssignmentEClass, CGMiddlePropertyAssignment.class, "CGMiddlePropertyAssignment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -900,6 +930,9 @@ public class QVTiCGModelPackageImpl extends EPackageImpl implements QVTiCGModelP initEReference(getCGRealizedVariable_ExecutorType(), theCGModelPackage.getCGExecutorType(), null, "executorType", null, 1, 1, CGRealizedVariable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCGRealizedVariable_TypedModel(), this.getCGTypedModel(), null, "typedModel", null, 1, 1, CGRealizedVariable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(cgSequenceEClass, CGSequence.class, "CGSequence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCGSequence_Statements(), theCGModelPackage.getCGValuedElement(), null, "statements", null, 0, -1, CGSequence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(cgTransformationEClass, CGTransformation.class, "CGTransformation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getCGTransformation_Mappings(), this.getCGMapping(), this.getCGMapping_Transformation(), "mappings", null, 1, -1, CGTransformation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCGTransformation_TypedModels(), this.getCGTypedModel(), this.getCGTypedModel_Transformation(), "typedModels", null, 0, -1, CGTransformation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractExtendingQVTiCGModelVisitor.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractExtendingQVTiCGModelVisitor.java index be22111f1..4a73da5bf 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractExtendingQVTiCGModelVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractExtendingQVTiCGModelVisitor.java @@ -80,6 +80,10 @@ public abstract class AbstractExtendingQVTiCGModelVisitor<R, C> return visitCGValuedElement(object); } + public @Nullable R visitCGMappingLoop(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public @Nullable R visitCGMiddlePropertyAssignment(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment object) { return visitCGEcorePropertyAssignment(object); } @@ -100,6 +104,10 @@ public abstract class AbstractExtendingQVTiCGModelVisitor<R, C> return visitCGVariable(object); } + public @Nullable R visitCGSequence(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGSequence object) { + return visitCGValuedElement(object); + } + public @Nullable R visitCGTransformation(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNonNullExtendingQVTiCGModelVisitor.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNonNullExtendingQVTiCGModelVisitor.java index 8316b6d35..011239312 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNonNullExtendingQVTiCGModelVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNonNullExtendingQVTiCGModelVisitor.java @@ -80,6 +80,10 @@ public abstract class AbstractNonNullExtendingQVTiCGModelVisitor<R, C> return visitCGValuedElement(object); } + public @NonNull R visitCGMappingLoop(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public @NonNull R visitCGMiddlePropertyAssignment(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment object) { return visitCGEcorePropertyAssignment(object); } @@ -100,6 +104,10 @@ public abstract class AbstractNonNullExtendingQVTiCGModelVisitor<R, C> return visitCGVariable(object); } + public @NonNull R visitCGSequence(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGSequence object) { + return visitCGValuedElement(object); + } + public @NonNull R visitCGTransformation(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNullQVTiCGModelVisitor.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNullQVTiCGModelVisitor.java index d58e555cf..a094c4329 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNullQVTiCGModelVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/AbstractNullQVTiCGModelVisitor.java @@ -76,6 +76,10 @@ public abstract class AbstractNullQVTiCGModelVisitor<R, C> return null; } + public @Nullable R visitCGMappingLoop(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop object) { + return null; + } + public @Nullable R visitCGMiddlePropertyAssignment(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment object) { return null; } @@ -96,6 +100,10 @@ public abstract class AbstractNullQVTiCGModelVisitor<R, C> return null; } + public @Nullable R visitCGSequence(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGSequence object) { + return null; + } + public @Nullable R visitCGTransformation(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation object) { return null; } diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelAdapterFactory.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelAdapterFactory.java index 9ba643b14..da94b357b 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelAdapterFactory.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelAdapterFactory.java @@ -18,6 +18,7 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGCallExp; import org.eclipse.ocl.examples.codegen.cgmodel.CGCallable; import org.eclipse.ocl.examples.codegen.cgmodel.CGClass; import org.eclipse.ocl.examples.codegen.cgmodel.CGElement; +import org.eclipse.ocl.examples.codegen.cgmodel.CGIterationCallExp; import org.eclipse.ocl.examples.codegen.cgmodel.CGNamedElement; import org.eclipse.ocl.examples.codegen.cgmodel.CGNavigationCallExp; import org.eclipse.ocl.examples.codegen.cgmodel.CGOperation; @@ -142,6 +143,10 @@ public class QVTiCGModelAdapterFactory extends AdapterFactoryImpl { return createCGMappingExpAdapter(); } @Override + public Adapter caseCGMappingLoop(CGMappingLoop object) { + return createCGMappingLoopAdapter(); + } + @Override public Adapter caseCGMiddlePropertyAssignment(CGMiddlePropertyAssignment object) { return createCGMiddlePropertyAssignmentAdapter(); } @@ -162,6 +167,10 @@ public class QVTiCGModelAdapterFactory extends AdapterFactoryImpl { return createCGRealizedVariableAdapter(); } @Override + public Adapter caseCGSequence(CGSequence object) { + return createCGSequenceAdapter(); + } + @Override public Adapter caseCGTransformation(CGTransformation object) { return createCGTransformationAdapter(); } @@ -218,6 +227,10 @@ public class QVTiCGModelAdapterFactory extends AdapterFactoryImpl { return createCGParameterAdapter(); } @Override + public Adapter caseCGIterationCallExp(CGIterationCallExp object) { + return createCGIterationCallExpAdapter(); + } + @Override public Adapter caseCGNavigationCallExp(CGNavigationCallExp object) { return createCGNavigationCallExpAdapter(); } @@ -446,6 +459,20 @@ public class QVTiCGModelAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop <em>CG Mapping Loop</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop + * @generated + */ + public Adapter createCGMappingLoopAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment <em>CG Middle Property Assignment</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; @@ -502,6 +529,20 @@ public class QVTiCGModelAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.qvtd.codegen.qvticgmodel.CGSequence <em>CG Sequence</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.qvtd.codegen.qvticgmodel.CGSequence + * @generated + */ + public Adapter createCGSequenceAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGElement <em>CG Element</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; @@ -628,6 +669,20 @@ public class QVTiCGModelAdapterFactory extends AdapterFactoryImpl { } /** + * Creates a new adapter for an object of class '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGIterationCallExp <em>CG Iteration Call Exp</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.ocl.examples.codegen.cgmodel.CGIterationCallExp + * @generated + */ + public Adapter createCGIterationCallExpAdapter() { + return null; + } + + /** * Creates a new adapter for an object of class '{@link org.eclipse.ocl.examples.codegen.cgmodel.CGNavigationCallExp <em>CG Navigation Call Exp</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelSwitch.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelSwitch.java index ebf409b74..b7731e7bc 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelSwitch.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelSwitch.java @@ -17,6 +17,7 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGCallExp; import org.eclipse.ocl.examples.codegen.cgmodel.CGCallable; import org.eclipse.ocl.examples.codegen.cgmodel.CGClass; import org.eclipse.ocl.examples.codegen.cgmodel.CGElement; +import org.eclipse.ocl.examples.codegen.cgmodel.CGIterationCallExp; import org.eclipse.ocl.examples.codegen.cgmodel.CGNamedElement; import org.eclipse.ocl.examples.codegen.cgmodel.CGNavigationCallExp; import org.eclipse.ocl.examples.codegen.cgmodel.CGOperation; @@ -220,6 +221,19 @@ public class QVTiCGModelSwitch<T> extends Switch<T> { if (result == null) result = defaultCase(theEObject); return result; } + case QVTiCGModelPackage.CG_MAPPING_LOOP: { + CGMappingLoop cgMappingLoop = (CGMappingLoop)theEObject; + T result = caseCGMappingLoop(cgMappingLoop); + if (result == null) result = caseCGIterationCallExp(cgMappingLoop); + if (result == null) result = caseCGCallExp(cgMappingLoop); + if (result == null) result = caseCGValuedElement(cgMappingLoop); + if (result == null) result = caseCGTypedElement(cgMappingLoop); + if (result == null) result = caseCGNamedElement(cgMappingLoop); + if (result == null) result = caseCGElement(cgMappingLoop); + if (result == null) result = caseNameable(cgMappingLoop); + if (result == null) result = defaultCase(theEObject); + return result; + } case QVTiCGModelPackage.CG_MIDDLE_PROPERTY_ASSIGNMENT: { CGMiddlePropertyAssignment cgMiddlePropertyAssignment = (CGMiddlePropertyAssignment)theEObject; T result = caseCGMiddlePropertyAssignment(cgMiddlePropertyAssignment); @@ -281,6 +295,17 @@ public class QVTiCGModelSwitch<T> extends Switch<T> { if (result == null) result = defaultCase(theEObject); return result; } + case QVTiCGModelPackage.CG_SEQUENCE: { + CGSequence cgSequence = (CGSequence)theEObject; + T result = caseCGSequence(cgSequence); + if (result == null) result = caseCGValuedElement(cgSequence); + if (result == null) result = caseCGTypedElement(cgSequence); + if (result == null) result = caseCGNamedElement(cgSequence); + if (result == null) result = caseCGElement(cgSequence); + if (result == null) result = caseNameable(cgSequence); + if (result == null) result = defaultCase(theEObject); + return result; + } case QVTiCGModelPackage.CG_TRANSFORMATION: { CGTransformation cgTransformation = (CGTransformation)theEObject; T result = caseCGTransformation(cgTransformation); @@ -527,6 +552,21 @@ public class QVTiCGModelSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>CG Mapping Loop</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CG Mapping Loop</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCGMappingLoop(CGMappingLoop object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>CG Middle Property Assignment</em>'. * <!-- begin-user-doc --> * This implementation returns null; @@ -587,6 +627,21 @@ public class QVTiCGModelSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>CG Sequence</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CG Sequence</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCGSequence(CGSequence object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>CG Element</em>'. * <!-- begin-user-doc --> * This implementation returns null; @@ -722,6 +777,21 @@ public class QVTiCGModelSwitch<T> extends Switch<T> { } /** + * Returns the result of interpreting the object as an instance of '<em>CG Iteration Call Exp</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CG Iteration Call Exp</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCGIterationCallExp(CGIterationCallExp object) { + return null; + } + + /** * Returns the result of interpreting the object as an instance of '<em>CG Navigation Call Exp</em>'. * <!-- begin-user-doc --> * This implementation returns null; diff --git a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelVisitor.java b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelVisitor.java index 5cda41d27..449fa6706 100644 --- a/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/emf-gen/org/eclipse/qvtd/codegen/qvticgmodel/util/QVTiCGModelVisitor.java @@ -34,11 +34,13 @@ public interface QVTiCGModelVisitor<R> extends org.eclipse.ocl.examples.codegen. @Nullable R visitCGMappingCall(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall object); @Nullable R visitCGMappingCallBinding(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding object); @Nullable R visitCGMappingExp(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp object); + @Nullable R visitCGMappingLoop(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop object); @Nullable R visitCGMiddlePropertyAssignment(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment object); @Nullable R visitCGMiddlePropertyCallExp(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp object); @Nullable R visitCGPredicate(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate object); @Nullable R visitCGPropertyAssignment(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment object); @Nullable R visitCGRealizedVariable(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable object); + @Nullable R visitCGSequence(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGSequence object); @Nullable R visitCGTransformation(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation object); @Nullable R visitCGTypedModel(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel object); @Nullable R visitCGVariablePredicate(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate object); diff --git a/plugins/org.eclipse.qvtd.codegen/model/qvticgmodel.ecore b/plugins/org.eclipse.qvtd.codegen/model/qvticgmodel.ecore index 6315edea2..ea7157427 100644 --- a/plugins/org.eclipse.qvtd.codegen/model/qvticgmodel.ecore +++ b/plugins/org.eclipse.qvtd.codegen/model/qvticgmodel.ecore @@ -45,17 +45,12 @@ eType="#//CGTransformation" resolveProxies="false" eOpposite="#//CGTransformation/mappings"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CGMappingCall" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="mappingExp" lowerBound="1" - eType="#//CGMappingExp" resolveProxies="false" eOpposite="#//CGMappingExp/mappingCalls"/> <eStructuralFeatures xsi:type="ecore:EReference" name="mappingCallBindings" upperBound="-1" eType="#//CGMappingCallBinding" containment="true" resolveProxies="false"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CGMappingCallBinding" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement"> - <eStructuralFeatures xsi:type="ecore:EReference" name="valueOrValues" lowerBound="1" - eType="ecore:EClass ../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement" + <eStructuralFeatures xsi:type="ecore:EReference" name="value" lowerBound="1" eType="ecore:EClass ../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement" containment="true" resolveProxies="false"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="loop" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" - defaultValueLiteral="false"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CGMappingExp" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement"> <eStructuralFeatures xsi:type="ecore:EReference" name="assignments" upperBound="-1" @@ -63,14 +58,15 @@ eOpposite="#//CGPropertyAssignment/mappingExp"/> <eStructuralFeatures xsi:type="ecore:EReference" name="mapping" lowerBound="1" eType="#//CGMapping" volatile="true" transient="true" derived="true" resolveProxies="false"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="mappingCalls" upperBound="-1" - eType="#//CGMappingCall" containment="true" resolveProxies="false" eOpposite="#//CGMappingCall/mappingExp"/> <eStructuralFeatures xsi:type="ecore:EReference" name="predicates" upperBound="-1" eType="#//CGPredicate" containment="true" resolveProxies="false" eOpposite="#//CGPredicate/mappingExp"/> <eStructuralFeatures xsi:type="ecore:EReference" name="realizedVariables" upperBound="-1" eType="ecore:EClass ../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement" containment="true" resolveProxies="false"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="body" eType="ecore:EClass ../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement" + containment="true" resolveProxies="false"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="CGMappingLoop" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGIterationCallExp"/> <eClassifiers xsi:type="ecore:EClass" name="CGMiddlePropertyAssignment" eSuperTypes="#//CGEcorePropertyAssignment"/> <eClassifiers xsi:type="ecore:EClass" name="CGMiddlePropertyCallExp" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGOppositePropertyCallExp"/> <eClassifiers xsi:type="ecore:EClass" name="CGPredicate" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement"> @@ -108,6 +104,11 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="typedModel" lowerBound="1" eType="#//CGTypedModel" resolveProxies="false"/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="CGSequence" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement"> + <eStructuralFeatures xsi:type="ecore:EReference" name="statements" upperBound="-1" + eType="ecore:EClass ../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGValuedElement" + containment="true" resolveProxies="false"/> + </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CGTransformation" eSuperTypes="../../org.eclipse.ocl.examples.codegen/model/cgmodel.ecore#//CGClass"> <eStructuralFeatures xsi:type="ecore:EReference" name="mappings" lowerBound="1" upperBound="-1" eType="#//CGMapping" containment="true" resolveProxies="false" diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAS2CGVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAS2CGVisitor.java index c94ce4dd7..521162dbe 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAS2CGVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAS2CGVisitor.java @@ -24,6 +24,7 @@ import org.eclipse.jdt.annotation.Nullable; import org.eclipse.ocl.examples.codegen.analyzer.AS2CGVisitor; import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorProperty; import org.eclipse.ocl.examples.codegen.cgmodel.CGFinalVariable; +import org.eclipse.ocl.examples.codegen.cgmodel.CGIterator; import org.eclipse.ocl.examples.codegen.cgmodel.CGNamedElement; import org.eclipse.ocl.examples.codegen.cgmodel.CGOperation; import org.eclipse.ocl.examples.codegen.cgmodel.CGParameter; @@ -31,10 +32,13 @@ import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement; import org.eclipse.ocl.examples.codegen.cgmodel.CGVariable; import org.eclipse.ocl.examples.codegen.generator.GenModelException; import org.eclipse.ocl.examples.codegen.java.JavaLocalContext; +import org.eclipse.ocl.examples.domain.elements.DomainOperation; import org.eclipse.ocl.examples.domain.ids.TypeId; import org.eclipse.ocl.examples.domain.library.LibraryProperty; import org.eclipse.ocl.examples.domain.utilities.DomainUtil; +import org.eclipse.ocl.examples.pivot.CollectionType; import org.eclipse.ocl.examples.pivot.ExpressionInOCL; +import org.eclipse.ocl.examples.pivot.Iteration; import org.eclipse.ocl.examples.pivot.NamedElement; import org.eclipse.ocl.examples.pivot.OCLExpression; import org.eclipse.ocl.examples.pivot.OpaqueExpression; @@ -56,11 +60,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -90,6 +96,9 @@ import org.eclipse.qvtd.pivot.qvtimperative.ImperativeModel; import org.eclipse.qvtd.pivot.qvtimperative.Mapping; import org.eclipse.qvtd.pivot.qvtimperative.MappingCall; import org.eclipse.qvtd.pivot.qvtimperative.MappingCallBinding; +import org.eclipse.qvtd.pivot.qvtimperative.MappingLoop; +import org.eclipse.qvtd.pivot.qvtimperative.MappingSequence; +import org.eclipse.qvtd.pivot.qvtimperative.MappingStatement; import org.eclipse.qvtd.pivot.qvtimperative.MiddlePropertyAssignment; import org.eclipse.qvtd.pivot.qvtimperative.MiddlePropertyCallExp; import org.eclipse.qvtd.pivot.qvtimperative.VariablePredicate; @@ -106,13 +115,6 @@ public final class QVTiAS2CGVisitor extends AS2CGVisitor implements QVTimperativ this.globalContext = globalContext; } - protected void createMappingCalls(@NonNull Mapping pMapping, @NonNull CGMappingExp cgMappingExp) { - for (MappingCall asMappingCall : pMapping.getMappingCall()) { - CGMappingCall cgMappingCall = doVisit(CGMappingCall.class, asMappingCall); - cgMappingExp.getMappingCalls().add(cgMappingCall); - } - } - protected void doBottoms(@NonNull Mapping pMapping, @NonNull CGMappingExp cgMappingExp) { List<BottomPattern> pBottomPatterns = new ArrayList<BottomPattern>(); { @@ -330,7 +332,7 @@ public final class QVTiAS2CGVisitor extends AS2CGVisitor implements QVTimperativ } OpaqueExpression specification = asFunction.getBodyExpression(); if (specification != null) { - ExpressionInOCL expressionInOCL = PivotUtil.getExpressionInOCL(asFunction, specification); + ExpressionInOCL expressionInOCL = PivotUtil.getExpressionInOCL(metaModelManager, specification); if (expressionInOCL != null) { Variable contextVariable = expressionInOCL.getContextVariable(); if (contextVariable != null) { @@ -369,7 +371,10 @@ public final class QVTiAS2CGVisitor extends AS2CGVisitor implements QVTimperativ cgMapping.setBody(cgMappingExp); doGuards(pMapping, cgMapping, cgMappingExp); doBottoms(pMapping, cgMappingExp); - createMappingCalls(pMapping, cgMappingExp); + MappingStatement mappingStatements = pMapping.getMappingStatements(); + if (mappingStatements != null) { + cgMappingExp.setBody(doVisit(CGValuedElement.class, mappingStatements)); + } return cgMapping; } @@ -400,13 +405,52 @@ public final class QVTiAS2CGVisitor extends AS2CGVisitor implements QVTimperativ cgMappingCallBinding.setName(asBoundVariable.getName()); cgMappingCallBinding.setAst(asMappingCallBinding); cgMappingCallBinding.setRequired(asBoundVariable.isRequired()); - cgMappingCallBinding.setLoop(asMappingCallBinding.isIsLoop()); - cgMappingCallBinding.setValueOrValues(doVisit(CGValuedElement.class, asMappingCallBinding.getValue())); + cgMappingCallBinding.setValue(doVisit(CGValuedElement.class, asMappingCallBinding.getValue())); cgMappingCallBinding.setTypeId(analyzer.getTypeId(asBoundVariable.getTypeId())); // cgMappingCallBinding.setValueName(localnameasMappingCallBinding.getBoundVariable().getName()); return cgMappingCallBinding; } + public @Nullable CGNamedElement visitMappingLoop(@NonNull MappingLoop asMappingLoop) { + CGMappingLoop cgMappingLoop = QVTiCGModelFactory.eINSTANCE.createCGMappingLoop(); + List<Variable> asIterators = asMappingLoop.getIterator(); + if (asIterators.size() > 0) { + Variable asIterator = asIterators.get(0); + if (asIterator != null) { + CGIterator cgIterator = getIterator(asIterator); + cgIterator.setTypeId(context.getTypeId(asIterator.getTypeId())); + cgIterator.setRequired(asIterator.isRequired()); + if (asIterator.isRequired()) { + cgIterator.setNonNull(); + } + cgMappingLoop.getIterators().add(cgIterator); + } + } + cgMappingLoop.setSource(doVisit(CGValuedElement.class, asMappingLoop.getSource())); +// cgIterator.setNonInvalid(); +// cgIterator.setNonNull(); + cgMappingLoop.setAst(asMappingLoop); + CollectionType collectionType = metaModelManager.getCollectionType(); + DomainOperation forAllIteration = DomainUtil.getNamedElement(collectionType.getLocalOperations(), "forAll"); + cgMappingLoop.setReferredIteration((Iteration) forAllIteration); + cgMappingLoop.setBody(doVisit(CGValuedElement.class, asMappingLoop.getBody())); + return cgMappingLoop; + } + + public @Nullable CGNamedElement visitMappingSequence(@NonNull MappingSequence asMappingSequence) { + CGSequence cgSequence = QVTiCGModelFactory.eINSTANCE.createCGSequence(); + List<CGValuedElement> cgMappingStatements = cgSequence.getStatements(); + for (MappingStatement asMappingStatement : asMappingSequence.getMappingStatements()) { + CGValuedElement cgMappingStatement = doVisit(CGValuedElement.class, asMappingStatement); + cgMappingStatements.add(cgMappingStatement); + } + return cgSequence; + } + + public @Nullable CGNamedElement visitMappingStatement(@NonNull MappingStatement object) { + return visiting(object); + } + public @Nullable CGNamedElement visitMiddlePropertyAssignment(@NonNull MiddlePropertyAssignment asPropertyAssignment) { // Property asProperty = DomainUtil.nonNullModel(asPropertyAssignment.getTargetProperty()); CGMiddlePropertyAssignment cgPropertyAssignment = QVTiCGModelFactory.eINSTANCE.createCGMiddlePropertyAssignment(); diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAnalysisVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAnalysisVisitor.java index 755062d5a..28f2bcdb6 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAnalysisVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiAnalysisVisitor.java @@ -25,11 +25,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -93,6 +95,10 @@ public class QVTiAnalysisVisitor extends AnalysisVisitor implements QVTiCGModelV return visitCGValuedElement(object); } + public Object visitCGMappingLoop(@NonNull CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public Object visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment object) { return visitCGPropertyAssignment(object); } @@ -119,6 +125,10 @@ public class QVTiAnalysisVisitor extends AnalysisVisitor implements QVTiCGModelV return null; } + public Object visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public Object visitCGTransformation(@NonNull CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiBoxingAnalyzer.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiBoxingAnalyzer.java index 44a11caaf..5ecd54ba1 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiBoxingAnalyzer.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiBoxingAnalyzer.java @@ -23,11 +23,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -85,10 +87,10 @@ public class QVTiBoxingAnalyzer extends BoxingAnalyzer implements QVTiCGModelVis public Object visitCGMappingCallBinding(@NonNull CGMappingCallBinding cgMappingCallBinding) { if (cgMappingCallBinding.isRequired()) { MappingCallBinding mappingCallBinding = (MappingCallBinding)cgMappingCallBinding.getAst(); - rewriteAsUnboxed(rewriteAsGuarded(cgMappingCallBinding.getValueOrValues(), "binding for '" + mappingCallBinding.getMappingCall().getReferredMapping().getName() + "::" + mappingCallBinding.getBoundVariable().getName() + "'")); // FIXME referred mapping + rewriteAsUnboxed(rewriteAsGuarded(cgMappingCallBinding.getValue(), "binding for '" + mappingCallBinding.getMappingCall().getReferredMapping().getName() + "::" + mappingCallBinding.getBoundVariable().getName() + "'")); // FIXME referred mapping } else { - rewriteAsUnboxed(cgMappingCallBinding.getValueOrValues()); + rewriteAsUnboxed(cgMappingCallBinding.getValue()); } return visitCGValuedElement(cgMappingCallBinding); } @@ -97,6 +99,12 @@ public class QVTiBoxingAnalyzer extends BoxingAnalyzer implements QVTiCGModelVis return visitCGValuedElement(object); } + public Object visitCGMappingLoop(@NonNull CGMappingLoop cgMappingLoop) { + visitCGIterationCallExp(cgMappingLoop); + rewriteAsUnboxed(cgMappingLoop.getSource()); + return null; + } + public Object visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment cgMiddlePropertyAssignment) { rewriteAsUnboxed(cgMiddlePropertyAssignment.getSlotValue()); rewriteAsUnboxed(cgMiddlePropertyAssignment.getInitValue()); @@ -119,6 +127,10 @@ public class QVTiBoxingAnalyzer extends BoxingAnalyzer implements QVTiCGModelVis return visitCGVariable(cgRealizedVariable); } + public Object visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public Object visitCGTransformation(@NonNull CGTransformation cgTransformation) { return visitCGClass(cgTransformation); } diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiCG2StringVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiCG2StringVisitor.java index a3874eb6b..73334fbf8 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiCG2StringVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiCG2StringVisitor.java @@ -26,11 +26,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -114,8 +116,8 @@ public class QVTiCG2StringVisitor extends CG2StringVisitor implements QVTiCGMode public @Nullable String visitCGMappingCallBinding(@NonNull CGMappingCallBinding cgMappingCallBinding) { appendName(cgMappingCallBinding); - append(cgMappingCallBinding.isLoop() ? " <= " : " := "); - safeVisit(cgMappingCallBinding.getValueOrValues()); + append(" := "); + safeVisit(cgMappingCallBinding.getValue()); return null; } @@ -123,6 +125,10 @@ public class QVTiCG2StringVisitor extends CG2StringVisitor implements QVTiCGMode return visitCGValuedElement(object); } + public @Nullable String visitCGMappingLoop(@NonNull CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public @Nullable String visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment object) { return visitCGPropertyAssignment(object); } @@ -151,6 +157,10 @@ public class QVTiCG2StringVisitor extends CG2StringVisitor implements QVTiCGMode return visitCGVariable(object); } + public @Nullable String visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public @Nullable String visitCGTransformation(@NonNull CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiDependencyVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiDependencyVisitor.java index 3e8674b25..e36a98894 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiDependencyVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiDependencyVisitor.java @@ -24,11 +24,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -76,6 +78,10 @@ public class QVTiDependencyVisitor extends JavaDependencyVisitor implements QVTi return visitCGValuedElement(object); } + public Object visitCGMappingLoop(@NonNull CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public Object visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment object) { return visitCGPropertyAssignment(object); } @@ -100,6 +106,10 @@ public class QVTiDependencyVisitor extends JavaDependencyVisitor implements QVTi return visitCGVariable(object); } + public Object visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public Object visitCGTransformation(@NonNull CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiFieldingAnalyzer.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiFieldingAnalyzer.java index 072472480..4063af907 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiFieldingAnalyzer.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiFieldingAnalyzer.java @@ -15,6 +15,7 @@ import java.util.Set; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.ocl.examples.codegen.analyzer.FieldingAnalyzer; +import org.eclipse.ocl.examples.codegen.cgmodel.CGIterator; import org.eclipse.ocl.examples.codegen.cgmodel.CGVariable; import org.eclipse.qvtd.codegen.qvticgmodel.CGEcorePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGEcoreRealizedVariable; @@ -22,15 +23,17 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGFunction; import org.eclipse.qvtd.codegen.qvticgmodel.CGFunctionCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGFunctionParameter; import org.eclipse.qvtd.codegen.qvticgmodel.CGGuardVariable; -import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; -import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; -import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; -import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; +import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -84,6 +87,10 @@ public class QVTiFieldingAnalyzer extends FieldingAnalyzer return visitCGValuedElement(object); } + public @Nullable Set<CGVariable> visitCGMappingLoop(@NonNull CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public @Nullable Set<CGVariable> visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment object) { return visitCGPropertyAssignment(object); } @@ -104,6 +111,10 @@ public class QVTiFieldingAnalyzer extends FieldingAnalyzer return visitCGVariable(object); } + public @Nullable Set<CGVariable> visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public @Nullable Set<CGVariable> visitCGTransformation(@NonNull CGTransformation object) { return visitCGClass(object); } @@ -163,6 +174,22 @@ public class QVTiFieldingAnalyzer extends FieldingAnalyzer return visitCGValuedElement(object); } + public Boolean visitCGMappingLoop(@NonNull CGMappingLoop cgElement) { +// return visitCGIterationCallExp(object); + rewriteAsThrown(cgElement.getSource()); + for (CGIterator cgIterator : cgElement.getIterators()) { + cgIterator.accept(this); + } +// if (cgElement.getReferredIteration().isValidating()) { +// rewriteAsCaught(cgElement.getBody()); +// } +// else { + rewriteAsThrown(cgElement.getBody()); +// } + cgElement.setCaught(false); + return false; + } + public Boolean visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment object) { return visitCGPropertyAssignment(object); } @@ -183,6 +210,10 @@ public class QVTiFieldingAnalyzer extends FieldingAnalyzer return visitCGVariable(object); } + public Boolean visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public Boolean visitCGTransformation(@NonNull CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiReferencesVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiReferencesVisitor.java index 4ab4d7410..7a89c241a 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiReferencesVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/analyzer/QVTiReferencesVisitor.java @@ -16,6 +16,8 @@ import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.ocl.examples.codegen.analyzer.ReferencesVisitor; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; import org.eclipse.qvtd.codegen.qvticgmodel.util.QVTiCGModelVisitor; import org.eclipse.qvtd.pivot.qvtimperative.MappingCall; @@ -73,6 +75,10 @@ public class QVTiReferencesVisitor extends ReferencesVisitor implements QVTiCGMo return visitCGValuedElement(object); } + public @Nullable List<Object> visitCGMappingLoop(@NonNull CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public @Nullable List<Object> visitCGMiddlePropertyAssignment(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment object) { return visitCGEcorePropertyAssignment(object); } @@ -93,6 +99,10 @@ public class QVTiReferencesVisitor extends ReferencesVisitor implements QVTiCGMo return visitCGVariable(object); } + public @Nullable List<Object> visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public @Nullable List<Object> visitCGTransformation(@NonNull org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaPreVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaPreVisitor.java index 7c319f0fd..25df7fa29 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaPreVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaPreVisitor.java @@ -28,11 +28,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -118,6 +120,10 @@ public class QVTiCG2JavaPreVisitor extends CG2JavaPreVisitor implements QVTiCGMo } } + public Object visitCGMappingLoop(@NonNull CGMappingLoop object) { + return visitCGIterationCallExp(object); + } + public Object visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment object) { return visitCGPropertyAssignment(object); } @@ -146,6 +152,10 @@ public class QVTiCG2JavaPreVisitor extends CG2JavaPreVisitor implements QVTiCGMo return visitCGVariable(cgRealizedVariable); } + public Object visitCGSequence(@NonNull CGSequence object) { + return visitCGValuedElement(object); + } + public Object visitCGTransformation(@NonNull CGTransformation object) { return visitCGClass(object); } diff --git a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java index 61512c234..c2f5cd1eb 100644 --- a/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java +++ b/plugins/org.eclipse.qvtd.codegen/src/org/eclipse/qvtd/codegen/qvti/java/QVTiCG2JavaVisitor.java @@ -25,6 +25,7 @@ import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.ocl.examples.codegen.analyzer.NameManager; import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorProperty; +import org.eclipse.ocl.examples.codegen.cgmodel.CGIterator; import org.eclipse.ocl.examples.codegen.cgmodel.CGOperation; import org.eclipse.ocl.examples.codegen.cgmodel.CGPackage; import org.eclipse.ocl.examples.codegen.cgmodel.CGParameter; @@ -55,11 +56,13 @@ import org.eclipse.qvtd.codegen.qvticgmodel.CGMapping; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCall; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingCallBinding; import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingExp; +import org.eclipse.qvtd.codegen.qvticgmodel.CGMappingLoop; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGMiddlePropertyCallExp; import org.eclipse.qvtd.codegen.qvticgmodel.CGPredicate; import org.eclipse.qvtd.codegen.qvticgmodel.CGPropertyAssignment; import org.eclipse.qvtd.codegen.qvticgmodel.CGRealizedVariable; +import org.eclipse.qvtd.codegen.qvticgmodel.CGSequence; import org.eclipse.qvtd.codegen.qvticgmodel.CGTransformation; import org.eclipse.qvtd.codegen.qvticgmodel.CGTypedModel; import org.eclipse.qvtd.codegen.qvticgmodel.CGVariablePredicate; @@ -266,6 +269,22 @@ public class QVTiCG2JavaVisitor extends CG2JavaVisitor implements QVTiCGModelVis return (QVTiGlobalContext) globalContext; } + protected @Nullable TypeDescriptor needsTypeCheck(@NonNull CGMappingCallBinding cgMappingCallBinding) { + CGValuedElement value = cgMappingCallBinding.getValue(); + TypeDescriptor argumentTypeDescriptor = context.getTypeDescriptor(cgMappingCallBinding); + TypeId pivotTypeId = value.getASTypeId(); + if (pivotTypeId instanceof CollectionTypeId) { + pivotTypeId = ((CollectionTypeId)pivotTypeId).getElementTypeId(); + } + TypeDescriptor iteratorTypeDescriptor = context.getBoxedDescriptor(DomainUtil.nonNullState(pivotTypeId)); + if (argumentTypeDescriptor.isAssignableFrom(iteratorTypeDescriptor)) { + return null; + } + else { + return argumentTypeDescriptor; + } + } + public @NonNull Boolean visitCGEcorePropertyAssignment(@NonNull CGEcorePropertyAssignment cgPropertyAssignment) { // Property pivotProperty = cgPropertyCallExp.getReferredProperty(); // CGTypeId cgTypeId = analyzer.getTypeId(pivotProperty.getOwningType().getTypeId()); @@ -544,89 +563,52 @@ public class QVTiCG2JavaVisitor extends CG2JavaVisitor implements QVTiCGModelVis } List<CGMappingCallBinding> cgMappingCallBindings = cgMappingCall.getMappingCallBindings(); for (@SuppressWarnings("null")@NonNull CGMappingCallBinding cgMappingCallBinding : cgMappingCallBindings) { - CGValuedElement valueOrValues = cgMappingCallBinding.getValueOrValues(); - if (valueOrValues != null) { - if (!js.appendLocalStatements(valueOrValues)) { + CGValuedElement value = cgMappingCallBinding.getValue(); + if (value != null) { + if (!js.appendLocalStatements(value)) { return false; } } } + // + // Set loopVariable non-null if it needs to be type-checked and cast to a narrower type. + // for (@SuppressWarnings("null")@NonNull CGMappingCallBinding cgMappingCallBinding : cgMappingCallBindings) { - if (cgMappingCallBinding.isLoop()) { - CGValuedElement valueOrValues = cgMappingCallBinding.getValueOrValues(); - TypeId pivotTypeId = valueOrValues.getASTypeId(); - if (pivotTypeId instanceof CollectionTypeId) { - pivotTypeId = ((CollectionTypeId)pivotTypeId).getElementTypeId(); - } - TypeDescriptor argumentTypeDescriptor = context.getTypeDescriptor(cgMappingCallBinding); - TypeDescriptor iteratorTypeDescriptor = context.getBoxedDescriptor(DomainUtil.nonNullState(pivotTypeId)); - if (!valueOrValues.isNonNull()) { - js.append("assert "); - js.appendValueName(valueOrValues); - js.append(" != null;\n"); - } - js.append("for ("); - js.append("Object"); -// js.appendClassReference(iteratorTypeDescriptor); - js.append(" "); - js.appendValueName(cgMappingCallBinding); - js.append(" : "); - js.appendValueName(valueOrValues); + TypeDescriptor checkedType = needsTypeCheck(cgMappingCallBinding); + if (checkedType != null) { + js.append("if ("); + js.appendValueName(cgMappingCallBinding.getValue()); + js.append(" instanceof "); + js.appendClassReference(checkedType); js.append(") {\n"); js.pushIndentation(null); - js.append("if ("); - js.appendValueName(cgMappingCallBinding); - js.append(" != null) {\n"); - js.pushIndentation(null); - if (!argumentTypeDescriptor.isAssignableFrom(iteratorTypeDescriptor)) { - js.append("if ("); - js.appendValueName(cgMappingCallBinding); - js.append(" instanceof "); - js.appendClassReference(argumentTypeDescriptor); - js.append(") {\n"); - js.pushIndentation(null); } } - } + // + // Emit the mapping call. + // js.append(cgReferredMapping.getName() + "("); boolean isFirst = true; - for (CGMappingCallBinding cgMappingCallBinding : cgMappingCallBindings) { + for (@SuppressWarnings("null")@NonNull CGMappingCallBinding cgMappingCallBinding : cgMappingCallBindings) { if (!isFirst) { js.append(", "); } - if (cgMappingCallBinding.isLoop()) { - CGValuedElement valueOrValues = cgMappingCallBinding.getValueOrValues(); - TypeId pivotTypeId = valueOrValues.getASTypeId(); - if (pivotTypeId instanceof CollectionTypeId) { - pivotTypeId = ((CollectionTypeId)pivotTypeId).getElementTypeId(); - } - TypeDescriptor argumentTypeDescriptor = context.getTypeDescriptor(cgMappingCallBinding); + TypeDescriptor checkedType = needsTypeCheck(cgMappingCallBinding); + if (checkedType != null) { js.append("("); - js.appendClassReference(argumentTypeDescriptor); + js.appendClassReference(checkedType); js.append(")"); - js.appendValueName(cgMappingCallBinding); - } - else { - js.appendValueName(cgMappingCallBinding.getValueOrValues()); } + js.appendValueName(cgMappingCallBinding.getValue()); isFirst = false; } js.append(");\n"); + // + // End the type check. + // for (@SuppressWarnings("null")@NonNull CGMappingCallBinding cgMappingCallBinding : cgMappingCallBindings) { - if (cgMappingCallBinding.isLoop()) { - CGValuedElement valueOrValues = cgMappingCallBinding.getValueOrValues(); - TypeId pivotTypeId = valueOrValues.getASTypeId(); - if (pivotTypeId instanceof CollectionTypeId) { - pivotTypeId = ((CollectionTypeId)pivotTypeId).getElementTypeId(); - } - TypeDescriptor argumentTypeDescriptor = context.getTypeDescriptor(cgMappingCallBinding); - TypeDescriptor iteratorTypeDescriptor = context.getBoxedDescriptor(DomainUtil.nonNullState(pivotTypeId)); - if (!argumentTypeDescriptor.isAssignableFrom(iteratorTypeDescriptor)) { - js.popIndentation(); - js.append("}\n"); - } - js.popIndentation(); - js.append("}\n"); + TypeDescriptor checkedType = needsTypeCheck(cgMappingCallBinding); + if (checkedType != null) { js.popIndentation(); js.append("}\n"); } @@ -648,13 +630,40 @@ public class QVTiCG2JavaVisitor extends CG2JavaVisitor implements QVTiCGModelVis for (CGPropertyAssignment cgAssignment : cgMappingExp.getAssignments()) { cgAssignment.accept(this); } - js.append("// mapping calls\n"); - for (CGMappingCall cgMappingCall : cgMappingExp.getMappingCalls()) { - cgMappingCall.accept(this); + js.append("// mapping statements\n"); + CGValuedElement body = cgMappingExp.getBody(); + if (body != null) { + body.accept(this); } return true; } + public @NonNull Boolean visitCGMappingLoop(@NonNull CGMappingLoop cgMappingLoop) { + CGValuedElement source = getExpression(cgMappingLoop.getSource()); + CGIterator iterator = cgMappingLoop.getIterators().get(0); +// accumulatorName = getSymbolName(null, init.getValueName()); + if (!js.appendLocalStatements(source)) { + return false; + } +// js.appendLocalStatements(iterator); +// js.appendDeclaration(iterator); +// js.append(" = "); +// js.appendValueName(iterator.getInit()); + js.append(";\n"); + js.append("for ("); + js.appendClassReference(iterator); + js.append(" "); + js.appendValueName(iterator); + js.append(" : "); + js.appendValueName(source); + js.append(") {\n"); + js.pushIndentation(null); + cgMappingLoop.getBody().accept(this); + js.popIndentation(); + js.append("}\n"); + return true; + } + public @NonNull Boolean visitCGMiddlePropertyAssignment(@NonNull CGMiddlePropertyAssignment cgMiddlePropertyAssignment) { visitCGEcorePropertyAssignment(cgMiddlePropertyAssignment); Property pReferredProperty = DomainUtil.nonNullModel(cgMiddlePropertyAssignment.getReferredProperty()); @@ -768,6 +777,13 @@ public class QVTiCG2JavaVisitor extends CG2JavaVisitor implements QVTiCGModelVis return true; } + public @Nullable Boolean visitCGSequence(@NonNull CGSequence cgSequence) { + for (CGValuedElement cgStatement : cgSequence.getStatements()) { + cgStatement.accept(this); + } + return true; + } + public @NonNull Boolean visitCGTransformation(@NonNull CGTransformation cgTransformation) { String className = cgTransformation.getName(); js.append("/**\n"); diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java index 44173e8b0..be6401b20 100644 --- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java +++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/hsv2hls.java @@ -1,11 +1,11 @@ -/* - * «codeGenHelper.getCopyright(' * ')» - ************************************************************************* +/******************************************************************************* + * «codeGenHelper.getCopyright(' * ')» + * * This code is 100% auto-generated * using: org.eclipse.ocl.examples.codegen.java.JavaStream * * Do not edit it. - */ + ********************************************************************************/ package cg; @@ -45,9 +45,9 @@ import test.middle.HSV2HLS.HSVNode2HLSNode; @SuppressWarnings("nls") public class hsv2hls extends AbstractTransformation { - public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HLSTree = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/HLSTree", "hls", HLSTreePackage.eINSTANCE); - public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HSVTree = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/HSVTree", "hsv", HSVTreePackage.eINSTANCE); - public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HSVtoHLS = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/HSVtoHLS", "hsv2hls", HSV2HLSPackage.eINSTANCE); + public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HLSTree = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/HLSTree", null, HLSTreePackage.eINSTANCE); + public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HSVTree = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/HSVTree", null, HSVTreePackage.eINSTANCE); + public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HSVtoHLS = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/HSVtoHLS", null, HSV2HLSPackage.eINSTANCE); public static final @NonNull /*@NonInvalid*/ ClassId CLSSid_HLSNode = PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HLSTree.getClassId("HLSNode", 0); public static final @NonNull /*@NonInvalid*/ ClassId CLSSid_HSVNode = PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HSVTree.getClassId("HSVNode", 0); public static final @NonNull /*@NonInvalid*/ ClassId CLSSid_HSVNode2HLSNode = PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_HSVtoHLS.getClassId("HSVNode2HLSNode", 0); @@ -92,14 +92,14 @@ public class hsv2hls extends AbstractTransformation /** * * map HSV2MiddleRoot in hsv2hls) { - * hsv (hsvRoot : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HSVTree.ecore#/'::HSVNode; + * hsv (hsvRoot : HSVTree::HSVNode; * | * ) * { | * } * middle ( | * ) - * {realize middleRoot : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HSV2HLS.ecore#/'::HSVNode2HLSNode; + * {realize middleRoot : HSV2HLS::HSVNode2HLSNode; * | * } * where ( | @@ -109,10 +109,12 @@ public class hsv2hls extends AbstractTransformation * middleRoot = hsvRoot; * middleRoot = hsvRoot.name; * } - * map HSV2MiddleRecursion { - * hsvNode <= hsvRoot.children; + * for hsvChild : HSVTree::HSVNode in hsvRoot.children { + * + * map HSV2MiddleRecursion { + * hsvNode := hsvChild; * middleParent := middleRoot; - * } + * }} * map Middle2HLSRoot { * middleNode := middleRoot; * } @@ -134,13 +136,13 @@ public class hsv2hls extends AbstractTransformation middleRoot.setHsv(hsvRoot); final @Nullable /*@Thrown*/ String name = hsvRoot.getName(); middleRoot.setName(name); - // mapping calls + // mapping statements final @Nullable /*@Thrown*/ List<HSVNode> children = hsvRoot.getChildren(); assert children != null; - for (Object hsvNode_0 : children) { - if (hsvNode_0 != null) { - HSV2MiddleRecursion((HSVNode)hsvNode_0, middleRoot); - } + ; + for (HSVNode hsvChild : children) { + final @NonNull /*@NonInvalid*/ HSVNode symbol_3 = (HSVNode)hsvChild; + HSV2MiddleRecursion(symbol_3, middleRoot); } Middle2HLSRoot(middleRoot); return true; @@ -154,15 +156,15 @@ public class hsv2hls extends AbstractTransformation * * map HSV2MiddleRecursion in hsv2hls) { * - * hsv (hsvNode : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HSVTree.ecore#/'::HSVNode; + * hsv (hsvNode : HSVTree::HSVNode; * | * ) * { | * } - * middle (middleParent : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HSV2HLS.ecore#/'::HSVNode2HLSNode; + * middle (middleParent : HSV2HLS::HSVNode2HLSNode; * | * ) - * {realize middleNode : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HSV2HLS.ecore#/'::HSVNode2HLSNode; + * {realize middleNode : HSV2HLS::HSVNode2HLSNode; * | * } * where ( | @@ -172,10 +174,12 @@ public class hsv2hls extends AbstractTransformation * middleNode = hsvNode; * middleNode = hsvNode.name; * } - * map HSV2MiddleRecursion { - * hsvNode <= hsvNode.children; + * for hsvChild : HSVTree::HSVNode in hsvNode.children { + * + * map HSV2MiddleRecursion { + * hsvNode := hsvChild; * middleParent := middleNode; - * } + * }} * } */ protected boolean HSV2MiddleRecursion(final @NonNull /*@NonInvalid*/ HSVNode hsvNode, final @NonNull /*@NonInvalid*/ HSVNode2HLSNode middleParent) { @@ -190,13 +194,13 @@ public class hsv2hls extends AbstractTransformation middleNode.setHsv(hsvNode); final @Nullable /*@Thrown*/ String name = hsvNode.getName(); middleNode.setName(name); - // mapping calls + // mapping statements final @Nullable /*@Thrown*/ List<HSVNode> children = hsvNode.getChildren(); assert children != null; - for (Object hsvNode_0 : children) { - if (hsvNode_0 != null) { - HSV2MiddleRecursion((HSVNode)hsvNode_0, middleNode); - } + ; + for (HSVNode hsvChild : children) { + final @NonNull /*@NonInvalid*/ HSVNode symbol_4 = (HSVNode)hsvChild; + HSV2MiddleRecursion(symbol_4, middleNode); } return true; } @@ -209,14 +213,14 @@ public class hsv2hls extends AbstractTransformation * * map Middle2HLSRoot in hsv2hls) { * - * middle (middleNode : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HSV2HLS.ecore#/'::HSVNode2HLSNode; + * middle (middleNode : HSV2HLS::HSVNode2HLSNode; * | * ) * { | * } * hls ( | * ) - * {realize hlsNode : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HLSTree.ecore#/'::HLSNode; + * {realize hlsNode : HLSTree::HLSNode; * | * } * where ( | @@ -226,9 +230,11 @@ public class hsv2hls extends AbstractTransformation * middleNode = hlsNode; * hlsNode = middleNode.name; * } - * map Middle2HLSRecursion { - * middleNode <= middleNode.children; - * } + * for middleChild : HSV2HLS::HSVNode2HLSNode in middleNode.children { + * + * map Middle2HLSRecursion { + * middleNode := middleChild; + * }} * } */ protected boolean Middle2HLSRoot(final @NonNull /*@NonInvalid*/ HSVNode2HLSNode middleNode) { @@ -243,13 +249,13 @@ public class hsv2hls extends AbstractTransformation middleNode.setHls(hlsNode); final @Nullable /*@Thrown*/ String name = middleNode.getName(); hlsNode.setName(name); - // mapping calls + // mapping statements final @Nullable /*@Thrown*/ List<HSVNode2HLSNode> children = middleNode.getChildren(); assert children != null; - for (Object middleNode_1 : children) { - if (middleNode_1 != null) { - Middle2HLSRecursion((HSVNode2HLSNode)middleNode_1); - } + ; + for (HSVNode2HLSNode middleChild : children) { + final @NonNull /*@NonInvalid*/ HSVNode2HLSNode symbol_4 = (HSVNode2HLSNode)middleChild; + Middle2HLSRecursion(symbol_4); } return true; } @@ -262,14 +268,14 @@ public class hsv2hls extends AbstractTransformation * * map Middle2HLSRecursion in hsv2hls) { * - * middle (middleNode : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HSV2HLS.ecore#/'::HSVNode2HLSNode; + * middle (middleNode : HSV2HLS::HSVNode2HLSNode; * | * ) * { | * } * hls ( | * ) - * {realize hlsNode : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/HSV2HLS/HLSTree.ecore#/'::HLSNode; + * {realize hlsNode : HLSTree::HLSNode; * | * } * where ( | @@ -279,9 +285,11 @@ public class hsv2hls extends AbstractTransformation * middleNode = hlsNode; * hlsNode = middleNode.name; * } - * map Middle2HLSRecursion { - * middleNode <= middleNode.children; - * } + * for middleChild : HSV2HLS::HSVNode2HLSNode in middleNode.children { + * + * map Middle2HLSRecursion { + * middleNode := middleChild; + * }} * } */ protected boolean Middle2HLSRecursion(final @NonNull /*@NonInvalid*/ HSVNode2HLSNode middleNode_0) { @@ -294,20 +302,20 @@ public class hsv2hls extends AbstractTransformation // assignments final @Nullable /*@Thrown*/ HSVNode2HLSNode parent = middleNode_0.getParent(); if (parent == null) { - throw new InvalidValueException("Null source for \'HSV2HLS::HSVNode2HLSNode.hls\'"); + throw new InvalidValueException("Null source for \'HSV2HLS::HSVNode2HLSNode::hls\'"); } final @Nullable /*@Thrown*/ HLSNode hls = parent.getHls(); hlsNode.setParent(hls); middleNode_0.setHls(hlsNode); final @Nullable /*@Thrown*/ String name = middleNode_0.getName(); hlsNode.setName(name); - // mapping calls + // mapping statements final @Nullable /*@Thrown*/ List<HSVNode2HLSNode> children = middleNode_0.getChildren(); assert children != null; - for (Object middleNode_1 : children) { - if (middleNode_1 != null) { - Middle2HLSRecursion((HSVNode2HLSNode)middleNode_1); - } + ; + for (HSVNode2HLSNode middleChild : children) { + final @NonNull /*@NonInvalid*/ HSVNode2HLSNode symbol_4 = (HSVNode2HLSNode)middleChild; + Middle2HLSRecursion(symbol_4); } return true; } diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/umlRdbms.java b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/umlRdbms.java index f62723299..0d51fbdd5 100644 --- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/umlRdbms.java +++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src-gen/cg/umlRdbms.java @@ -1,11 +1,11 @@ -/* - * «codeGenHelper.getCopyright(' * ')» - ************************************************************************* +/******************************************************************************* + * «codeGenHelper.getCopyright(' * ')» + * * This code is 100% auto-generated * using: org.eclipse.ocl.examples.codegen.java.JavaStream * * Do not edit it. - */ + ********************************************************************************/ package cg; @@ -30,7 +30,6 @@ import org.eclipse.ocl.examples.domain.types.IdResolver; import org.eclipse.ocl.examples.domain.utilities.DomainUtil; import org.eclipse.ocl.examples.domain.values.BagValue; import org.eclipse.ocl.examples.domain.values.OrderedSetValue; -import org.eclipse.ocl.examples.domain.values.SequenceValue; import org.eclipse.ocl.examples.domain.values.SetValue; import org.eclipse.ocl.examples.domain.values.impl.InvalidValueException; import org.eclipse.ocl.examples.domain.values.util.ValuesUtil; @@ -78,9 +77,9 @@ import test.umltordbms.UmltordbmsPackage; @SuppressWarnings("nls") public class umlRdbms extends AbstractTransformation { - public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_SimpleRDBMS = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/SimpleRDBMS", "simplerdbms", SimplerdbmsPackage.eINSTANCE); - public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_UMLtoRDBMS = IdManager.getNsURIPackageId("http://www.eclipse.org/qvt/examples/0.1/UMLtoRDBMS", "umltordbms", UmltordbmsPackage.eINSTANCE); - public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_simpleUML = IdManager.getNsURIPackageId("http://www.eclipse.org/qvt/examples/0.1/simpleUML", "simpleuml", SimpleumlPackage.eINSTANCE); + public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_SimpleRDBMS = IdManager.getNsURIPackageId("http://http://www.eclipse.org/qvt/examples/0.1/SimpleRDBMS", null, SimplerdbmsPackage.eINSTANCE); + public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_UMLtoRDBMS = IdManager.getNsURIPackageId("http://www.eclipse.org/qvt/examples/0.1/UMLtoRDBMS", null, UmltordbmsPackage.eINSTANCE); + public static final @NonNull /*@NonInvalid*/ NsURIPackageId PACKid_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_simpleUML = IdManager.getNsURIPackageId("http://www.eclipse.org/qvt/examples/0.1/simpleUML", null, SimpleumlPackage.eINSTANCE); public static final @NonNull /*@NonInvalid*/ ClassId CLSSid_Association = PACKid_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_simpleUML.getClassId("Association", 0); public static final @NonNull /*@NonInvalid*/ ClassId CLSSid_AssociationToForeignKey = PACKid_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_UMLtoRDBMS.getClassId("AssociationToForeignKey", 0); public static final @NonNull /*@NonInvalid*/ ClassId CLSSid_Attribute = PACKid_http_c_s_s_www_eclipse_org_s_qvt_s_examples_s_0_1_s_simpleUML.getClassId("Attribute", 0); @@ -122,7 +121,6 @@ public class umlRdbms extends AbstractTransformation public static final @NonNull /*@NonInvalid*/ CollectionTypeId ORD_CLSSid_ForeignKey = TypeId.ORDERED_SET.getSpecializedId(CLSSid_ForeignKey); public static final @NonNull /*@NonInvalid*/ CollectionTypeId ORD_CLSSid_Key = TypeId.ORDERED_SET.getSpecializedId(CLSSid_Key); public static final @NonNull /*@NonInvalid*/ CollectionTypeId ORD_CLSSid_PackageElement = TypeId.ORDERED_SET.getSpecializedId(CLSSid_PackageElement); - public static final @NonNull /*@NonInvalid*/ CollectionTypeId SEQ_CLSSid_Classifier = TypeId.SEQUENCE.getSpecializedId(CLSSid_Classifier); public static final @NonNull /*@NonInvalid*/ CollectionTypeId SET_CLSSid_Association = TypeId.SET.getSpecializedId(CLSSid_Association); public static final @NonNull /*@NonInvalid*/ CollectionTypeId SET_CLSSid_Attribute = TypeId.SET.getSpecializedId(CLSSid_Attribute); public static final @NonNull /*@NonInvalid*/ CollectionTypeId SET_CLSSid_AttributeToColumn = TypeId.SET.getSpecializedId(CLSSid_AttributeToColumn); @@ -173,14 +171,14 @@ public class umlRdbms extends AbstractTransformation * * map packageToSchemaLM in umlRdbms) { * - * uml (p : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Package; + * uml (p : simpleuml::Package; * | * ) * { | * } * middle ( | * ) - * {realize p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; + * {realize p2s : umltordbms::PackageToSchema; * | * } * where ( | @@ -189,31 +187,33 @@ public class umlRdbms extends AbstractTransformation * p2s = p; * p2s = p.name; * } - * map integerToNumberLM { + * for child : simpleuml::PackageElement in p.elements { + * + * map integerToNumberLM { * p := p; - * prim <= p.elements; + * prim := child; * p2s := p2s; * } - * map booleanToBooleanLM { + * map booleanToBooleanLM { * p := p; - * prim <= p.elements; + * prim := child; * p2s := p2s; * } - * map stringToVarcharLM { + * map stringToVarcharLM { * p := p; - * prim <= p.elements; + * prim := child; * p2s := p2s; * } - * map classToTableLM { + * map classToTableLM { * p := p; - * c <= p.elements; + * c := child; * p2s := p2s; * } - * map associationToForeignKeyLM { + * map associationToForeignKeyLM { * p := p; - * a <= p.elements; + * a := child; * p2s := p2s; - * } + * }} * map packageToSchemaMR { * p2s := p2s; * } @@ -222,8 +222,6 @@ public class umlRdbms extends AbstractTransformation protected boolean packageToSchemaLM(final @NonNull /*@NonInvalid*/ Package p) { try { // predicates - final @Nullable /*@Thrown*/ List<PackageElement> elements_0 = p.getElements(); - assert elements_0 != null; // creations final /*@Thrown*/ PackageToSchema p2s = UmltordbmsFactory.eINSTANCE.createPackageToSchema(); assert p2s != null; @@ -232,40 +230,26 @@ public class umlRdbms extends AbstractTransformation p2s.setUmlPackage(p); final @Nullable /*@Thrown*/ String name = p.getName(); p2s.setName(name); - // mapping calls - for (Object prim_2 : elements_0) { - if (prim_2 != null) { - if (prim_2 instanceof PrimitiveDataType) { - integerToNumberLM(p, p2s, (PrimitiveDataType)prim_2); - } + // mapping statements + final @Nullable /*@Thrown*/ List<PackageElement> elements = p.getElements(); + assert elements != null; + ; + for (PackageElement child : elements) { + final @NonNull /*@NonInvalid*/ PackageElement symbol_5 = (PackageElement)child; + if (symbol_5 instanceof PrimitiveDataType) { + integerToNumberLM(p, p2s, (PrimitiveDataType)symbol_5); } - } - for (Object prim_3 : elements_0) { - if (prim_3 != null) { - if (prim_3 instanceof PrimitiveDataType) { - booleanToBooleanLM(p, p2s, (PrimitiveDataType)prim_3); - } + if (symbol_5 instanceof PrimitiveDataType) { + booleanToBooleanLM(p, p2s, (PrimitiveDataType)symbol_5); } - } - for (Object prim_4 : elements_0) { - if (prim_4 != null) { - if (prim_4 instanceof PrimitiveDataType) { - stringToVarcharLM(p, p2s, (PrimitiveDataType)prim_4); - } + if (symbol_5 instanceof PrimitiveDataType) { + stringToVarcharLM(p, p2s, (PrimitiveDataType)symbol_5); } - } - for (Object c_4 : elements_0) { - if (c_4 != null) { - if (c_4 instanceof Class) { - classToTableLM((Class)c_4, p, p2s); - } + if (symbol_5 instanceof Class) { + classToTableLM((Class)symbol_5, p, p2s); } - } - for (Object a_2 : elements_0) { - if (a_2 != null) { - if (a_2 instanceof Association) { - associationToForeignKeyLM((Association)a_2, p, p2s); - } + if (symbol_5 instanceof Association) { + associationToForeignKeyLM((Association)symbol_5, p, p2s); } } packageToSchemaMR(p2s); @@ -280,14 +264,14 @@ public class umlRdbms extends AbstractTransformation * * map packageToSchemaMR in umlRdbms) { * - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; + * middle (p2s : umltordbms::PackageToSchema; * | * ) * { | * } * rdbms ( | * ) - * {realize s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Schema; + * {realize s : simplerdbms::Schema; * | * } * where ( | @@ -299,59 +283,55 @@ public class umlRdbms extends AbstractTransformation * s_1 := s; * p2s_1 := p2s; * } - * map integerToNumberMR { + * for child : umltordbms::PrimitiveToName in p2s.primitivesToNames { + * + * map integerToNumberMR { * p2s := p2s; - * p2n <= p2s.primitivesToNames; + * p2n := child; * } - * map booleanToBooleanMR { + * map booleanToBooleanMR { * p2s := p2s; - * p2n <= p2s.primitivesToNames; + * p2n := child; * } - * map stringToVarcharMR { + * map stringToVarcharMR { * p2s := p2s; - * p2n <= p2s.primitivesToNames; - * } - * map classToTableMR { + * p2n := child; + * }} + * for child : umltordbms::ClassToTable in p2s.classesToTables { + * + * map classToTableMR { * p2s := p2s; - * c2t <= p2s.classesToTables; + * c2t := child; * s := s; - * } + * }} * } */ protected boolean packageToSchemaMR(final @NonNull /*@NonInvalid*/ PackageToSchema p2s) { try { // predicates - final @Nullable /*@Thrown*/ List<PrimitiveToName> primitivesToNames_0 = p2s.getPrimitivesToNames(); - assert primitivesToNames_0 != null; // creations final /*@Thrown*/ Schema s = SimplerdbmsFactory.eINSTANCE.createSchema(); assert s != null; modelObjects[1/*rdbms*/].add(s); // assignments p2s.setSchema(s); - // mapping calls + // mapping statements packageToSchemaMR_1(p2s, s); - for (Object p2n_3 : primitivesToNames_0) { - if (p2n_3 != null) { - integerToNumberMR((PrimitiveToName)p2n_3, p2s); - } - } - for (Object p2n_4 : primitivesToNames_0) { - if (p2n_4 != null) { - booleanToBooleanMR((PrimitiveToName)p2n_4, p2s); - } - } - for (Object p2n_5 : primitivesToNames_0) { - if (p2n_5 != null) { - stringToVarcharMR((PrimitiveToName)p2n_5, p2s); - } + final @Nullable /*@Thrown*/ List<PrimitiveToName> primitivesToNames = p2s.getPrimitivesToNames(); + assert primitivesToNames != null; + ; + for (PrimitiveToName child : primitivesToNames) { + final @NonNull /*@NonInvalid*/ PrimitiveToName symbol_5 = (PrimitiveToName)child; + integerToNumberMR(symbol_5, p2s); + booleanToBooleanMR(symbol_5, p2s); + stringToVarcharMR(symbol_5, p2s); } final @Nullable /*@Thrown*/ List<ClassToTable> classesToTables = p2s.getClassesToTables(); assert classesToTables != null; - for (Object c2t_3 : classesToTables) { - if (c2t_3 != null) { - classToTableMR((ClassToTable)c2t_3, p2s, s); - } + ; + for (ClassToTable child_0 : classesToTables) { + final @NonNull /*@NonInvalid*/ ClassToTable symbol_11 = (ClassToTable)child_0; + classToTableMR(symbol_11, p2s, s); } return true; } @@ -363,12 +343,12 @@ public class umlRdbms extends AbstractTransformation /** * * map packageToSchemaMR_1 in umlRdbms) { - * middle (p2s_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; + * middle (p2s_1 : umltordbms::PackageToSchema; * | * ) * { | * } - * rdbms (s_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Schema; + * rdbms (s_1 : simplerdbms::Schema; * | * ) * { | @@ -388,7 +368,7 @@ public class umlRdbms extends AbstractTransformation // assignments final @Nullable /*@Thrown*/ String name = p2s_1.getName(); s_1.setName(name); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -399,16 +379,16 @@ public class umlRdbms extends AbstractTransformation /** * * map integerToNumberLM in umlRdbms) { - * uml (p : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Package; - * prim : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::PrimitiveDataType; + * uml (p : simpleuml::Package; + * prim : simpleuml::PrimitiveDataType; * | * ) * { | * } - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; + * middle (p2s : umltordbms::PackageToSchema; * | * ) - * {realize p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * {realize p2n : umltordbms::PrimitiveToName; * | * } * where ( | @@ -450,7 +430,7 @@ public class umlRdbms extends AbstractTransformation final @NonNull /*@Thrown*/ String sum = StringConcatOperation.INSTANCE.evaluate(name, STR_2); final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_NUMBER); p2n.setName(sum_0); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -461,8 +441,8 @@ public class umlRdbms extends AbstractTransformation /** * * map integerToNumberMR in umlRdbms) { - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; - * p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * middle (p2s : umltordbms::PackageToSchema; + * p2n : umltordbms::PrimitiveToName; * | * ) * { | @@ -495,7 +475,7 @@ public class umlRdbms extends AbstractTransformation } // creations // assignments - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -506,16 +486,16 @@ public class umlRdbms extends AbstractTransformation /** * * map booleanToBooleanLM in umlRdbms) { - * uml (p : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Package; - * prim : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::PrimitiveDataType; + * uml (p : simpleuml::Package; + * prim : simpleuml::PrimitiveDataType; * | * ) * { | * } - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; + * middle (p2s : umltordbms::PackageToSchema; * | * ) - * {realize p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * {realize p2n : umltordbms::PrimitiveToName; * | * } * where ( | @@ -557,7 +537,7 @@ public class umlRdbms extends AbstractTransformation final @NonNull /*@Thrown*/ String sum = StringConcatOperation.INSTANCE.evaluate(name, STR_2); final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_BOOLEAN); p2n.setName(sum_0); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -568,8 +548,8 @@ public class umlRdbms extends AbstractTransformation /** * * map booleanToBooleanMR in umlRdbms) { - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; - * p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * middle (p2s : umltordbms::PackageToSchema; + * p2n : umltordbms::PrimitiveToName; * | * ) * { | @@ -602,7 +582,7 @@ public class umlRdbms extends AbstractTransformation } // creations // assignments - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -613,16 +593,16 @@ public class umlRdbms extends AbstractTransformation /** * * map stringToVarcharLM in umlRdbms) { - * uml (p : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Package; - * prim : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::PrimitiveDataType; + * uml (p : simpleuml::Package; + * prim : simpleuml::PrimitiveDataType; * | * ) * { | * } - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; + * middle (p2s : umltordbms::PackageToSchema; * | * ) - * {realize p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * {realize p2n : umltordbms::PrimitiveToName; * | * } * where ( | @@ -664,7 +644,7 @@ public class umlRdbms extends AbstractTransformation final @NonNull /*@Thrown*/ String sum = StringConcatOperation.INSTANCE.evaluate(name, STR_2); final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, STR_VARCHAR); p2n.setName(sum_0); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -675,8 +655,8 @@ public class umlRdbms extends AbstractTransformation /** * * map stringToVarcharMR in umlRdbms) { - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; - * p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * middle (p2s : umltordbms::PackageToSchema; + * p2n : umltordbms::PrimitiveToName; * | * ) * { | @@ -709,7 +689,7 @@ public class umlRdbms extends AbstractTransformation } // creations // assignments - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -720,16 +700,16 @@ public class umlRdbms extends AbstractTransformation /** * * map classToTableLM in umlRdbms) { - * uml (p : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Package; - * c : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; + * uml (p : simpleuml::Package; + * c : simpleuml::Class; * | * ) * { | * } - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; + * middle (p2s : umltordbms::PackageToSchema; * | * ) - * {realize c2t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; + * {realize c2t : umltordbms::ClassToTable; * | * } * where ( | @@ -740,24 +720,26 @@ public class umlRdbms extends AbstractTransformation * c2t = c; * c2t = c.name; * } - * map classPrimitiveAttributesLM { + * for anAttribute : simpleuml::Attribute in c.attributes { + * + * map classPrimitiveAttributesLM { * c := c; - * a <= c.attributes; + * a := anAttribute; * fao := c2t; * } - * map classComplexAttributesLM { + * map classComplexAttributesLM { * c := c; - * a <= c.attributes; + * a := anAttribute; * fao := c2t; * } - * map complexAttributePrimitiveAttributesLM { - * ca <= c.attributes; - * c <= c.attributes.type; - * } - * map complexAttributeComplexAttributesLM { - * ca <= c.attributes; - * c <= c.attributes.type; + * map complexAttributePrimitiveAttributesLM { + * ca := anAttribute; + * c := anAttribute.type; * } + * map complexAttributeComplexAttributesLM { + * ca := anAttribute; + * c := anAttribute.type; + * }} * } */ protected boolean classToTableLM(final @NonNull /*@NonInvalid*/ Class c, final @NonNull /*@NonInvalid*/ Package p_3, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_7) { @@ -778,31 +760,6 @@ public class umlRdbms extends AbstractTransformation if (!eq_1) { return false; } - final @NonNull /*@NonInvalid*/ IdResolver idResolver = evaluator.getIdResolver(); - final @Nullable /*@Thrown*/ List<Attribute> attributes_0 = c.getAttributes(); - assert attributes_0 != null; - final @NonNull /*@Thrown*/ OrderedSetValue BOXED_attributes_3 = idResolver.createOrderedSetOfAll(ORD_CLSSid_Attribute, attributes_0); - @NonNull /*@Thrown*/ SequenceValue.Accumulator accumulator = ValuesUtil.createSequenceAccumulatorValue(SEQ_CLSSid_Classifier); - @Nullable Iterator<?> ITERATOR__1_0 = BOXED_attributes_3.iterator(); - @NonNull /*@Thrown*/ SequenceValue collect_0; - while (true) { - if (!ITERATOR__1_0.hasNext()) { - collect_0 = accumulator; - break; - } - @Nullable /*@NonInvalid*/ Attribute _1_0 = (Attribute)ITERATOR__1_0.next(); - /** - * type - */ - if (_1_0 == null) { - throw new InvalidValueException("Null source for \'simpleuml::Attribute.type\'"); - } - final @Nullable /*@Thrown*/ Classifier type_0 = _1_0.getType(); - // - accumulator.add(type_0); - } - final List<Classifier> UNBOXED_collect_0 = collect_0.asEcoreObjects(idResolver, Classifier.class); - assert UNBOXED_collect_0 != null; // creations final /*@Thrown*/ ClassToTable c2t = UmltordbmsFactory.eINSTANCE.createClassToTable(); assert c2t != null; @@ -813,37 +770,23 @@ public class umlRdbms extends AbstractTransformation OPPOSITE_OF_ClassToTable_umlClass.put(c, c2t); final @Nullable /*@Thrown*/ String name = c.getName(); c2t.setName(name); - // mapping calls - for (Object a_2 : attributes_0) { - if (a_2 != null) { - classPrimitiveAttributesLM((Attribute)a_2, c, c2t); + // mapping statements + final @Nullable /*@Thrown*/ List<Attribute> attributes = c.getAttributes(); + assert attributes != null; + ; + for (Attribute anAttribute : attributes) { + final @NonNull /*@NonInvalid*/ Attribute symbol_6 = (Attribute)anAttribute; + final @Nullable /*@Thrown*/ Classifier type_0 = symbol_6.getType(); + if (type_0 == null) { + throw new InvalidValueException("Null binding for \'complexAttributeComplexAttributesLM::c\'"); } - } - for (Object a_3 : attributes_0) { - if (a_3 != null) { - classComplexAttributesLM((Attribute)a_3, c, c2t); + classPrimitiveAttributesLM(symbol_6, c, c2t); + classComplexAttributesLM(symbol_6, c, c2t); + if (type_0 instanceof Class) { + complexAttributePrimitiveAttributesLM((Class)type_0, symbol_6); } - } - for (Object c_6 : UNBOXED_collect_0) { - if (c_6 != null) { - if (c_6 instanceof Class) { - for (Object ca_2 : attributes_0) { - if (ca_2 != null) { - complexAttributePrimitiveAttributesLM((Class)c_6, (Attribute)ca_2); - } - } - } - } - } - for (Object c_7 : UNBOXED_collect_0) { - if (c_7 != null) { - if (c_7 instanceof Class) { - for (Object ca_3 : attributes_0) { - if (ca_3 != null) { - complexAttributeComplexAttributesLM((Class)c_7, (Attribute)ca_3); - } - } - } + if (type_0 instanceof Class) { + complexAttributeComplexAttributesLM((Class)type_0, symbol_6); } } return true; @@ -856,16 +799,16 @@ public class umlRdbms extends AbstractTransformation /** * * map classToTableMR in umlRdbms) { - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; - * c2t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; + * middle (p2s : umltordbms::PackageToSchema; + * c2t : umltordbms::ClassToTable; * | * ) * { | * } - * rdbms (s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Schema; + * rdbms (s : simplerdbms::Schema; * | * ) - * {realize t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; + * {realize t : simplerdbms::Table; * | * } * where ( | @@ -883,21 +826,24 @@ public class umlRdbms extends AbstractTransformation * t_2 := t; * c2t_2 := c2t; * } - * map associationToForeignKeyMR { + * for child : umltordbms::AssociationToForeignKey in c2t.associationsToForeignKeys { + * + * map associationToForeignKeyMR { * p2s := p2s; * dt := t; - * a2f <= c2t.associationsToForeignKeys; + * a2f := child; * s := s; * st := t; * rk := c2t.primaryKey; - * } - * map attributeColumnsMR { - * - * c2t := c2t; - * a2c <= c2t.fromAttributes->union( - * c2t.fromAttributes->selectByKind(_'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::NonLeafAttribute).fromAttributes); + * }} + * for child : umltordbms::FromAttribute in c2t.fromAttributes->union( + * c2t.fromAttributes->selectByKind(umltordbms::NonLeafAttribute).fromAttributes) + * { + * map attributeColumnsMR { + * c2t := c2t; + * a2c := child; * t := t; - * } + * }} * } */ protected boolean classToTableMR(final @NonNull /*@NonInvalid*/ ClassToTable c2t, final @NonNull /*@NonInvalid*/ PackageToSchema p2s_8, final @NonNull /*@NonInvalid*/ Schema s) { @@ -920,19 +866,19 @@ public class umlRdbms extends AbstractTransformation // assignments t.setKind(STR_base); t.setSchema(s); - // mapping calls + // mapping statements classToTableMR_1(c2t, t); classToTableMR_2(c2t, t); final @Nullable /*@Thrown*/ List<AssociationToForeignKey> associationsToForeignKeys = c2t.getAssociationsToForeignKeys(); assert associationsToForeignKeys != null; - final @Nullable /*@Thrown*/ Key primaryKey = c2t.getPrimaryKey(); - if (primaryKey == null) { - throw new InvalidValueException("Null binding for \'associationToForeignKeyMR::rk\'"); - } - for (Object a2f_0 : associationsToForeignKeys) { - if (a2f_0 != null) { - associationToForeignKeyMR((AssociationToForeignKey)a2f_0, t, p2s_8, primaryKey, s, t); + ; + for (AssociationToForeignKey child : associationsToForeignKeys) { + final @NonNull /*@NonInvalid*/ AssociationToForeignKey symbol_5 = (AssociationToForeignKey)child; + final @Nullable /*@Thrown*/ Key primaryKey = c2t.getPrimaryKey(); + if (primaryKey == null) { + throw new InvalidValueException("Null binding for \'associationToForeignKeyMR::rk\'"); } + associationToForeignKeyMR(symbol_5, t, p2s_8, primaryKey, s, t); } final @NonNull /*@Thrown*/ SetValue selectByKind = (SetValue)CollectionSelectByKindOperation.INSTANCE.evaluate(evaluator, BOXED_fromAttributes, TYP_umltordbms_c_c_NonLeafAttribute_0); @NonNull /*@Thrown*/ BagValue.Accumulator accumulator = ValuesUtil.createBagAccumulatorValue(BAG_CLSSid_FromAttribute); @@ -948,7 +894,7 @@ public class umlRdbms extends AbstractTransformation * fromAttributes */ if (_1 == null) { - throw new InvalidValueException("Null source for \'umltordbms::FromAttributeOwner.fromAttributes\'"); + throw new InvalidValueException("Null source for \'umltordbms::FromAttributeOwner::fromAttributes\'"); } final @Nullable /*@Thrown*/ List<FromAttribute> fromAttributes_1 = _1.getFromAttributes(); assert fromAttributes_1 != null; @@ -961,11 +907,11 @@ public class umlRdbms extends AbstractTransformation final @NonNull /*@Thrown*/ BagValue union = (BagValue)CollectionUnionOperation.INSTANCE.evaluate(BOXED_fromAttributes, collect); final List<FromAttribute> UNBOXED_union = union.asEcoreObjects(idResolver, FromAttribute.class); assert UNBOXED_union != null; - for (Object a2c_0 : UNBOXED_union) { - if (a2c_0 != null) { - if (a2c_0 instanceof AttributeToColumn) { - attributeColumnsMR((AttributeToColumn)a2c_0, c2t, t); - } + ; + for (FromAttribute child_0 : UNBOXED_union) { + final @NonNull /*@NonInvalid*/ FromAttribute symbol_9 = (FromAttribute)child_0; + if (symbol_9 instanceof AttributeToColumn) { + attributeColumnsMR((AttributeToColumn)symbol_9, c2t, t); } } return true; @@ -978,12 +924,12 @@ public class umlRdbms extends AbstractTransformation /** * * map classToTableMR_1 in umlRdbms) { - * middle (c2t_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; + * middle (c2t_1 : umltordbms::ClassToTable; * | * ) * { | * } - * rdbms (t_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; + * rdbms (t_1 : simplerdbms::Table; * | * ) * { | @@ -1006,7 +952,7 @@ public class umlRdbms extends AbstractTransformation OPPOSITE_OF_ClassToTable_table.put(t_1, c2t_1); final @Nullable /*@Thrown*/ String name = c2t_1.getName(); t_1.setName(name); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1018,16 +964,16 @@ public class umlRdbms extends AbstractTransformation * * map classToTableMR_2 in umlRdbms) { * - * middle (c2t_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; + * middle (c2t_2 : umltordbms::ClassToTable; * | * ) * { | * } - * rdbms (t_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; + * rdbms (t_2 : simplerdbms::Table; * | * ) - * {realize pk : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Key; - * realize pc : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * {realize pk : simplerdbms::Key; + * realize pc : simplerdbms::Column; * | * } * where ( | @@ -1073,7 +1019,7 @@ public class umlRdbms extends AbstractTransformation assert UNBOXED_OrderedSet != null; pc.getKey().addAll(UNBOXED_OrderedSet); pc.setType(STR_NUMBER); - // mapping calls + // mapping statements classToTableMR_2_1(c2t_2, pc, pk); classToTableMR_2_2(pc, pk, t_2); return true; @@ -1086,13 +1032,13 @@ public class umlRdbms extends AbstractTransformation /** * * map classToTableMR_2_1 in umlRdbms) { - * middle (c2t_2_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; + * middle (c2t_2_1 : umltordbms::ClassToTable; * | * ) * { | * } - * rdbms (pk_2_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Key; - * pc_2_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * rdbms (pk_2_1 : simplerdbms::Key; + * pc_2_1 : simplerdbms::Column; * | * ) * { | @@ -1113,7 +1059,7 @@ public class umlRdbms extends AbstractTransformation // assignments c2t_2_1.setPrimaryKey(pk_2_1); c2t_2_1.setColumn(pc_2_1); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1128,9 +1074,9 @@ public class umlRdbms extends AbstractTransformation * ) * { | * } - * rdbms (pk_2_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Key; - * pc_2_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; - * t_2_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; + * rdbms (pk_2_2 : simplerdbms::Key; + * pc_2_2 : simplerdbms::Column; + * t_2_2 : simplerdbms::Table; * | * ) * { | @@ -1154,7 +1100,7 @@ public class umlRdbms extends AbstractTransformation pc_2_2.setName(sum); final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(name_0, STR__pk); pk_2_2.setName(sum_0); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1165,20 +1111,20 @@ public class umlRdbms extends AbstractTransformation /** * * map associationToForeignKeyLM in umlRdbms) { - * uml (p : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Package; - * sc : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * dc : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * a : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Association; + * uml (p : simpleuml::Package; + * sc : simpleuml::Class; + * dc : simpleuml::Class; + * a : simpleuml::Association; * | * ) * { | * } - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; - * sc2t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; - * dc2t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; + * middle (p2s : umltordbms::PackageToSchema; + * sc2t : umltordbms::ClassToTable; + * dc2t : umltordbms::ClassToTable; * | * ) - * {realize a2f : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AssociationToForeignKey; + * {realize a2f : umltordbms::AssociationToForeignKey; * | * } * where ( | @@ -1223,7 +1169,7 @@ public class umlRdbms extends AbstractTransformation final @Nullable /*@Thrown*/ Class source = a.getSource(); final @Nullable /*@Thrown*/ Class sc = source; if (dc == null) { - throw new InvalidValueException("Null source for \'umltordbms::ClassToTable.umlClass\'"); + throw new InvalidValueException("Null source for \'umltordbms::ClassToTable::umlClass\'"); } if (dc instanceof InvalidValueException) { throw (InvalidValueException)dc; @@ -1231,7 +1177,7 @@ public class umlRdbms extends AbstractTransformation final @Nullable /*@Thrown*/ ClassToTable ClassToTable = DomainUtil.nonNullState (OPPOSITE_OF_ClassToTable_umlClass.get(dc)); final @Nullable /*@Thrown*/ ClassToTable dc2t = ClassToTable; if (sc == null) { - throw new InvalidValueException("Null source for \'umltordbms::ClassToTable.umlClass\'"); + throw new InvalidValueException("Null source for \'umltordbms::ClassToTable::umlClass\'"); } if (sc instanceof InvalidValueException) { throw (InvalidValueException)sc; @@ -1371,7 +1317,7 @@ public class umlRdbms extends AbstractTransformation symbol_33 = symbol_32; } a2f.setName(symbol_33); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1382,22 +1328,22 @@ public class umlRdbms extends AbstractTransformation /** * * map associationToForeignKeyMR in umlRdbms) { - * middle (p2s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PackageToSchema; - * sc2t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; - * dc2t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; - * a2f : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AssociationToForeignKey; + * middle (p2s : umltordbms::PackageToSchema; + * sc2t : umltordbms::ClassToTable; + * dc2t : umltordbms::ClassToTable; + * a2f : umltordbms::AssociationToForeignKey; * | * ) * { | * } - * rdbms (s : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Schema; - * st : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; - * dt : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; - * rk : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Key; + * rdbms (s : simplerdbms::Schema; + * st : simplerdbms::Table; + * dt : simplerdbms::Table; + * rk : simplerdbms::Key; * | * ) - * {realize fk : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::ForeignKey; - * realize fc : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * {realize fk : simplerdbms::ForeignKey; + * realize fc : simplerdbms::Column; * | * } * where ( | @@ -1463,9 +1409,9 @@ public class umlRdbms extends AbstractTransformation fc.setName(sum); fk.setOwner(st); fc.setOwner(st); - // mapping calls + // mapping statements if (referenced == null) { - throw new InvalidValueException("Null source for \'umltordbms::ClassToTable.table\'"); + throw new InvalidValueException("Null source for \'umltordbms::ClassToTable::table\'"); } final @Nullable /*@Thrown*/ Table table = referenced.getTable(); if (table == null) { @@ -1488,10 +1434,10 @@ public class umlRdbms extends AbstractTransformation * ) * { | * } - * rdbms (fk : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::ForeignKey; - * fc : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; - * dt : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; - * rk : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Key; + * rdbms (fk : simplerdbms::ForeignKey; + * fc : simplerdbms::Column; + * dt : simplerdbms::Table; + * rk : simplerdbms::Key; * | * ) * { | @@ -1524,11 +1470,11 @@ public class umlRdbms extends AbstractTransformation final @NonNull /*@Thrown*/ OrderedSetValue BOXED_column = idResolver.createOrderedSetOfAll(ORD_CLSSid_Column, column); final @Nullable /*@Thrown*/ Column first = (Column)OrderedCollectionFirstOperation.INSTANCE.evaluate(BOXED_column); if (first == null) { - throw new InvalidValueException("Null source for \'simplerdbms::Column.type\'"); + throw new InvalidValueException("Null source for \'simplerdbms::Column::type\'"); } final @Nullable /*@Thrown*/ String type = first.getType(); fc.setType(type); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1539,13 +1485,13 @@ public class umlRdbms extends AbstractTransformation /** * * map associationToForeignKeyMR_2 in umlRdbms) { - * middle (a2f_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AssociationToForeignKey; + * middle (a2f_1 : umltordbms::AssociationToForeignKey; * | * ) * { | * } - * rdbms (fk_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::ForeignKey; - * fc_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * rdbms (fk_1 : simplerdbms::ForeignKey; + * fc_1 : simplerdbms::Column; * | * ) * { | @@ -1566,7 +1512,7 @@ public class umlRdbms extends AbstractTransformation // assignments a2f_1.setForeignKey(fk_1); a2f_1.setColumn(fc_1); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1577,18 +1523,18 @@ public class umlRdbms extends AbstractTransformation /** * * map classPrimitiveAttributesLM in umlRdbms) { - * uml (c : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::PrimitiveDataType; - * a : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; + * uml (c : simpleuml::Class; + * t : simpleuml::PrimitiveDataType; + * a : simpleuml::Attribute; * | * ) * { | * } - * middle (fao : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; - * p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * middle (fao : umltordbms::ClassToTable; + * p2n : umltordbms::PrimitiveToName; * | * ) - * {realize atc : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AttributeToColumn; + * {realize atc : umltordbms::AttributeToColumn; * | * } * where ( | @@ -1625,7 +1571,7 @@ public class umlRdbms extends AbstractTransformation } final @Nullable /*@Thrown*/ PrimitiveDataType t_0 = (PrimitiveDataType)type; if (t_0 == null) { - throw new InvalidValueException("Null source for \'umltordbms::PrimitiveToName.primitive\'"); + throw new InvalidValueException("Null source for \'umltordbms::PrimitiveToName::primitive\'"); } final @NonNull /*@Thrown*/ PrimitiveToName PrimitiveToName = DomainUtil.nonNullState (OPPOSITE_OF_PrimitiveToName_primitive.get(t_0)); final @Nullable /*@Thrown*/ PrimitiveToName p2n_3 = PrimitiveToName; @@ -1647,7 +1593,7 @@ public class umlRdbms extends AbstractTransformation final List<AttributeToColumn> UNBOXED_Set = Set.asEcoreObjects(idResolver, AttributeToColumn.class); assert UNBOXED_Set != null; atc.getLeafs().addAll(UNBOXED_Set); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1658,17 +1604,17 @@ public class umlRdbms extends AbstractTransformation /** * * map classComplexAttributesLM in umlRdbms) { - * uml (c : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * a : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; + * uml (c : simpleuml::Class; + * t : simpleuml::Class; + * a : simpleuml::Attribute; * | * ) * { | * } - * middle (fao : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; + * middle (fao : umltordbms::ClassToTable; * | * ) - * {realize fa : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::NonLeafAttribute; + * {realize fa : umltordbms::NonLeafAttribute; * | * } * where ( | @@ -1731,7 +1677,7 @@ public class umlRdbms extends AbstractTransformation * leafs */ if (_1 == null) { - throw new InvalidValueException("Null source for \'umltordbms::FromAttribute.leafs\'"); + throw new InvalidValueException("Null source for \'umltordbms::FromAttribute::leafs\'"); } final @Nullable /*@Thrown*/ List<AttributeToColumn> leafs = _1.getLeafs(); assert leafs != null; @@ -1745,7 +1691,7 @@ public class umlRdbms extends AbstractTransformation final List<AttributeToColumn> UNBOXED_asSet = asSet.asEcoreObjects(idResolver, AttributeToColumn.class); assert UNBOXED_asSet != null; fa.getLeafs().addAll(UNBOXED_asSet); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1756,13 +1702,13 @@ public class umlRdbms extends AbstractTransformation /** * * map complexAttributePrimitiveAttributesLM in umlRdbms) { - * uml (c : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * ca : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; + * uml (c : simpleuml::Class; + * ca : simpleuml::Attribute; * | * ) * { | * } - * middle (fao : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::NonLeafAttribute; + * middle (fao : umltordbms::NonLeafAttribute; * | * ) * { | @@ -1772,12 +1718,14 @@ public class umlRdbms extends AbstractTransformation * c) * { | * } - * map complexAttributePrimitiveAttributesLM_1 { + * for anAttribute : simpleuml::Attribute in c.attributes { + * + * map complexAttributePrimitiveAttributesLM_1 { * c_1 := c; * ca_1 := ca; * fao_1 := fao; - * a_1 <= c.attributes; - * } + * a_1 := anAttribute; + * }} * } */ protected boolean complexAttributePrimitiveAttributesLM(final @NonNull /*@NonInvalid*/ Class c_2, final @NonNull /*@NonInvalid*/ Attribute ca) { @@ -1795,16 +1743,16 @@ public class umlRdbms extends AbstractTransformation } // creations // assignments - // mapping calls + // mapping statements final @Nullable /*@Thrown*/ List<Attribute> attributes = c_2.getAttributes(); assert attributes != null; - if (fao_2 == null) { - throw new InvalidValueException("Null binding for \'complexAttributePrimitiveAttributesLM_1::fao_1\'"); - } - for (Object a_1_2 : attributes) { - if (a_1_2 != null) { - complexAttributePrimitiveAttributesLM_1((Attribute)a_1_2, c_2, ca, fao_2); + ; + for (Attribute anAttribute : attributes) { + final @NonNull /*@NonInvalid*/ Attribute symbol_1 = (Attribute)anAttribute; + if (fao_2 == null) { + throw new InvalidValueException("Null binding for \'complexAttributePrimitiveAttributesLM_1::fao_1\'"); } + complexAttributePrimitiveAttributesLM_1(symbol_1, c_2, ca, fao_2); } return true; } @@ -1817,19 +1765,19 @@ public class umlRdbms extends AbstractTransformation * * map complexAttributePrimitiveAttributesLM_1 in umlRdbms) { * - * uml (c_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * t_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::PrimitiveDataType; - * a_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; - * ca_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; + * uml (c_1 : simpleuml::Class; + * t_1 : simpleuml::PrimitiveDataType; + * a_1 : simpleuml::Attribute; + * ca_1 : simpleuml::Attribute; * | * ) * { | * } - * middle (fao_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::NonLeafAttribute; - * p2n_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * middle (fao_1 : umltordbms::NonLeafAttribute; + * p2n_1 : umltordbms::PrimitiveToName; * | * ) - * {realize fa : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AttributeToColumn; + * {realize fa : umltordbms::AttributeToColumn; * | * } * where ( | @@ -1855,7 +1803,7 @@ public class umlRdbms extends AbstractTransformation } final @Nullable /*@Thrown*/ PrimitiveDataType t_1_0 = (PrimitiveDataType)type; if (t_1_0 == null) { - throw new InvalidValueException("Null source for \'umltordbms::PrimitiveToName.primitive\'"); + throw new InvalidValueException("Null source for \'umltordbms::PrimitiveToName::primitive\'"); } final @NonNull /*@Thrown*/ PrimitiveToName PrimitiveToName = DomainUtil.nonNullState (OPPOSITE_OF_PrimitiveToName_primitive.get(t_1_0)); final @Nullable /*@Thrown*/ PrimitiveToName p2n_1_0 = PrimitiveToName; @@ -1880,7 +1828,7 @@ public class umlRdbms extends AbstractTransformation final @Nullable /*@Thrown*/ String name_0 = a_1_0.getName(); final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, name_0); fa.setName(sum_0); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -1891,13 +1839,13 @@ public class umlRdbms extends AbstractTransformation /** * * map complexAttributeComplexAttributesLM in umlRdbms) { - * uml (c : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * ca : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; + * uml (c : simpleuml::Class; + * ca : simpleuml::Attribute; * | * ) * { | * } - * middle (fao : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::NonLeafAttribute; + * middle (fao : umltordbms::NonLeafAttribute; * | * ) * { | @@ -1907,12 +1855,14 @@ public class umlRdbms extends AbstractTransformation * c) * { | * } - * map complexAttributeComplexAttributesLM_1 { + * for anAttribute : simpleuml::Attribute in c.attributes { + * + * map complexAttributeComplexAttributesLM_1 { * ca_1 := ca; - * a_1 <= c.attributes; + * a_1 := anAttribute; * c_1 := c; * fao_1 := fao; - * } + * }} * } */ protected boolean complexAttributeComplexAttributesLM(final @NonNull /*@NonInvalid*/ Class c_3, final @NonNull /*@NonInvalid*/ Attribute ca_0) { @@ -1930,16 +1880,16 @@ public class umlRdbms extends AbstractTransformation } // creations // assignments - // mapping calls + // mapping statements final @Nullable /*@Thrown*/ List<Attribute> attributes = c_3.getAttributes(); assert attributes != null; - if (fao_2 == null) { - throw new InvalidValueException("Null binding for \'complexAttributeComplexAttributesLM_1::fao_1\'"); - } - for (Object a_1_2 : attributes) { - if (a_1_2 != null) { - complexAttributeComplexAttributesLM_1((Attribute)a_1_2, c_3, ca_0, fao_2); + ; + for (Attribute anAttribute : attributes) { + final @NonNull /*@NonInvalid*/ Attribute symbol_1 = (Attribute)anAttribute; + if (fao_2 == null) { + throw new InvalidValueException("Null binding for \'complexAttributeComplexAttributesLM_1::fao_1\'"); } + complexAttributeComplexAttributesLM_1(symbol_1, c_3, ca_0, fao_2); } return true; } @@ -1951,18 +1901,18 @@ public class umlRdbms extends AbstractTransformation /** * * map complexAttributeComplexAttributesLM_1 in umlRdbms) { - * uml (c_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * ca_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; - * t_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Class; - * a_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleUML.ecore#/'::Attribute; + * uml (c_1 : simpleuml::Class; + * ca_1 : simpleuml::Attribute; + * t_1 : simpleuml::Class; + * a_1 : simpleuml::Attribute; * | * ) * { | * } - * middle (fao_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::NonLeafAttribute; + * middle (fao_1 : umltordbms::NonLeafAttribute; * | * ) - * {realize fa : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::NonLeafAttribute; + * {realize fa : umltordbms::NonLeafAttribute; * | * } * where ( | @@ -2014,7 +1964,7 @@ public class umlRdbms extends AbstractTransformation * leafs */ if (_1 == null) { - throw new InvalidValueException("Null source for \'umltordbms::FromAttribute.leafs\'"); + throw new InvalidValueException("Null source for \'umltordbms::FromAttribute::leafs\'"); } final @Nullable /*@Thrown*/ List<AttributeToColumn> leafs = _1.getLeafs(); assert leafs != null; @@ -2037,7 +1987,7 @@ public class umlRdbms extends AbstractTransformation final @Nullable /*@Thrown*/ String name_0 = a_1_1.getName(); final @NonNull /*@Thrown*/ String sum_0 = StringConcatOperation.INSTANCE.evaluate(sum, name_0); fa.setName(sum_0); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -2048,18 +1998,18 @@ public class umlRdbms extends AbstractTransformation /** * * map attributeColumnsMR in umlRdbms) { - * middle (c2t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::ClassToTable; - * a2c : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AttributeToColumn; - * p2n : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * middle (c2t : umltordbms::ClassToTable; + * a2c : umltordbms::AttributeToColumn; + * p2n : umltordbms::PrimitiveToName; * | * ) * { | * } - * rdbms (t : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Table; + * rdbms (t : simplerdbms::Table; * ct : String; * | * ) - * {realize c : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * {realize c : simplerdbms::Column; * | * } * where ( | @@ -2095,7 +2045,7 @@ public class umlRdbms extends AbstractTransformation final @Nullable /*@Thrown*/ PrimitiveToName type = a2c.getType(); final @Nullable /*@Thrown*/ PrimitiveToName p2n_3 = type; if (p2n_3 == null) { - throw new InvalidValueException("Null source for \'umltordbms::PrimitiveToName.typeName\'"); + throw new InvalidValueException("Null source for \'umltordbms::PrimitiveToName::typeName\'"); } final @Nullable /*@Thrown*/ String typeName = p2n_3.getTypeName(); final @Nullable /*@Thrown*/ String ct = typeName; @@ -2105,7 +2055,7 @@ public class umlRdbms extends AbstractTransformation modelObjects[1/*rdbms*/].add(c); // assignments c.setOwner(t); - // mapping calls + // mapping statements attributeColumnsMR_1(a2c, c); if (ct == null) { throw new InvalidValueException("Null binding for \'attributeColumnsMR_2::ct_2\'"); @@ -2122,12 +2072,12 @@ public class umlRdbms extends AbstractTransformation /** * * map attributeColumnsMR_1 in umlRdbms) { - * middle (a2c_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AttributeToColumn; + * middle (a2c_1 : umltordbms::AttributeToColumn; * | * ) * { | * } - * rdbms (c_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * rdbms (c_1 : simplerdbms::Column; * | * ) * { | @@ -2146,7 +2096,7 @@ public class umlRdbms extends AbstractTransformation // creations // assignments a2c_1.setColumn(c_1_2); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -2157,13 +2107,13 @@ public class umlRdbms extends AbstractTransformation /** * * map attributeColumnsMR_2 in umlRdbms) { - * middle (p2n_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; - * a2c_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AttributeToColumn; + * middle (p2n_2 : umltordbms::PrimitiveToName; + * a2c_2 : umltordbms::AttributeToColumn; * | * ) * { | * } - * rdbms (c_2 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * rdbms (c_2 : simplerdbms::Column; * ct_2 : String; * | * ) @@ -2192,7 +2142,7 @@ public class umlRdbms extends AbstractTransformation // creations // assignments c_2_0.setType(ct_2); - // mapping calls + // mapping statements attributeColumnsMR_2_1(ct_2, p2n_2); return true; } @@ -2204,7 +2154,7 @@ public class umlRdbms extends AbstractTransformation /** * * map attributeColumnsMR_2_1 in umlRdbms) { - * middle (p2n_2_1 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::PrimitiveToName; + * middle (p2n_2_1 : umltordbms::PrimitiveToName; * | * ) * { | @@ -2228,7 +2178,7 @@ public class umlRdbms extends AbstractTransformation // creations // assignments p2n_2_1.setTypeName(ct_2_1); - // mapping calls + // mapping statements return true; } catch (Exception e) { @@ -2239,12 +2189,12 @@ public class umlRdbms extends AbstractTransformation /** * * map attributeColumnsMR_3 in umlRdbms) { - * middle (a2c_3 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/UMLtoRDBMS.ecore#/'::AttributeToColumn; + * middle (a2c_3 : umltordbms::AttributeToColumn; * | * ) * { | * } - * rdbms (c_3 : _'file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/models/ClassToRDBMS/SimpleRDBMS.ecore#/'::Column; + * rdbms (c_3 : simplerdbms::Column; * | * ) * { | @@ -2267,7 +2217,7 @@ public class umlRdbms extends AbstractTransformation c_3_0.setName(name); final @Nullable /*@Thrown*/ String kind = a2c_3.getKind(); c_3_0.setKind(kind); - // mapping calls + // mapping statements return true; } catch (Exception e) { |