Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2010-03-09 15:12:01 -0500
committeratikhomirov2010-03-09 15:12:01 -0500
commit9dde6fd77983286b34dfc519d473dc3978e1d6eb (patch)
tree1119e205d3f38d20326d455e6b853fe97f07327b
parent7ebce3d244ace680f46fd8e3f3303865f54ef71b (diff)
downloadorg.eclipse.gmf-tooling-9dde6fd77983286b34dfc519d473dc3978e1d6eb.tar.gz
org.eclipse.gmf-tooling-9dde6fd77983286b34dfc519d473dc3978e1d6eb.tar.xz
org.eclipse.gmf-tooling-9dde6fd77983286b34dfc519d473dc3978e1d6eb.zip
[138179] Allow to define labels based on attributes of referenced objects - script/expression-backed labels
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore54
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.emf23
-rw-r--r--plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel10
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelModelFacet.java82
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelParser.java109
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java144
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java9
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelModelFacetImpl.java236
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelParserImpl.java244
-rw-r--r--plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java63
10 files changed, 534 insertions, 440 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
index 7328bbf23..7c65118d2 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.ecore
@@ -103,9 +103,21 @@
<details key="ocl" value="diagramRunTimeClass.ecoreClass.eAllSuperTypes->including(diagramRunTimeClass.ecoreClass)->one(ePackage.name = 'notation' and name = 'Diagram')"/>
<details key="description" value="'Diagram Runtime Class' must be a notation::Diagram or sub-class"/>
</eAnnotations>
- <eOperations name="getAllNodes" upperBound="-1" eType="#//GenNode"/>
- <eOperations name="getAllChildContainers" upperBound="-1" eType="#//GenChildContainer"/>
- <eOperations name="getAllContainers" upperBound="-1" eType="#//GenContainerBase"/>
+ <eOperations name="getAllNodes" upperBound="-1" eType="#//GenNode">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Handy operation to get top and child nodes"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getAllChildContainers" upperBound="-1" eType="#//GenChildContainer">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="All nodes (top and child) and compartments"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getAllContainers" upperBound="-1" eType="#//GenContainerBase">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="All nodes, compartments and diagram itself"/>
+ </eAnnotations>
+ </eOperations>
<eOperations name="getElementInitializersClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Gets the name of the class to hold the initializer methods for domain elements"/>
@@ -1213,22 +1225,6 @@
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Model facet of a label calculated with an expression"/>
</eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="viewExpression" lowerBound="1"
- eType="#//ValueExpression">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="Expression to calculate user-readable label value"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="editExpression" eType="#//ValueExpression">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="Optional expression to represent value for editing"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="validateExpression" eType="#//GenConstraint">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="Optional expression to answer whether user input is ok for further parsing"/>
- </eAnnotations>
- </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Attributes" abstract="true" interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
@@ -2301,7 +2297,7 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ExpressionLabelParser" eSuperTypes="#//GenParserImplementation">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value=""/>
+ <details key="documentation" value="Parser implementation that uses expressions to produce string values"/>
</eAnnotations>
<eOperations name="getQualifiedClassName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="className" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
@@ -2309,6 +2305,24 @@
<details key="documentation" value="Provides means to alter name of parser implementation class"/>
</eAnnotations>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expressionContext" lowerBound="1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore#//GenClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewExpression" lowerBound="1"
+ eType="#//ValueExpression">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Expression to calculate user-readable label value; facet's owner type is evaluation context."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="editExpression" eType="#//ValueExpression">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Optional expression to represent value for editing"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="validateExpression" eType="#//GenConstraint">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Optional expression to answer whether user input is ok for further parsing. Note, context here is string, not facet's owner type"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CustomParser" eSuperTypes="#//GenParserImplementation">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf b/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf
index 8ccb8316d..913fe3bfc 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.emf
@@ -72,8 +72,11 @@ class GenDiagram extends GenContainerBase, PackageNames, ProviderClassNames, Lin
val GenCompartment[*]#diagram compartments;
val Palette[?]#diagram palette;
attr boolean synchronized = true;
+ @genmodel(documentation="Handy operation to get top and child nodes")
op GenNode[*] getAllNodes();
+ @genmodel(documentation="All nodes (top and child) and compartments")
op GenChildContainer[*] getAllChildContainers();
+ @genmodel(documentation="All nodes, compartments and diagram itself")
op GenContainerBase[*] getAllContainers();
@genmodel(documentation="Gets the name of the class to hold the initializer methods for domain elements")
op String getElementInitializersClassName();
@@ -847,12 +850,10 @@ class DesignLabelModelFacet extends LabelModelFacet {
@genmodel(documentation="Model facet of a label calculated with an expression")
class ExpressionLabelModelFacet extends LabelModelFacet {
- @genmodel(documentation="Expression to calculate user-readable label value")
- ref ValueExpression[1] viewExpression;
- @genmodel(documentation="Optional expression to represent value for editing")
- ref ValueExpression[?] editExpression;
- @genmodel(documentation="Optional expression to answer whether user input is ok for further parsing")
- ref GenConstraint[?] validateExpression;
+ // right now it is just a marker, in case we need extra information in future
+ // ExpressionLabelParser doesn't rely on any specific kind of model facet.
+ // XXX perhaps, we may try to use other LabelModelFacets (e.g. FeatureLabelModelFacet) to generate
+ // extra support (i.e. handle notification changes based on #features)
}
/////////////
@@ -1588,11 +1589,19 @@ class PredefinedParser extends GenParserImplementation {
op String getQualifiedClassName();
}
-@genmodel(documentation="")
+@genmodel(documentation="Parser implementation that uses expressions to produce string values")
class ExpressionLabelParser extends GenParserImplementation {
@genmodel(documentation="Provides means to alter name of parser implementation class")
attr String[?] className;
op String getQualifiedClassName();
+ ref genmodel.GenClass[1] expressionContext;
+ //
+ @genmodel(documentation="Expression to calculate user-readable label value; facet's owner type is evaluation context.")
+ ref ValueExpression[1] viewExpression;
+ @genmodel(documentation="Optional expression to represent value for editing")
+ ref ValueExpression[?] editExpression;
+ @genmodel(documentation="Optional expression to answer whether user input is ok for further parsing. Note, context here is string, not facet's owner type")
+ ref GenConstraint[?] validateExpression;
}
@genmodel(documentation="Handwritten or otherwise available IParser implementation")
diff --git a/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
index 7a7d8f412..307dcd75c 100644
--- a/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
+++ b/plugins/org.eclipse.gmf.codegen/models/gmfgen.genmodel
@@ -620,11 +620,7 @@
<genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//FeatureLabelModelFacet/editMethod"/>
</genClasses>
<genClasses ecoreClass="gmfgen.ecore#//DesignLabelModelFacet"/>
- <genClasses ecoreClass="gmfgen.ecore#//ExpressionLabelModelFacet">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ExpressionLabelModelFacet/viewExpression"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ExpressionLabelModelFacet/editExpression"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ExpressionLabelModelFacet/validateExpression"/>
- </genClasses>
+ <genClasses ecoreClass="gmfgen.ecore#//ExpressionLabelModelFacet"/>
<genClasses ecoreClass="gmfgen.ecore#//Attributes"/>
<genClasses ecoreClass="gmfgen.ecore#//ColorAttributes">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//ColorAttributes/foregroundColor"/>
@@ -1039,6 +1035,10 @@
</genClasses>
<genClasses ecoreClass="gmfgen.ecore#//ExpressionLabelParser">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgen.ecore#//ExpressionLabelParser/className"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ExpressionLabelParser/expressionContext"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ExpressionLabelParser/viewExpression"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ExpressionLabelParser/editExpression"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference gmfgen.ecore#//ExpressionLabelParser/validateExpression"/>
<genOperations ecoreOperation="gmfgen.ecore#//ExpressionLabelParser/getQualifiedClassName"/>
</genClasses>
<genClasses ecoreClass="gmfgen.ecore#//CustomParser">
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelModelFacet.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelModelFacet.java
index 6de7c3b28..1749db8e2 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelModelFacet.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelModelFacet.java
@@ -16,93 +16,11 @@ package org.eclipse.gmf.codegen.gmfgen;
* Model facet of a label calculated with an expression
* <!-- end-model-doc -->
*
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getViewExpression <em>View Expression</em>}</li>
- * <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getEditExpression <em>Edit Expression</em>}</li>
- * <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getValidateExpression <em>Validate Expression</em>}</li>
- * </ul>
- * </p>
*
* @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelModelFacet()
* @model
* @generated
*/
public interface ExpressionLabelModelFacet extends LabelModelFacet {
- /**
- * Returns the value of the '<em><b>View Expression</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Expression to calculate user-readable label value
- * <!-- end-model-doc -->
- * @return the value of the '<em>View Expression</em>' reference.
- * @see #setViewExpression(ValueExpression)
- * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelModelFacet_ViewExpression()
- * @model required="true"
- * @generated
- */
- ValueExpression getViewExpression();
-
- /**
- * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getViewExpression <em>View Expression</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>View Expression</em>' reference.
- * @see #getViewExpression()
- * @generated
- */
- void setViewExpression(ValueExpression value);
-
- /**
- * Returns the value of the '<em><b>Edit Expression</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Optional expression to represent value for editing
- * <!-- end-model-doc -->
- * @return the value of the '<em>Edit Expression</em>' reference.
- * @see #setEditExpression(ValueExpression)
- * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelModelFacet_EditExpression()
- * @model
- * @generated
- */
- ValueExpression getEditExpression();
-
- /**
- * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getEditExpression <em>Edit Expression</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Edit Expression</em>' reference.
- * @see #getEditExpression()
- * @generated
- */
- void setEditExpression(ValueExpression value);
-
- /**
- * Returns the value of the '<em><b>Validate Expression</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Optional expression to answer whether user input is ok for further parsing
- * <!-- end-model-doc -->
- * @return the value of the '<em>Validate Expression</em>' reference.
- * @see #setValidateExpression(GenConstraint)
- * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelModelFacet_ValidateExpression()
- * @model
- * @generated
- */
- GenConstraint getValidateExpression();
-
- /**
- * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getValidateExpression <em>Validate Expression</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Validate Expression</em>' reference.
- * @see #getValidateExpression()
- * @generated
- */
- void setValidateExpression(GenConstraint value);
} // ExpressionLabelModelFacet
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelParser.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelParser.java
index 3865a7cad..2e3b5ba1f 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelParser.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/ExpressionLabelParser.java
@@ -6,6 +6,8 @@
*/
package org.eclipse.gmf.codegen.gmfgen;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
+
/**
* <!-- begin-user-doc -->
@@ -13,13 +15,17 @@ package org.eclipse.gmf.codegen.gmfgen;
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
- *
+ * Parser implementation that uses expressions to produce string values
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getClassName <em>Class Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getExpressionContext <em>Expression Context</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getViewExpression <em>View Expression</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getEditExpression <em>Edit Expression</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getValidateExpression <em>Validate Expression</em>}</li>
* </ul>
* </p>
*
@@ -54,6 +60,107 @@ public interface ExpressionLabelParser extends GenParserImplementation {
void setClassName(String value);
/**
+ * Returns the value of the '<em><b>Expression Context</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Expression Context</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Expression Context</em>' reference.
+ * @see #setExpressionContext(GenClass)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelParser_ExpressionContext()
+ * @model required="true"
+ * @generated
+ */
+ GenClass getExpressionContext();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getExpressionContext <em>Expression Context</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Expression Context</em>' reference.
+ * @see #getExpressionContext()
+ * @generated
+ */
+ void setExpressionContext(GenClass value);
+
+ /**
+ * Returns the value of the '<em><b>View Expression</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Expression to calculate user-readable label value; facet's owner type is evaluation context.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>View Expression</em>' reference.
+ * @see #setViewExpression(ValueExpression)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelParser_ViewExpression()
+ * @model required="true"
+ * @generated
+ */
+ ValueExpression getViewExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getViewExpression <em>View Expression</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>View Expression</em>' reference.
+ * @see #getViewExpression()
+ * @generated
+ */
+ void setViewExpression(ValueExpression value);
+
+ /**
+ * Returns the value of the '<em><b>Edit Expression</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Optional expression to represent value for editing
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Edit Expression</em>' reference.
+ * @see #setEditExpression(ValueExpression)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelParser_EditExpression()
+ * @model
+ * @generated
+ */
+ ValueExpression getEditExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getEditExpression <em>Edit Expression</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Edit Expression</em>' reference.
+ * @see #getEditExpression()
+ * @generated
+ */
+ void setEditExpression(ValueExpression value);
+
+ /**
+ * Returns the value of the '<em><b>Validate Expression</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Optional expression to answer whether user input is ok for further parsing. Note, context here is string, not facet's owner type
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Validate Expression</em>' reference.
+ * @see #setValidateExpression(GenConstraint)
+ * @see org.eclipse.gmf.codegen.gmfgen.GMFGenPackage#getExpressionLabelParser_ValidateExpression()
+ * @model
+ * @generated
+ */
+ GenConstraint getValidateExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getValidateExpression <em>Validate Expression</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Validate Expression</em>' reference.
+ * @see #getValidateExpression()
+ * @generated
+ */
+ void setValidateExpression(GenConstraint value);
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @model kind="operation"
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
index bfcf83654..e3ac1c620 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GMFGenPackage.java
@@ -6176,40 +6176,13 @@ public interface GMFGenPackage extends EPackage {
int EXPRESSION_LABEL_MODEL_FACET__PARSER = LABEL_MODEL_FACET__PARSER;
/**
- * The feature id for the '<em><b>View Expression</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPRESSION_LABEL_MODEL_FACET__VIEW_EXPRESSION = LABEL_MODEL_FACET_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Edit Expression</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPRESSION_LABEL_MODEL_FACET__EDIT_EXPRESSION = LABEL_MODEL_FACET_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Validate Expression</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPRESSION_LABEL_MODEL_FACET__VALIDATE_EXPRESSION = LABEL_MODEL_FACET_FEATURE_COUNT + 2;
-
- /**
* The number of structural features of the '<em>Expression Label Model Facet</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int EXPRESSION_LABEL_MODEL_FACET_FEATURE_COUNT = LABEL_MODEL_FACET_FEATURE_COUNT + 3;
+ int EXPRESSION_LABEL_MODEL_FACET_FEATURE_COUNT = LABEL_MODEL_FACET_FEATURE_COUNT + 0;
/**
* The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.ViewmapImpl <em>Viewmap</em>}' class.
@@ -10820,13 +10793,49 @@ public interface GMFGenPackage extends EPackage {
int EXPRESSION_LABEL_PARSER__CLASS_NAME = GEN_PARSER_IMPLEMENTATION_FEATURE_COUNT + 0;
/**
+ * The feature id for the '<em><b>Expression Context</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPRESSION_LABEL_PARSER__EXPRESSION_CONTEXT = GEN_PARSER_IMPLEMENTATION_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>View Expression</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPRESSION_LABEL_PARSER__VIEW_EXPRESSION = GEN_PARSER_IMPLEMENTATION_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Edit Expression</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPRESSION_LABEL_PARSER__EDIT_EXPRESSION = GEN_PARSER_IMPLEMENTATION_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Validate Expression</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPRESSION_LABEL_PARSER__VALIDATE_EXPRESSION = GEN_PARSER_IMPLEMENTATION_FEATURE_COUNT + 4;
+
+ /**
* The number of structural features of the '<em>Expression Label Parser</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int EXPRESSION_LABEL_PARSER_FEATURE_COUNT = GEN_PARSER_IMPLEMENTATION_FEATURE_COUNT + 1;
+ int EXPRESSION_LABEL_PARSER_FEATURE_COUNT = GEN_PARSER_IMPLEMENTATION_FEATURE_COUNT + 5;
/**
* The meta object id for the '{@link org.eclipse.gmf.codegen.gmfgen.impl.CustomParserImpl <em>Custom Parser</em>}' class.
@@ -14361,39 +14370,6 @@ public interface GMFGenPackage extends EPackage {
EClass getExpressionLabelModelFacet();
/**
- * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getViewExpression <em>View Expression</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>View Expression</em>'.
- * @see org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getViewExpression()
- * @see #getExpressionLabelModelFacet()
- * @generated
- */
- EReference getExpressionLabelModelFacet_ViewExpression();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getEditExpression <em>Edit Expression</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Edit Expression</em>'.
- * @see org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getEditExpression()
- * @see #getExpressionLabelModelFacet()
- * @generated
- */
- EReference getExpressionLabelModelFacet_EditExpression();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getValidateExpression <em>Validate Expression</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Validate Expression</em>'.
- * @see org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet#getValidateExpression()
- * @see #getExpressionLabelModelFacet()
- * @generated
- */
- EReference getExpressionLabelModelFacet_ValidateExpression();
-
- /**
* Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.TypeLinkModelFacet <em>Type Link Model Facet</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -17589,6 +17565,50 @@ public interface GMFGenPackage extends EPackage {
EAttribute getExpressionLabelParser_ClassName();
/**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getExpressionContext <em>Expression Context</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Expression Context</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getExpressionContext()
+ * @see #getExpressionLabelParser()
+ * @generated
+ */
+ EReference getExpressionLabelParser_ExpressionContext();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getViewExpression <em>View Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>View Expression</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getViewExpression()
+ * @see #getExpressionLabelParser()
+ * @generated
+ */
+ EReference getExpressionLabelParser_ViewExpression();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getEditExpression <em>Edit Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Edit Expression</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getEditExpression()
+ * @see #getExpressionLabelParser()
+ * @generated
+ */
+ EReference getExpressionLabelParser_EditExpression();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getValidateExpression <em>Validate Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Validate Expression</em>'.
+ * @see org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser#getValidateExpression()
+ * @see #getExpressionLabelParser()
+ * @generated
+ */
+ EReference getExpressionLabelParser_ValidateExpression();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.gmf.codegen.gmfgen.CustomParser <em>Custom Parser</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java
index 40c11bbc0..44c4ab8ee 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/GenDiagram.java
@@ -257,6 +257,9 @@ public interface GenDiagram extends GenContainerBase, PackageNames, ProviderClas
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Handy operation to get top and child nodes
+ * <!-- end-model-doc -->
* @model kind="operation"
* @generated
*/
@@ -265,6 +268,9 @@ public interface GenDiagram extends GenContainerBase, PackageNames, ProviderClas
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * All nodes (top and child) and compartments
+ * <!-- end-model-doc -->
* @model kind="operation"
* @generated
*/
@@ -273,6 +279,9 @@ public interface GenDiagram extends GenContainerBase, PackageNames, ProviderClas
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * All nodes, compartments and diagram itself
+ * <!-- end-model-doc -->
* @model kind="operation"
* @generated
*/
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelModelFacetImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelModelFacetImpl.java
index dae380360..1d2f8dbc1 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelModelFacetImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelModelFacetImpl.java
@@ -6,62 +6,21 @@
*/
package org.eclipse.gmf.codegen.gmfgen.impl;
-import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
import org.eclipse.gmf.codegen.gmfgen.ExpressionLabelModelFacet;
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
-import org.eclipse.gmf.codegen.gmfgen.GenConstraint;
-import org.eclipse.gmf.codegen.gmfgen.ValueExpression;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Expression Label Model Facet</b></em>'.
* <!-- end-user-doc -->
* <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelModelFacetImpl#getViewExpression <em>View Expression</em>}</li>
- * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelModelFacetImpl#getEditExpression <em>Edit Expression</em>}</li>
- * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelModelFacetImpl#getValidateExpression <em>Validate Expression</em>}</li>
- * </ul>
* </p>
*
* @generated
*/
public class ExpressionLabelModelFacetImpl extends LabelModelFacetImpl implements ExpressionLabelModelFacet {
/**
- * The cached value of the '{@link #getViewExpression() <em>View Expression</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getViewExpression()
- * @generated
- * @ordered
- */
- protected ValueExpression viewExpression;
- /**
- * The cached value of the '{@link #getEditExpression() <em>Edit Expression</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getEditExpression()
- * @generated
- * @ordered
- */
- protected ValueExpression editExpression;
- /**
- * The cached value of the '{@link #getValidateExpression() <em>Validate Expression</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getValidateExpression()
- * @generated
- * @ordered
- */
- protected GenConstraint validateExpression;
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -80,199 +39,4 @@ public class ExpressionLabelModelFacetImpl extends LabelModelFacetImpl implement
return GMFGenPackage.eINSTANCE.getExpressionLabelModelFacet();
}
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ValueExpression getViewExpression() {
- if (viewExpression != null && viewExpression.eIsProxy()) {
- InternalEObject oldViewExpression = (InternalEObject)viewExpression;
- viewExpression = (ValueExpression)eResolveProxy(oldViewExpression);
- if (viewExpression != oldViewExpression) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VIEW_EXPRESSION, oldViewExpression, viewExpression));
- }
- }
- return viewExpression;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ValueExpression basicGetViewExpression() {
- return viewExpression;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setViewExpression(ValueExpression newViewExpression) {
- ValueExpression oldViewExpression = viewExpression;
- viewExpression = newViewExpression;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VIEW_EXPRESSION, oldViewExpression, viewExpression));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ValueExpression getEditExpression() {
- if (editExpression != null && editExpression.eIsProxy()) {
- InternalEObject oldEditExpression = (InternalEObject)editExpression;
- editExpression = (ValueExpression)eResolveProxy(oldEditExpression);
- if (editExpression != oldEditExpression) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__EDIT_EXPRESSION, oldEditExpression, editExpression));
- }
- }
- return editExpression;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ValueExpression basicGetEditExpression() {
- return editExpression;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setEditExpression(ValueExpression newEditExpression) {
- ValueExpression oldEditExpression = editExpression;
- editExpression = newEditExpression;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__EDIT_EXPRESSION, oldEditExpression, editExpression));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GenConstraint getValidateExpression() {
- if (validateExpression != null && validateExpression.eIsProxy()) {
- InternalEObject oldValidateExpression = (InternalEObject)validateExpression;
- validateExpression = (GenConstraint)eResolveProxy(oldValidateExpression);
- if (validateExpression != oldValidateExpression) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VALIDATE_EXPRESSION, oldValidateExpression, validateExpression));
- }
- }
- return validateExpression;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GenConstraint basicGetValidateExpression() {
- return validateExpression;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setValidateExpression(GenConstraint newValidateExpression) {
- GenConstraint oldValidateExpression = validateExpression;
- validateExpression = newValidateExpression;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VALIDATE_EXPRESSION, oldValidateExpression, validateExpression));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VIEW_EXPRESSION:
- if (resolve) return getViewExpression();
- return basicGetViewExpression();
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__EDIT_EXPRESSION:
- if (resolve) return getEditExpression();
- return basicGetEditExpression();
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VALIDATE_EXPRESSION:
- if (resolve) return getValidateExpression();
- return basicGetValidateExpression();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VIEW_EXPRESSION:
- setViewExpression((ValueExpression)newValue);
- return;
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__EDIT_EXPRESSION:
- setEditExpression((ValueExpression)newValue);
- return;
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VALIDATE_EXPRESSION:
- setValidateExpression((GenConstraint)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VIEW_EXPRESSION:
- setViewExpression((ValueExpression)null);
- return;
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__EDIT_EXPRESSION:
- setEditExpression((ValueExpression)null);
- return;
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VALIDATE_EXPRESSION:
- setValidateExpression((GenConstraint)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VIEW_EXPRESSION:
- return viewExpression != null;
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__EDIT_EXPRESSION:
- return editExpression != null;
- case GMFGenPackage.EXPRESSION_LABEL_MODEL_FACET__VALIDATE_EXPRESSION:
- return validateExpression != null;
- }
- return super.eIsSet(featureID);
- }
-
} //ExpressionLabelModelFacetImpl
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelParserImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelParserImpl.java
index ae7418d77..2db1ba9bd 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelParserImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/ExpressionLabelParserImpl.java
@@ -6,14 +6,18 @@
*/
package org.eclipse.gmf.codegen.gmfgen.impl;
+import org.eclipse.emf.codegen.ecore.genmodel.GenClass;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.gmf.codegen.gmfgen.ExpressionLabelParser;
import org.eclipse.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.GenConstraint;
+import org.eclipse.gmf.codegen.gmfgen.ValueExpression;
import org.eclipse.gmf.codegen.gmfgen.GenCommonBase;
/**
@@ -24,6 +28,10 @@ import org.eclipse.gmf.codegen.gmfgen.GenCommonBase;
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelParserImpl#getClassName <em>Class Name</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelParserImpl#getExpressionContext <em>Expression Context</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelParserImpl#getViewExpression <em>View Expression</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelParserImpl#getEditExpression <em>Edit Expression</em>}</li>
+ * <li>{@link org.eclipse.gmf.codegen.gmfgen.impl.ExpressionLabelParserImpl#getValidateExpression <em>Validate Expression</em>}</li>
* </ul>
* </p>
*
@@ -51,6 +59,46 @@ public class ExpressionLabelParserImpl extends GenParserImplementationImpl imple
protected String className = CLASS_NAME_EDEFAULT;
/**
+ * The cached value of the '{@link #getExpressionContext() <em>Expression Context</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExpressionContext()
+ * @generated
+ * @ordered
+ */
+ protected GenClass expressionContext;
+
+ /**
+ * The cached value of the '{@link #getViewExpression() <em>View Expression</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViewExpression()
+ * @generated
+ * @ordered
+ */
+ protected ValueExpression viewExpression;
+
+ /**
+ * The cached value of the '{@link #getEditExpression() <em>Edit Expression</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEditExpression()
+ * @generated
+ * @ordered
+ */
+ protected ValueExpression editExpression;
+
+ /**
+ * The cached value of the '{@link #getValidateExpression() <em>Validate Expression</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValidateExpression()
+ * @generated
+ * @ordered
+ */
+ protected GenConstraint validateExpression;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -111,6 +159,158 @@ public class ExpressionLabelParserImpl extends GenParserImplementationImpl imple
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @generated
+ */
+ public GenClass getExpressionContext() {
+ if (expressionContext != null && expressionContext.eIsProxy()) {
+ InternalEObject oldExpressionContext = (InternalEObject)expressionContext;
+ expressionContext = (GenClass)eResolveProxy(oldExpressionContext);
+ if (expressionContext != oldExpressionContext) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.EXPRESSION_LABEL_PARSER__EXPRESSION_CONTEXT, oldExpressionContext, expressionContext));
+ }
+ }
+ return expressionContext;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenClass basicGetExpressionContext() {
+ return expressionContext;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExpressionContext(GenClass newExpressionContext) {
+ GenClass oldExpressionContext = expressionContext;
+ expressionContext = newExpressionContext;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.EXPRESSION_LABEL_PARSER__EXPRESSION_CONTEXT, oldExpressionContext, expressionContext));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValueExpression getViewExpression() {
+ if (viewExpression != null && viewExpression.eIsProxy()) {
+ InternalEObject oldViewExpression = (InternalEObject)viewExpression;
+ viewExpression = (ValueExpression)eResolveProxy(oldViewExpression);
+ if (viewExpression != oldViewExpression) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.EXPRESSION_LABEL_PARSER__VIEW_EXPRESSION, oldViewExpression, viewExpression));
+ }
+ }
+ return viewExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValueExpression basicGetViewExpression() {
+ return viewExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setViewExpression(ValueExpression newViewExpression) {
+ ValueExpression oldViewExpression = viewExpression;
+ viewExpression = newViewExpression;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.EXPRESSION_LABEL_PARSER__VIEW_EXPRESSION, oldViewExpression, viewExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValueExpression getEditExpression() {
+ if (editExpression != null && editExpression.eIsProxy()) {
+ InternalEObject oldEditExpression = (InternalEObject)editExpression;
+ editExpression = (ValueExpression)eResolveProxy(oldEditExpression);
+ if (editExpression != oldEditExpression) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.EXPRESSION_LABEL_PARSER__EDIT_EXPRESSION, oldEditExpression, editExpression));
+ }
+ }
+ return editExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValueExpression basicGetEditExpression() {
+ return editExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEditExpression(ValueExpression newEditExpression) {
+ ValueExpression oldEditExpression = editExpression;
+ editExpression = newEditExpression;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.EXPRESSION_LABEL_PARSER__EDIT_EXPRESSION, oldEditExpression, editExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenConstraint getValidateExpression() {
+ if (validateExpression != null && validateExpression.eIsProxy()) {
+ InternalEObject oldValidateExpression = (InternalEObject)validateExpression;
+ validateExpression = (GenConstraint)eResolveProxy(oldValidateExpression);
+ if (validateExpression != oldValidateExpression) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, GMFGenPackage.EXPRESSION_LABEL_PARSER__VALIDATE_EXPRESSION, oldValidateExpression, validateExpression));
+ }
+ }
+ return validateExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GenConstraint basicGetValidateExpression() {
+ return validateExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValidateExpression(GenConstraint newValidateExpression) {
+ GenConstraint oldValidateExpression = validateExpression;
+ validateExpression = newValidateExpression;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GMFGenPackage.EXPRESSION_LABEL_PARSER__VALIDATE_EXPRESSION, oldValidateExpression, validateExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated NOT
*/
public String getQualifiedClassName() {
@@ -131,6 +331,18 @@ public class ExpressionLabelParserImpl extends GenParserImplementationImpl imple
switch (featureID) {
case GMFGenPackage.EXPRESSION_LABEL_PARSER__CLASS_NAME:
return getClassName();
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EXPRESSION_CONTEXT:
+ if (resolve) return getExpressionContext();
+ return basicGetExpressionContext();
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VIEW_EXPRESSION:
+ if (resolve) return getViewExpression();
+ return basicGetViewExpression();
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EDIT_EXPRESSION:
+ if (resolve) return getEditExpression();
+ return basicGetEditExpression();
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VALIDATE_EXPRESSION:
+ if (resolve) return getValidateExpression();
+ return basicGetValidateExpression();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -146,6 +358,18 @@ public class ExpressionLabelParserImpl extends GenParserImplementationImpl imple
case GMFGenPackage.EXPRESSION_LABEL_PARSER__CLASS_NAME:
setClassName((String)newValue);
return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EXPRESSION_CONTEXT:
+ setExpressionContext((GenClass)newValue);
+ return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VIEW_EXPRESSION:
+ setViewExpression((ValueExpression)newValue);
+ return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EDIT_EXPRESSION:
+ setEditExpression((ValueExpression)newValue);
+ return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VALIDATE_EXPRESSION:
+ setValidateExpression((GenConstraint)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -161,6 +385,18 @@ public class ExpressionLabelParserImpl extends GenParserImplementationImpl imple
case GMFGenPackage.EXPRESSION_LABEL_PARSER__CLASS_NAME:
setClassName(CLASS_NAME_EDEFAULT);
return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EXPRESSION_CONTEXT:
+ setExpressionContext((GenClass)null);
+ return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VIEW_EXPRESSION:
+ setViewExpression((ValueExpression)null);
+ return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EDIT_EXPRESSION:
+ setEditExpression((ValueExpression)null);
+ return;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VALIDATE_EXPRESSION:
+ setValidateExpression((GenConstraint)null);
+ return;
}
super.eUnset(featureID);
}
@@ -175,6 +411,14 @@ public class ExpressionLabelParserImpl extends GenParserImplementationImpl imple
switch (featureID) {
case GMFGenPackage.EXPRESSION_LABEL_PARSER__CLASS_NAME:
return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EXPRESSION_CONTEXT:
+ return expressionContext != null;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VIEW_EXPRESSION:
+ return viewExpression != null;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__EDIT_EXPRESSION:
+ return editExpression != null;
+ case GMFGenPackage.EXPRESSION_LABEL_PARSER__VALIDATE_EXPRESSION:
+ return validateExpression != null;
}
return super.eIsSet(featureID);
}
diff --git a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
index 2d0e7d7ad..dd4f8738f 100644
--- a/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
+++ b/plugins/org.eclipse.gmf.codegen/src/org/eclipse/gmf/codegen/gmfgen/impl/GMFGenPackageImpl.java
@@ -4126,33 +4126,6 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
* <!-- end-user-doc -->
* @generated
*/
- public EReference getExpressionLabelModelFacet_ViewExpression() {
- return (EReference)getExpressionLabelModelFacet().getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpressionLabelModelFacet_EditExpression() {
- return (EReference)getExpressionLabelModelFacet().getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpressionLabelModelFacet_ValidateExpression() {
- return (EReference)getExpressionLabelModelFacet().getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EClass getTypeLinkModelFacet() {
if (typeLinkModelFacetEClass == null) {
typeLinkModelFacetEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(GMFGenPackage.eNS_URI).getEClassifiers().get(60);
@@ -7084,6 +7057,42 @@ public class GMFGenPackageImpl extends EPackageImpl implements GMFGenPackage {
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getExpressionLabelParser_ExpressionContext() {
+ return (EReference)getExpressionLabelParser().getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getExpressionLabelParser_ViewExpression() {
+ return (EReference)getExpressionLabelParser().getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getExpressionLabelParser_EditExpression() {
+ return (EReference)getExpressionLabelParser().getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getExpressionLabelParser_ValidateExpression() {
+ return (EReference)getExpressionLabelParser().getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getCustomParser() {
if (customParserEClass == null) {
customParserEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(GMFGenPackage.eNS_URI).getEClassifiers().get(153);

Back to the top