eclipse plugin: Start working on merging the current...
...grammar generated models with the already existing in the schema package.
This commit is contained in:
parent
5f58e1f7c3
commit
07389efa2b
9 changed files with 924 additions and 14 deletions
|
@ -15,13 +15,45 @@
|
|||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_extendedTagName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_cardinality" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EChar"
|
||||
defaultValueLiteral=" "/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_needsExpanding" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
|
||||
defaultValueLiteral="false"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLKey" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression">
|
||||
<eOperations name="is_Required" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
|
||||
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
|
||||
<details key="body" value="return _cardinality == '1';"/>
|
||||
</eAnnotations>
|
||||
</eOperations>
|
||||
<eOperations name="is_Forbidden" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
|
||||
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
|
||||
<details key="body" value="return _cardinality == '-';"/>
|
||||
</eAnnotations>
|
||||
</eOperations>
|
||||
<eOperations name="is_Optional" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
|
||||
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
|
||||
<details key="body" value="return _cardinality == '?';"/>
|
||||
</eAnnotations>
|
||||
</eOperations>
|
||||
<eOperations name="is_Repeatable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
|
||||
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
|
||||
<details key="body" value="return _cardinality == '*';"/>
|
||||
</eAnnotations>
|
||||
</eOperations>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="value" upperBound="-1"
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="eol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_cardinality" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EChar"
|
||||
defaultValueLiteral=" "/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_Enum" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
|
||||
defaultValueLiteral="false"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_Translatable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
|
||||
defaultValueLiteral="false"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLKeyValue"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCall" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCallParameter platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression">
|
||||
|
|
|
@ -15,10 +15,20 @@
|
|||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/plus"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/Expressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/endName"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/_extendedTagName"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/_cardinality"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/_needsExpanding"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/value"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/eol"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/_cardinality"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/_Enum"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/_Translatable"/>
|
||||
<genOperations ecoreOperation="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/is_Required"/>
|
||||
<genOperations ecoreOperation="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/is_Forbidden"/>
|
||||
<genOperations ecoreOperation="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/is_Optional"/>
|
||||
<genOperations ecoreOperation="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/is_Repeatable"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCall">
|
||||
|
|
|
@ -18,6 +18,9 @@ import org.eclipse.emf.common.util.EList;
|
|||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#getEol <em>Eol</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#get_cardinality <em>cardinality</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#is_Enum <em>Enum</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLKey#is_Translatable <em>Translatable</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
|
@ -70,4 +73,117 @@ public interface WMLKey extends WMLExpression
|
|||
*/
|
||||
void setEol(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>cardinality</b></em>' attribute.
|
||||
* The default value is <code>" "</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>cardinality</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>cardinality</em>' attribute.
|
||||
* @see #set_cardinality(char)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey__cardinality()
|
||||
* @model default=" "
|
||||
* @generated
|
||||
*/
|
||||
char get_cardinality();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLKey#get_cardinality <em>cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>cardinality</em>' attribute.
|
||||
* @see #get_cardinality()
|
||||
* @generated
|
||||
*/
|
||||
void set_cardinality(char value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Enum</b></em>' attribute.
|
||||
* The default value is <code>"false"</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Enum</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Enum</em>' attribute.
|
||||
* @see #set_Enum(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey__Enum()
|
||||
* @model default="false"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_Enum();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLKey#is_Enum <em>Enum</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Enum</em>' attribute.
|
||||
* @see #is_Enum()
|
||||
* @generated
|
||||
*/
|
||||
void set_Enum(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Translatable</b></em>' attribute.
|
||||
* The default value is <code>"false"</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Translatable</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Translatable</em>' attribute.
|
||||
* @see #set_Translatable(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLKey__Translatable()
|
||||
* @model default="false"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_Translatable();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLKey#is_Translatable <em>Translatable</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Translatable</em>' attribute.
|
||||
* @see #is_Translatable()
|
||||
* @generated
|
||||
*/
|
||||
void set_Translatable(boolean value);
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @model annotation="http://www.eclipse.org/emf/2002/GenModel body='return _cardinality == \'1\';'"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_Required();
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @model annotation="http://www.eclipse.org/emf/2002/GenModel body='return _cardinality == \'-\';'"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_Forbidden();
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @model annotation="http://www.eclipse.org/emf/2002/GenModel body='return _cardinality == \'?\';'"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_Optional();
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @model annotation="http://www.eclipse.org/emf/2002/GenModel body='return _cardinality == \'*\';'"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_Repeatable();
|
||||
|
||||
} // WMLKey
|
||||
|
|
|
@ -19,6 +19,9 @@ import org.eclipse.emf.common.util.EList;
|
|||
* <li>{@link org.wesnoth.wml.WMLTag#getPlus <em>Plus</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getExpressions <em>Expressions</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#getEndName <em>End Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#get_extendedTagName <em>extended Tag Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#get_cardinality <em>cardinality</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLTag#is_needsExpanding <em>needs Expanding</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
|
@ -97,4 +100,85 @@ public interface WMLTag extends WMLRootExpression
|
|||
*/
|
||||
void setEndName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>extended Tag Name</b></em>' attribute.
|
||||
* The default value is <code>""</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>extended Tag Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>extended Tag Name</em>' attribute.
|
||||
* @see #set_extendedTagName(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag__extendedTagName()
|
||||
* @model default=""
|
||||
* @generated
|
||||
*/
|
||||
String get_extendedTagName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#get_extendedTagName <em>extended Tag Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>extended Tag Name</em>' attribute.
|
||||
* @see #get_extendedTagName()
|
||||
* @generated
|
||||
*/
|
||||
void set_extendedTagName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>cardinality</b></em>' attribute.
|
||||
* The default value is <code>" "</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>cardinality</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>cardinality</em>' attribute.
|
||||
* @see #set_cardinality(char)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag__cardinality()
|
||||
* @model default=" "
|
||||
* @generated
|
||||
*/
|
||||
char get_cardinality();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#get_cardinality <em>cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>cardinality</em>' attribute.
|
||||
* @see #get_cardinality()
|
||||
* @generated
|
||||
*/
|
||||
void set_cardinality(char value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>needs Expanding</b></em>' attribute.
|
||||
* The default value is <code>"false"</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>needs Expanding</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>needs Expanding</em>' attribute.
|
||||
* @see #set_needsExpanding(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLTag__needsExpanding()
|
||||
* @model default="false"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_needsExpanding();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLTag#is_needsExpanding <em>needs Expanding</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>needs Expanding</em>' attribute.
|
||||
* @see #is_needsExpanding()
|
||||
* @generated
|
||||
*/
|
||||
void set_needsExpanding(boolean value);
|
||||
|
||||
} // WMLTag
|
||||
|
|
|
@ -209,6 +209,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_TAG__END_NAME = WML_ROOT_EXPRESSION_FEATURE_COUNT + 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>extended Tag Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TAG__EXTENDED_TAG_NAME = WML_ROOT_EXPRESSION_FEATURE_COUNT + 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TAG__CARDINALITY = WML_ROOT_EXPRESSION_FEATURE_COUNT + 4;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>needs Expanding</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TAG__NEEDS_EXPANDING = WML_ROOT_EXPRESSION_FEATURE_COUNT + 5;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>WML Tag</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -216,7 +243,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TAG_FEATURE_COUNT = WML_ROOT_EXPRESSION_FEATURE_COUNT + 3;
|
||||
int WML_TAG_FEATURE_COUNT = WML_ROOT_EXPRESSION_FEATURE_COUNT + 6;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wml.impl.WMLKeyImpl <em>WML Key</em>}' class.
|
||||
|
@ -255,6 +282,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_KEY__EOL = WML_EXPRESSION_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY__CARDINALITY = WML_EXPRESSION_FEATURE_COUNT + 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Enum</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY__ENUM = WML_EXPRESSION_FEATURE_COUNT + 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Translatable</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY__TRANSLATABLE = WML_EXPRESSION_FEATURE_COUNT + 4;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>WML Key</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -262,7 +316,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY_FEATURE_COUNT = WML_EXPRESSION_FEATURE_COUNT + 2;
|
||||
int WML_KEY_FEATURE_COUNT = WML_EXPRESSION_FEATURE_COUNT + 5;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wml.impl.WMLKeyValueImpl <em>WML Key Value</em>}' class.
|
||||
|
@ -616,6 +670,39 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
EAttribute getWMLTag_EndName();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLTag#get_extendedTagName <em>extended Tag Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>extended Tag Name</em>'.
|
||||
* @see org.wesnoth.wml.WMLTag#get_extendedTagName()
|
||||
* @see #getWMLTag()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLTag__extendedTagName();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLTag#get_cardinality <em>cardinality</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>cardinality</em>'.
|
||||
* @see org.wesnoth.wml.WMLTag#get_cardinality()
|
||||
* @see #getWMLTag()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLTag__cardinality();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLTag#is_needsExpanding <em>needs Expanding</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>needs Expanding</em>'.
|
||||
* @see org.wesnoth.wml.WMLTag#is_needsExpanding()
|
||||
* @see #getWMLTag()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLTag__needsExpanding();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wml.WMLKey <em>WML Key</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -648,6 +735,39 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
EAttribute getWMLKey_Eol();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLKey#get_cardinality <em>cardinality</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>cardinality</em>'.
|
||||
* @see org.wesnoth.wml.WMLKey#get_cardinality()
|
||||
* @see #getWMLKey()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLKey__cardinality();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLKey#is_Enum <em>Enum</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Enum</em>'.
|
||||
* @see org.wesnoth.wml.WMLKey#is_Enum()
|
||||
* @see #getWMLKey()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLKey__Enum();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLKey#is_Translatable <em>Translatable</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Translatable</em>'.
|
||||
* @see org.wesnoth.wml.WMLKey#is_Translatable()
|
||||
* @see #getWMLKey()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLKey__Translatable();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wml.WMLKeyValue <em>WML Key Value</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -965,6 +1085,30 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
EAttribute WML_TAG__END_NAME = eINSTANCE.getWMLTag_EndName();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>extended Tag Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_TAG__EXTENDED_TAG_NAME = eINSTANCE.getWMLTag__extendedTagName();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>cardinality</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_TAG__CARDINALITY = eINSTANCE.getWMLTag__cardinality();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>needs Expanding</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_TAG__NEEDS_EXPANDING = eINSTANCE.getWMLTag__needsExpanding();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wml.impl.WMLKeyImpl <em>WML Key</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -991,6 +1135,30 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
EAttribute WML_KEY__EOL = eINSTANCE.getWMLKey_Eol();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>cardinality</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_KEY__CARDINALITY = eINSTANCE.getWMLKey__cardinality();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Enum</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_KEY__ENUM = eINSTANCE.getWMLKey__Enum();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Translatable</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_KEY__TRANSLATABLE = eINSTANCE.getWMLKey__Translatable();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wml.impl.WMLKeyValueImpl <em>WML Key Value</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
|
|
@ -34,6 +34,9 @@ import org.wesnoth.wml.WmlPackage;
|
|||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#getEol <em>Eol</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#get_cardinality <em>cardinality</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#is_Enum <em>Enum</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLKeyImpl#is_Translatable <em>Translatable</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
|
@ -71,6 +74,66 @@ public class WMLKeyImpl extends WMLExpressionImpl implements WMLKey
|
|||
*/
|
||||
protected String eol = EOL_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_cardinality() <em>cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_cardinality()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final char _CARDINALITY_EDEFAULT = ' ';
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #get_cardinality() <em>cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_cardinality()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected char _cardinality = _CARDINALITY_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #is_Enum() <em>Enum</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_Enum()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean _ENUM_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #is_Enum() <em>Enum</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_Enum()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean _Enum = _ENUM_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #is_Translatable() <em>Translatable</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_Translatable()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean _TRANSLATABLE_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #is_Translatable() <em>Translatable</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_Translatable()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean _Translatable = _TRANSLATABLE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -129,6 +192,115 @@ public class WMLKeyImpl extends WMLExpressionImpl implements WMLKey
|
|||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__EOL, oldEol, eol));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public char get_cardinality()
|
||||
{
|
||||
return _cardinality;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_cardinality(char new_cardinality)
|
||||
{
|
||||
char old_cardinality = _cardinality;
|
||||
_cardinality = new_cardinality;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__CARDINALITY, old_cardinality, _cardinality));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_Enum()
|
||||
{
|
||||
return _Enum;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_Enum(boolean new_Enum)
|
||||
{
|
||||
boolean old_Enum = _Enum;
|
||||
_Enum = new_Enum;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__ENUM, old_Enum, _Enum));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_Translatable()
|
||||
{
|
||||
return _Translatable;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_Translatable(boolean new_Translatable)
|
||||
{
|
||||
boolean old_Translatable = _Translatable;
|
||||
_Translatable = new_Translatable;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_KEY__TRANSLATABLE, old_Translatable, _Translatable));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_Required()
|
||||
{
|
||||
return _cardinality == '1';
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_Forbidden()
|
||||
{
|
||||
return _cardinality == '-';
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_Optional()
|
||||
{
|
||||
return _cardinality == '?';
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_Repeatable()
|
||||
{
|
||||
return _cardinality == '*';
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -159,6 +331,12 @@ public class WMLKeyImpl extends WMLExpressionImpl implements WMLKey
|
|||
return getValue();
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
return getEol();
|
||||
case WmlPackage.WML_KEY__CARDINALITY:
|
||||
return get_cardinality();
|
||||
case WmlPackage.WML_KEY__ENUM:
|
||||
return is_Enum();
|
||||
case WmlPackage.WML_KEY__TRANSLATABLE:
|
||||
return is_Translatable();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
@ -181,6 +359,15 @@ public class WMLKeyImpl extends WMLExpressionImpl implements WMLKey
|
|||
case WmlPackage.WML_KEY__EOL:
|
||||
setEol((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__CARDINALITY:
|
||||
set_cardinality((Character)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__ENUM:
|
||||
set_Enum((Boolean)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__TRANSLATABLE:
|
||||
set_Translatable((Boolean)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
@ -201,6 +388,15 @@ public class WMLKeyImpl extends WMLExpressionImpl implements WMLKey
|
|||
case WmlPackage.WML_KEY__EOL:
|
||||
setEol(EOL_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__CARDINALITY:
|
||||
set_cardinality(_CARDINALITY_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__ENUM:
|
||||
set_Enum(_ENUM_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_KEY__TRANSLATABLE:
|
||||
set_Translatable(_TRANSLATABLE_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
@ -219,6 +415,12 @@ public class WMLKeyImpl extends WMLExpressionImpl implements WMLKey
|
|||
return value != null && !value.isEmpty();
|
||||
case WmlPackage.WML_KEY__EOL:
|
||||
return EOL_EDEFAULT == null ? eol != null : !EOL_EDEFAULT.equals(eol);
|
||||
case WmlPackage.WML_KEY__CARDINALITY:
|
||||
return _cardinality != _CARDINALITY_EDEFAULT;
|
||||
case WmlPackage.WML_KEY__ENUM:
|
||||
return _Enum != _ENUM_EDEFAULT;
|
||||
case WmlPackage.WML_KEY__TRANSLATABLE:
|
||||
return _Translatable != _TRANSLATABLE_EDEFAULT;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
@ -236,6 +438,12 @@ public class WMLKeyImpl extends WMLExpressionImpl implements WMLKey
|
|||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (eol: ");
|
||||
result.append(eol);
|
||||
result.append(", _cardinality: ");
|
||||
result.append(_cardinality);
|
||||
result.append(", _Enum: ");
|
||||
result.append(_Enum);
|
||||
result.append(", _Translatable: ");
|
||||
result.append(_Translatable);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@ import org.wesnoth.wml.WmlPackage;
|
|||
* <li>{@link org.wesnoth.wml.impl.WMLTagImpl#getPlus <em>Plus</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLTagImpl#getExpressions <em>Expressions</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLTagImpl#getEndName <em>End Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLTagImpl#get_extendedTagName <em>extended Tag Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLTagImpl#get_cardinality <em>cardinality</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLTagImpl#is_needsExpanding <em>needs Expanding</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
|
@ -92,6 +95,66 @@ public class WMLTagImpl extends WMLRootExpressionImpl implements WMLTag
|
|||
*/
|
||||
protected String endName = END_NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_extendedTagName() <em>extended Tag Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_extendedTagName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String _EXTENDED_TAG_NAME_EDEFAULT = "";
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #get_extendedTagName() <em>extended Tag Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_extendedTagName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String _extendedTagName = _EXTENDED_TAG_NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_cardinality() <em>cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_cardinality()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final char _CARDINALITY_EDEFAULT = ' ';
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #get_cardinality() <em>cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_cardinality()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected char _cardinality = _CARDINALITY_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #is_needsExpanding() <em>needs Expanding</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_needsExpanding()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean _NEEDS_EXPANDING_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #is_needsExpanding() <em>needs Expanding</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_needsExpanding()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean _needsExpanding = _NEEDS_EXPANDING_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -173,6 +236,75 @@ public class WMLTagImpl extends WMLRootExpressionImpl implements WMLTag
|
|||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_TAG__END_NAME, oldEndName, endName));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String get_extendedTagName()
|
||||
{
|
||||
return _extendedTagName;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_extendedTagName(String new_extendedTagName)
|
||||
{
|
||||
String old_extendedTagName = _extendedTagName;
|
||||
_extendedTagName = new_extendedTagName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_TAG__EXTENDED_TAG_NAME, old_extendedTagName, _extendedTagName));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public char get_cardinality()
|
||||
{
|
||||
return _cardinality;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_cardinality(char new_cardinality)
|
||||
{
|
||||
char old_cardinality = _cardinality;
|
||||
_cardinality = new_cardinality;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_TAG__CARDINALITY, old_cardinality, _cardinality));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_needsExpanding()
|
||||
{
|
||||
return _needsExpanding;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_needsExpanding(boolean new_needsExpanding)
|
||||
{
|
||||
boolean old_needsExpanding = _needsExpanding;
|
||||
_needsExpanding = new_needsExpanding;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_TAG__NEEDS_EXPANDING, old_needsExpanding, _needsExpanding));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -205,6 +337,12 @@ public class WMLTagImpl extends WMLRootExpressionImpl implements WMLTag
|
|||
return getExpressions();
|
||||
case WmlPackage.WML_TAG__END_NAME:
|
||||
return getEndName();
|
||||
case WmlPackage.WML_TAG__EXTENDED_TAG_NAME:
|
||||
return get_extendedTagName();
|
||||
case WmlPackage.WML_TAG__CARDINALITY:
|
||||
return get_cardinality();
|
||||
case WmlPackage.WML_TAG__NEEDS_EXPANDING:
|
||||
return is_needsExpanding();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
@ -230,6 +368,15 @@ public class WMLTagImpl extends WMLRootExpressionImpl implements WMLTag
|
|||
case WmlPackage.WML_TAG__END_NAME:
|
||||
setEndName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_TAG__EXTENDED_TAG_NAME:
|
||||
set_extendedTagName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_TAG__CARDINALITY:
|
||||
set_cardinality((Character)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_TAG__NEEDS_EXPANDING:
|
||||
set_needsExpanding((Boolean)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
@ -253,6 +400,15 @@ public class WMLTagImpl extends WMLRootExpressionImpl implements WMLTag
|
|||
case WmlPackage.WML_TAG__END_NAME:
|
||||
setEndName(END_NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_TAG__EXTENDED_TAG_NAME:
|
||||
set_extendedTagName(_EXTENDED_TAG_NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_TAG__CARDINALITY:
|
||||
set_cardinality(_CARDINALITY_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_TAG__NEEDS_EXPANDING:
|
||||
set_needsExpanding(_NEEDS_EXPANDING_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
@ -273,6 +429,12 @@ public class WMLTagImpl extends WMLRootExpressionImpl implements WMLTag
|
|||
return expressions != null && !expressions.isEmpty();
|
||||
case WmlPackage.WML_TAG__END_NAME:
|
||||
return END_NAME_EDEFAULT == null ? endName != null : !END_NAME_EDEFAULT.equals(endName);
|
||||
case WmlPackage.WML_TAG__EXTENDED_TAG_NAME:
|
||||
return _EXTENDED_TAG_NAME_EDEFAULT == null ? _extendedTagName != null : !_EXTENDED_TAG_NAME_EDEFAULT.equals(_extendedTagName);
|
||||
case WmlPackage.WML_TAG__CARDINALITY:
|
||||
return _cardinality != _CARDINALITY_EDEFAULT;
|
||||
case WmlPackage.WML_TAG__NEEDS_EXPANDING:
|
||||
return _needsExpanding != _NEEDS_EXPANDING_EDEFAULT;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
@ -292,6 +454,12 @@ public class WMLTagImpl extends WMLRootExpressionImpl implements WMLTag
|
|||
result.append(plus);
|
||||
result.append(", endName: ");
|
||||
result.append(endName);
|
||||
result.append(", _extendedTagName: ");
|
||||
result.append(_extendedTagName);
|
||||
result.append(", _cardinality: ");
|
||||
result.append(_cardinality);
|
||||
result.append(", _needsExpanding: ");
|
||||
result.append(_needsExpanding);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
|
|
@ -259,6 +259,36 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
|
|||
return (EAttribute)wmlTagEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLTag__extendedTagName()
|
||||
{
|
||||
return (EAttribute)wmlTagEClass.getEStructuralFeatures().get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLTag__cardinality()
|
||||
{
|
||||
return (EAttribute)wmlTagEClass.getEStructuralFeatures().get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLTag__needsExpanding()
|
||||
{
|
||||
return (EAttribute)wmlTagEClass.getEStructuralFeatures().get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -289,6 +319,36 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
|
|||
return (EAttribute)wmlKeyEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLKey__cardinality()
|
||||
{
|
||||
return (EAttribute)wmlKeyEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLKey__Enum()
|
||||
{
|
||||
return (EAttribute)wmlKeyEClass.getEStructuralFeatures().get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLKey__Translatable()
|
||||
{
|
||||
return (EAttribute)wmlKeyEClass.getEStructuralFeatures().get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -556,10 +616,16 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
|
|||
createEAttribute(wmlTagEClass, WML_TAG__PLUS);
|
||||
createEReference(wmlTagEClass, WML_TAG__EXPRESSIONS);
|
||||
createEAttribute(wmlTagEClass, WML_TAG__END_NAME);
|
||||
createEAttribute(wmlTagEClass, WML_TAG__EXTENDED_TAG_NAME);
|
||||
createEAttribute(wmlTagEClass, WML_TAG__CARDINALITY);
|
||||
createEAttribute(wmlTagEClass, WML_TAG__NEEDS_EXPANDING);
|
||||
|
||||
wmlKeyEClass = createEClass(WML_KEY);
|
||||
createEReference(wmlKeyEClass, WML_KEY__VALUE);
|
||||
createEAttribute(wmlKeyEClass, WML_KEY__EOL);
|
||||
createEAttribute(wmlKeyEClass, WML_KEY__CARDINALITY);
|
||||
createEAttribute(wmlKeyEClass, WML_KEY__ENUM);
|
||||
createEAttribute(wmlKeyEClass, WML_KEY__TRANSLATABLE);
|
||||
|
||||
wmlKeyValueEClass = createEClass(WML_KEY_VALUE);
|
||||
|
||||
|
@ -646,10 +712,24 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
|
|||
initEAttribute(getWMLTag_Plus(), ecorePackage.getEString(), "plus", "", 0, 1, WMLTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLTag_Expressions(), this.getWMLExpression(), null, "Expressions", null, 0, -1, WMLTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLTag_EndName(), ecorePackage.getEString(), "endName", null, 0, 1, WMLTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLTag__extendedTagName(), ecorePackage.getEString(), "_extendedTagName", "", 0, 1, WMLTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLTag__cardinality(), ecorePackage.getEChar(), "_cardinality", " ", 0, 1, WMLTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLTag__needsExpanding(), ecorePackage.getEBoolean(), "_needsExpanding", "false", 0, 1, WMLTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(wmlKeyEClass, WMLKey.class, "WMLKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getWMLKey_Value(), this.getWMLKeyValue(), null, "value", null, 0, -1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLKey_Eol(), ecorePackage.getEString(), "eol", "", 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLKey__cardinality(), ecorePackage.getEChar(), "_cardinality", " ", 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLKey__Enum(), ecorePackage.getEBoolean(), "_Enum", "false", 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLKey__Translatable(), ecorePackage.getEBoolean(), "_Translatable", "false", 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
addEOperation(wmlKeyEClass, ecorePackage.getEBoolean(), "is_Required", 0, 1, IS_UNIQUE, IS_ORDERED);
|
||||
|
||||
addEOperation(wmlKeyEClass, ecorePackage.getEBoolean(), "is_Forbidden", 0, 1, IS_UNIQUE, IS_ORDERED);
|
||||
|
||||
addEOperation(wmlKeyEClass, ecorePackage.getEBoolean(), "is_Optional", 0, 1, IS_UNIQUE, IS_ORDERED);
|
||||
|
||||
addEOperation(wmlKeyEClass, ecorePackage.getEBoolean(), "is_Repeatable", 0, 1, IS_UNIQUE, IS_ORDERED);
|
||||
|
||||
initEClass(wmlKeyValueEClass, WMLKeyValue.class, "WMLKeyValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
|
|
|
@ -1,21 +1,65 @@
|
|||
process( xtext::GeneratedMetamodel this ):
|
||||
import ecore;
|
||||
import xtext;
|
||||
|
||||
process( GeneratedMetamodel this ):
|
||||
process( ePackage );
|
||||
|
||||
process( ecore::EPackage this ):
|
||||
process( EPackage this ):
|
||||
eClassifiers.process();
|
||||
|
||||
process( ecore::EClassifier this ):
|
||||
process( EClassifier this ):
|
||||
null;
|
||||
|
||||
process( ecore::EClass this ):
|
||||
eStructuralFeatures.process();
|
||||
process( EClass this ):
|
||||
eStructuralFeatures.process() ->
|
||||
|
||||
// enrich the grammar elements with schema-specific attributes
|
||||
if name == "WMLTag" then {
|
||||
createAttribute( "_extendedTagName", "EString", "" ) ->
|
||||
createAttribute( "_cardinality", "EChar", " " ) ->
|
||||
createAttribute( "_needsExpanding", "EBoolean", "false" )
|
||||
} else if name == "WMLKey" then {
|
||||
createAttribute( "_cardinality", "EChar", " " ) ->
|
||||
createAttribute( "_Enum", "EBoolean", "false" ) ->
|
||||
createAttribute( "_Translatable", "EBoolean", "false" ) ->
|
||||
createCardinalityOperation( "is_Required", '1' ) ->
|
||||
createCardinalityOperation( "is_Forbidden", '-' ) ->
|
||||
createCardinalityOperation( "is_Optional", '?' ) ->
|
||||
createCardinalityOperation( "is_Repeatable", '*' )
|
||||
};
|
||||
|
||||
process( ecore::EStructuralFeature this ):
|
||||
process( EStructuralFeature this ):
|
||||
null;
|
||||
|
||||
process( ecore::EAttribute this ):
|
||||
if name == 'plus' then setDefaultValueLiteral( "" )
|
||||
else if name == 'point' then setDefaultValueLiteral( "" )
|
||||
else if name == 'relative' then setDefaultValueLiteral( "" )
|
||||
else if name == 'name' then setDefaultValueLiteral( "" )
|
||||
else if name == 'eol' then setDefaultValueLiteral( "" );
|
||||
process( EAttribute this ):
|
||||
if name == 'plus' || name == 'point' || name == 'relative' ||
|
||||
name == 'name' || name == 'eol'
|
||||
then
|
||||
setDefaultValueLiteral( "" );
|
||||
|
||||
createCardinalityOperation( EClass this, String name, char chr ) :
|
||||
let op = newCardinalityOperation( name ) : newCardinalityAnnotation( op, chr ) ;
|
||||
|
||||
create EOperation this newCardinalityOperation( EClass owner, String name ) :
|
||||
setName( name ) -> setEType( getEcoreDataType( "EBoolean" ) ) ->
|
||||
owner.eOperations.add( this );
|
||||
|
||||
create EAnnotation this newCardinalityAnnotation( EOperation op, char chr ):
|
||||
let an = new EStringToStringMapEntry :
|
||||
setSource( "http://www.eclipse.org/emf/2002/GenModel" ) ->
|
||||
an.setKey( "body" ) ->
|
||||
an.setValue( "return _cardinality == '" + chr + "';" ) ->
|
||||
details.add( an ) ->
|
||||
op.eAnnotations.add( this );
|
||||
|
||||
create EAttribute this createAttribute( EClass owner, String name, String type, String defValue ) :
|
||||
setName( name ) ->
|
||||
setEType( getEcoreDataType( type ) ) ->
|
||||
setDefaultValueLiteral( defValue ) ->
|
||||
|
||||
// add attribute
|
||||
owner.eStructuralFeatures.add( this );
|
||||
|
||||
EDataType getEcoreDataType(String name) :
|
||||
org::eclipse::emf::ecore::EcorePackage::eINSTANCE.getEClassifier(name)
|
||||
;
|
Loading…
Add table
Reference in a new issue