eclipse plugin: Add 3 new attributes to the WMLExpression class:
luaBased/definedLocation/definedOffset to allow the expression ( more exactly the WMLTag and WMLKey ) to be set as Lua parsed
This commit is contained in:
parent
9cb4a3c27c
commit
eb8a93c953
10 changed files with 781 additions and 15 deletions
|
@ -137,6 +137,12 @@
|
|||
</eOperations>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_LuaBased" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
|
||||
defaultValueLiteral="false"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_DefinitionLocation" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_DefinitionOffset" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
|
||||
defaultValueLiteral="0"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="_Cardinality" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EChar"
|
||||
defaultValueLiteral=" "/>
|
||||
</eClassifiers>
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/name"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/_LuaBased"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/_DefinitionLocation"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/_DefinitionOffset"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/_Cardinality"/>
|
||||
<genOperations ecoreOperation="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/is_Required"/>
|
||||
<genOperations ecoreOperation="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/is_Forbidden"/>
|
||||
|
|
|
@ -16,6 +16,9 @@ package org.wesnoth.wml;
|
|||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.WMLExpression#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLExpression#is_LuaBased <em>Lua Based</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLExpression#get_DefinitionLocation <em>Definition Location</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLExpression#get_DefinitionOffset <em>Definition Offset</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.WMLExpression#get_Cardinality <em>Cardinality</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
|
@ -53,6 +56,87 @@ public interface WMLExpression extends WMLValuedExpression
|
|||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Lua Based</b></em>' attribute.
|
||||
* The default value is <code>"false"</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Lua Based</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Lua Based</em>' attribute.
|
||||
* @see #set_LuaBased(boolean)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLExpression__LuaBased()
|
||||
* @model default="false"
|
||||
* @generated
|
||||
*/
|
||||
boolean is_LuaBased();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLExpression#is_LuaBased <em>Lua Based</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Lua Based</em>' attribute.
|
||||
* @see #is_LuaBased()
|
||||
* @generated
|
||||
*/
|
||||
void set_LuaBased(boolean value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Definition Location</b></em>' attribute.
|
||||
* The default value is <code>""</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Definition Location</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Definition Location</em>' attribute.
|
||||
* @see #set_DefinitionLocation(String)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLExpression__DefinitionLocation()
|
||||
* @model default=""
|
||||
* @generated
|
||||
*/
|
||||
String get_DefinitionLocation();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLExpression#get_DefinitionLocation <em>Definition Location</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Definition Location</em>' attribute.
|
||||
* @see #get_DefinitionLocation()
|
||||
* @generated
|
||||
*/
|
||||
void set_DefinitionLocation(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* The default value is <code>"0"</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Definition Offset</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Definition Offset</em>' attribute.
|
||||
* @see #set_DefinitionOffset(int)
|
||||
* @see org.wesnoth.wml.WmlPackage#getWMLExpression__DefinitionOffset()
|
||||
* @model default="0"
|
||||
* @generated
|
||||
*/
|
||||
int get_DefinitionOffset();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wml.WMLExpression#get_DefinitionOffset <em>Definition Offset</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Definition Offset</em>' attribute.
|
||||
* @see #get_DefinitionOffset()
|
||||
* @generated
|
||||
*/
|
||||
void set_DefinitionOffset(int value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Cardinality</b></em>' attribute.
|
||||
* The default value is <code>" "</code>.
|
||||
|
|
|
@ -164,6 +164,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_EXPRESSION__NAME = WML_VALUED_EXPRESSION_FEATURE_COUNT + 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_EXPRESSION__LUA_BASED = WML_VALUED_EXPRESSION_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_EXPRESSION__DEFINITION_LOCATION = WML_VALUED_EXPRESSION_FEATURE_COUNT + 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_EXPRESSION__DEFINITION_OFFSET = WML_VALUED_EXPRESSION_FEATURE_COUNT + 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -171,7 +198,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_EXPRESSION__CARDINALITY = WML_VALUED_EXPRESSION_FEATURE_COUNT + 1;
|
||||
int WML_EXPRESSION__CARDINALITY = WML_VALUED_EXPRESSION_FEATURE_COUNT + 4;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>WML Expression</em>' class.
|
||||
|
@ -180,7 +207,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_EXPRESSION_FEATURE_COUNT = WML_VALUED_EXPRESSION_FEATURE_COUNT + 2;
|
||||
int WML_EXPRESSION_FEATURE_COUNT = WML_VALUED_EXPRESSION_FEATURE_COUNT + 5;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wml.impl.WMLRootExpressionImpl <em>WML Root Expression</em>}' class.
|
||||
|
@ -201,6 +228,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_ROOT_EXPRESSION__NAME = WML_EXPRESSION__NAME;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_ROOT_EXPRESSION__LUA_BASED = WML_EXPRESSION__LUA_BASED;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_ROOT_EXPRESSION__DEFINITION_LOCATION = WML_EXPRESSION__DEFINITION_LOCATION;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_ROOT_EXPRESSION__DEFINITION_OFFSET = WML_EXPRESSION__DEFINITION_OFFSET;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -238,6 +292,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_TAG__NAME = WML_ROOT_EXPRESSION__NAME;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TAG__LUA_BASED = WML_ROOT_EXPRESSION__LUA_BASED;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TAG__DEFINITION_LOCATION = WML_ROOT_EXPRESSION__DEFINITION_LOCATION;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TAG__DEFINITION_OFFSET = WML_ROOT_EXPRESSION__DEFINITION_OFFSET;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -329,6 +410,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_KEY__NAME = WML_EXPRESSION__NAME;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY__LUA_BASED = WML_EXPRESSION__LUA_BASED;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY__DEFINITION_LOCATION = WML_EXPRESSION__DEFINITION_LOCATION;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY__DEFINITION_OFFSET = WML_EXPRESSION__DEFINITION_OFFSET;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -430,6 +538,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_MACRO_CALL__NAME = WML_KEY_VALUE_FEATURE_COUNT + 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL__LUA_BASED = WML_KEY_VALUE_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL__DEFINITION_LOCATION = WML_KEY_VALUE_FEATURE_COUNT + 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL__DEFINITION_OFFSET = WML_KEY_VALUE_FEATURE_COUNT + 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -437,7 +572,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL__CARDINALITY = WML_KEY_VALUE_FEATURE_COUNT + 1;
|
||||
int WML_MACRO_CALL__CARDINALITY = WML_KEY_VALUE_FEATURE_COUNT + 4;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Point</b></em>' attribute.
|
||||
|
@ -446,7 +581,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL__POINT = WML_KEY_VALUE_FEATURE_COUNT + 2;
|
||||
int WML_MACRO_CALL__POINT = WML_KEY_VALUE_FEATURE_COUNT + 5;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Relative</b></em>' attribute.
|
||||
|
@ -455,7 +590,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL__RELATIVE = WML_KEY_VALUE_FEATURE_COUNT + 3;
|
||||
int WML_MACRO_CALL__RELATIVE = WML_KEY_VALUE_FEATURE_COUNT + 6;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Parameters</b></em>' containment reference list.
|
||||
|
@ -464,7 +599,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL__PARAMETERS = WML_KEY_VALUE_FEATURE_COUNT + 4;
|
||||
int WML_MACRO_CALL__PARAMETERS = WML_KEY_VALUE_FEATURE_COUNT + 7;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>WML Macro Call</em>' class.
|
||||
|
@ -473,7 +608,7 @@ public interface WmlPackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_CALL_FEATURE_COUNT = WML_KEY_VALUE_FEATURE_COUNT + 5;
|
||||
int WML_MACRO_CALL_FEATURE_COUNT = WML_KEY_VALUE_FEATURE_COUNT + 8;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wml.impl.WMLMacroCallParameterImpl <em>WML Macro Call Parameter</em>}' class.
|
||||
|
@ -541,6 +676,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_MACRO_DEFINE__NAME = WML_ROOT_EXPRESSION__NAME;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__LUA_BASED = WML_ROOT_EXPRESSION__LUA_BASED;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__DEFINITION_LOCATION = WML_ROOT_EXPRESSION__DEFINITION_LOCATION;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__DEFINITION_OFFSET = WML_ROOT_EXPRESSION__DEFINITION_OFFSET;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -596,6 +758,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_PREPROC_IF__NAME = WML_ROOT_EXPRESSION__NAME;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_PREPROC_IF__LUA_BASED = WML_ROOT_EXPRESSION__LUA_BASED;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_PREPROC_IF__DEFINITION_LOCATION = WML_ROOT_EXPRESSION__DEFINITION_LOCATION;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_PREPROC_IF__DEFINITION_OFFSET = WML_ROOT_EXPRESSION__DEFINITION_OFFSET;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -669,6 +858,33 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
int WML_TEXTDOMAIN__NAME = WML_ROOT_EXPRESSION__NAME;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Lua Based</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TEXTDOMAIN__LUA_BASED = WML_ROOT_EXPRESSION__LUA_BASED;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Location</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TEXTDOMAIN__DEFINITION_LOCATION = WML_ROOT_EXPRESSION__DEFINITION_LOCATION;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Definition Offset</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_TEXTDOMAIN__DEFINITION_OFFSET = WML_ROOT_EXPRESSION__DEFINITION_OFFSET;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Cardinality</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -1173,6 +1389,39 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
EAttribute getWMLExpression_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLExpression#is_LuaBased <em>Lua Based</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Lua Based</em>'.
|
||||
* @see org.wesnoth.wml.WMLExpression#is_LuaBased()
|
||||
* @see #getWMLExpression()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLExpression__LuaBased();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLExpression#get_DefinitionLocation <em>Definition Location</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Definition Location</em>'.
|
||||
* @see org.wesnoth.wml.WMLExpression#get_DefinitionLocation()
|
||||
* @see #getWMLExpression()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLExpression__DefinitionLocation();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLExpression#get_DefinitionOffset <em>Definition Offset</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Definition Offset</em>'.
|
||||
* @see org.wesnoth.wml.WMLExpression#get_DefinitionOffset()
|
||||
* @see #getWMLExpression()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLExpression__DefinitionOffset();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLExpression#get_Cardinality <em>Cardinality</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -1604,6 +1853,30 @@ public interface WmlPackage extends EPackage
|
|||
*/
|
||||
EAttribute WML_EXPRESSION__NAME = eINSTANCE.getWMLExpression_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Lua Based</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_EXPRESSION__LUA_BASED = eINSTANCE.getWMLExpression__LuaBased();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Definition Location</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_EXPRESSION__DEFINITION_LOCATION = eINSTANCE.getWMLExpression__DefinitionLocation();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Definition Offset</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_EXPRESSION__DEFINITION_OFFSET = eINSTANCE.getWMLExpression__DefinitionOffset();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Cardinality</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
|
|
|
@ -25,6 +25,9 @@ import org.wesnoth.wml.WmlPackage;
|
|||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLExpressionImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLExpressionImpl#is_LuaBased <em>Lua Based</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLExpressionImpl#get_DefinitionLocation <em>Definition Location</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLExpressionImpl#get_DefinitionOffset <em>Definition Offset</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLExpressionImpl#get_Cardinality <em>Cardinality</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
|
@ -60,6 +63,66 @@ public class WMLExpressionImpl extends WMLValuedExpressionImpl implements WMLExp
|
|||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #is_LuaBased() <em>Lua Based</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_LuaBased()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean _LUA_BASED_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #is_LuaBased() <em>Lua Based</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_LuaBased()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean _LuaBased = _LUA_BASED_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_DefinitionLocation() <em>Definition Location</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionLocation()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String _DEFINITION_LOCATION_EDEFAULT = "";
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #get_DefinitionLocation() <em>Definition Location</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionLocation()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String _DefinitionLocation = _DEFINITION_LOCATION_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_DefinitionOffset() <em>Definition Offset</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionOffset()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final int _DEFINITION_OFFSET_EDEFAULT = 0;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #get_DefinitionOffset() <em>Definition Offset</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionOffset()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected int _DefinitionOffset = _DEFINITION_OFFSET_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_Cardinality() <em>Cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -124,6 +187,75 @@ public class WMLExpressionImpl extends WMLValuedExpressionImpl implements WMLExp
|
|||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_EXPRESSION__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_LuaBased()
|
||||
{
|
||||
return _LuaBased;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_LuaBased(boolean new_LuaBased)
|
||||
{
|
||||
boolean old_LuaBased = _LuaBased;
|
||||
_LuaBased = new_LuaBased;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_EXPRESSION__LUA_BASED, old_LuaBased, _LuaBased));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String get_DefinitionLocation()
|
||||
{
|
||||
return _DefinitionLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_DefinitionLocation(String new_DefinitionLocation)
|
||||
{
|
||||
String old_DefinitionLocation = _DefinitionLocation;
|
||||
_DefinitionLocation = new_DefinitionLocation;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_EXPRESSION__DEFINITION_LOCATION, old_DefinitionLocation, _DefinitionLocation));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public int get_DefinitionOffset()
|
||||
{
|
||||
return _DefinitionOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_DefinitionOffset(int new_DefinitionOffset)
|
||||
{
|
||||
int old_DefinitionOffset = _DefinitionOffset;
|
||||
_DefinitionOffset = new_DefinitionOffset;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_EXPRESSION__DEFINITION_OFFSET, old_DefinitionOffset, _DefinitionOffset));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -254,6 +386,12 @@ public class WMLExpressionImpl extends WMLValuedExpressionImpl implements WMLExp
|
|||
{
|
||||
case WmlPackage.WML_EXPRESSION__NAME:
|
||||
return getName();
|
||||
case WmlPackage.WML_EXPRESSION__LUA_BASED:
|
||||
return is_LuaBased();
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_LOCATION:
|
||||
return get_DefinitionLocation();
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_OFFSET:
|
||||
return get_DefinitionOffset();
|
||||
case WmlPackage.WML_EXPRESSION__CARDINALITY:
|
||||
return get_Cardinality();
|
||||
}
|
||||
|
@ -273,6 +411,15 @@ public class WMLExpressionImpl extends WMLValuedExpressionImpl implements WMLExp
|
|||
case WmlPackage.WML_EXPRESSION__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__LUA_BASED:
|
||||
set_LuaBased((Boolean)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_LOCATION:
|
||||
set_DefinitionLocation((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_OFFSET:
|
||||
set_DefinitionOffset((Integer)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__CARDINALITY:
|
||||
set_Cardinality((Character)newValue);
|
||||
return;
|
||||
|
@ -293,6 +440,15 @@ public class WMLExpressionImpl extends WMLValuedExpressionImpl implements WMLExp
|
|||
case WmlPackage.WML_EXPRESSION__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__LUA_BASED:
|
||||
set_LuaBased(_LUA_BASED_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_LOCATION:
|
||||
set_DefinitionLocation(_DEFINITION_LOCATION_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_OFFSET:
|
||||
set_DefinitionOffset(_DEFINITION_OFFSET_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_EXPRESSION__CARDINALITY:
|
||||
set_Cardinality(_CARDINALITY_EDEFAULT);
|
||||
return;
|
||||
|
@ -312,6 +468,12 @@ public class WMLExpressionImpl extends WMLValuedExpressionImpl implements WMLExp
|
|||
{
|
||||
case WmlPackage.WML_EXPRESSION__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WmlPackage.WML_EXPRESSION__LUA_BASED:
|
||||
return _LuaBased != _LUA_BASED_EDEFAULT;
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_LOCATION:
|
||||
return _DEFINITION_LOCATION_EDEFAULT == null ? _DefinitionLocation != null : !_DEFINITION_LOCATION_EDEFAULT.equals(_DefinitionLocation);
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_OFFSET:
|
||||
return _DefinitionOffset != _DEFINITION_OFFSET_EDEFAULT;
|
||||
case WmlPackage.WML_EXPRESSION__CARDINALITY:
|
||||
return _Cardinality != _CARDINALITY_EDEFAULT;
|
||||
}
|
||||
|
@ -331,6 +493,12 @@ public class WMLExpressionImpl extends WMLValuedExpressionImpl implements WMLExp
|
|||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (name: ");
|
||||
result.append(name);
|
||||
result.append(", _LuaBased: ");
|
||||
result.append(_LuaBased);
|
||||
result.append(", _DefinitionLocation: ");
|
||||
result.append(_DefinitionLocation);
|
||||
result.append(", _DefinitionOffset: ");
|
||||
result.append(_DefinitionOffset);
|
||||
result.append(", _Cardinality: ");
|
||||
result.append(_Cardinality);
|
||||
result.append(')');
|
||||
|
|
|
@ -38,6 +38,9 @@ import org.wesnoth.wml.WmlPackage;
|
|||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#is_LuaBased <em>Lua Based</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#get_DefinitionLocation <em>Definition Location</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#get_DefinitionOffset <em>Definition Offset</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#get_Cardinality <em>Cardinality</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getPoint <em>Point</em>}</li>
|
||||
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getRelative <em>Relative</em>}</li>
|
||||
|
@ -76,6 +79,66 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #is_LuaBased() <em>Lua Based</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_LuaBased()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final boolean _LUA_BASED_EDEFAULT = false;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #is_LuaBased() <em>Lua Based</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #is_LuaBased()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected boolean _LuaBased = _LUA_BASED_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_DefinitionLocation() <em>Definition Location</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionLocation()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String _DEFINITION_LOCATION_EDEFAULT = "";
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #get_DefinitionLocation() <em>Definition Location</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionLocation()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String _DefinitionLocation = _DEFINITION_LOCATION_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_DefinitionOffset() <em>Definition Offset</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionOffset()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final int _DEFINITION_OFFSET_EDEFAULT = 0;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #get_DefinitionOffset() <em>Definition Offset</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #get_DefinitionOffset()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected int _DefinitionOffset = _DEFINITION_OFFSET_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #get_Cardinality() <em>Cardinality</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -190,6 +253,75 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public boolean is_LuaBased()
|
||||
{
|
||||
return _LuaBased;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_LuaBased(boolean new_LuaBased)
|
||||
{
|
||||
boolean old_LuaBased = _LuaBased;
|
||||
_LuaBased = new_LuaBased;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__LUA_BASED, old_LuaBased, _LuaBased));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String get_DefinitionLocation()
|
||||
{
|
||||
return _DefinitionLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_DefinitionLocation(String new_DefinitionLocation)
|
||||
{
|
||||
String old_DefinitionLocation = _DefinitionLocation;
|
||||
_DefinitionLocation = new_DefinitionLocation;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__DEFINITION_LOCATION, old_DefinitionLocation, _DefinitionLocation));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public int get_DefinitionOffset()
|
||||
{
|
||||
return _DefinitionOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void set_DefinitionOffset(int new_DefinitionOffset)
|
||||
{
|
||||
int old_DefinitionOffset = _DefinitionOffset;
|
||||
_DefinitionOffset = new_DefinitionOffset;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_MACRO_CALL__DEFINITION_OFFSET, old_DefinitionOffset, _DefinitionOffset));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -396,6 +528,12 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
{
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
return getName();
|
||||
case WmlPackage.WML_MACRO_CALL__LUA_BASED:
|
||||
return is_LuaBased();
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_LOCATION:
|
||||
return get_DefinitionLocation();
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_OFFSET:
|
||||
return get_DefinitionOffset();
|
||||
case WmlPackage.WML_MACRO_CALL__CARDINALITY:
|
||||
return get_Cardinality();
|
||||
case WmlPackage.WML_MACRO_CALL__POINT:
|
||||
|
@ -422,6 +560,15 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__LUA_BASED:
|
||||
set_LuaBased((Boolean)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_LOCATION:
|
||||
set_DefinitionLocation((String)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_OFFSET:
|
||||
set_DefinitionOffset((Integer)newValue);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__CARDINALITY:
|
||||
set_Cardinality((Character)newValue);
|
||||
return;
|
||||
|
@ -452,6 +599,15 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__LUA_BASED:
|
||||
set_LuaBased(_LUA_BASED_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_LOCATION:
|
||||
set_DefinitionLocation(_DEFINITION_LOCATION_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_OFFSET:
|
||||
set_DefinitionOffset(_DEFINITION_OFFSET_EDEFAULT);
|
||||
return;
|
||||
case WmlPackage.WML_MACRO_CALL__CARDINALITY:
|
||||
set_Cardinality(_CARDINALITY_EDEFAULT);
|
||||
return;
|
||||
|
@ -480,6 +636,12 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
{
|
||||
case WmlPackage.WML_MACRO_CALL__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WmlPackage.WML_MACRO_CALL__LUA_BASED:
|
||||
return _LuaBased != _LUA_BASED_EDEFAULT;
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_LOCATION:
|
||||
return _DEFINITION_LOCATION_EDEFAULT == null ? _DefinitionLocation != null : !_DEFINITION_LOCATION_EDEFAULT.equals(_DefinitionLocation);
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_OFFSET:
|
||||
return _DefinitionOffset != _DEFINITION_OFFSET_EDEFAULT;
|
||||
case WmlPackage.WML_MACRO_CALL__CARDINALITY:
|
||||
return _Cardinality != _CARDINALITY_EDEFAULT;
|
||||
case WmlPackage.WML_MACRO_CALL__POINT:
|
||||
|
@ -519,6 +681,9 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
switch (derivedFeatureID)
|
||||
{
|
||||
case WmlPackage.WML_MACRO_CALL__NAME: return WmlPackage.WML_EXPRESSION__NAME;
|
||||
case WmlPackage.WML_MACRO_CALL__LUA_BASED: return WmlPackage.WML_EXPRESSION__LUA_BASED;
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_LOCATION: return WmlPackage.WML_EXPRESSION__DEFINITION_LOCATION;
|
||||
case WmlPackage.WML_MACRO_CALL__DEFINITION_OFFSET: return WmlPackage.WML_EXPRESSION__DEFINITION_OFFSET;
|
||||
case WmlPackage.WML_MACRO_CALL__CARDINALITY: return WmlPackage.WML_EXPRESSION__CARDINALITY;
|
||||
default: return -1;
|
||||
}
|
||||
|
@ -560,6 +725,9 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
switch (baseFeatureID)
|
||||
{
|
||||
case WmlPackage.WML_EXPRESSION__NAME: return WmlPackage.WML_MACRO_CALL__NAME;
|
||||
case WmlPackage.WML_EXPRESSION__LUA_BASED: return WmlPackage.WML_MACRO_CALL__LUA_BASED;
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_LOCATION: return WmlPackage.WML_MACRO_CALL__DEFINITION_LOCATION;
|
||||
case WmlPackage.WML_EXPRESSION__DEFINITION_OFFSET: return WmlPackage.WML_MACRO_CALL__DEFINITION_OFFSET;
|
||||
case WmlPackage.WML_EXPRESSION__CARDINALITY: return WmlPackage.WML_MACRO_CALL__CARDINALITY;
|
||||
default: return -1;
|
||||
}
|
||||
|
@ -587,6 +755,12 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
|
|||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (name: ");
|
||||
result.append(name);
|
||||
result.append(", _LuaBased: ");
|
||||
result.append(_LuaBased);
|
||||
result.append(", _DefinitionLocation: ");
|
||||
result.append(_DefinitionLocation);
|
||||
result.append(", _DefinitionOffset: ");
|
||||
result.append(_DefinitionOffset);
|
||||
result.append(", _Cardinality: ");
|
||||
result.append(_Cardinality);
|
||||
result.append(", point: ");
|
||||
|
|
|
@ -597,11 +597,41 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
|
|||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLExpression__Cardinality()
|
||||
public EAttribute getWMLExpression__LuaBased()
|
||||
{
|
||||
return (EAttribute)wmlExpressionEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLExpression__DefinitionLocation()
|
||||
{
|
||||
return (EAttribute)wmlExpressionEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLExpression__DefinitionOffset()
|
||||
{
|
||||
return (EAttribute)wmlExpressionEClass.getEStructuralFeatures().get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLExpression__Cardinality()
|
||||
{
|
||||
return (EAttribute)wmlExpressionEClass.getEStructuralFeatures().get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -768,6 +798,9 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
|
|||
|
||||
wmlExpressionEClass = createEClass(WML_EXPRESSION);
|
||||
createEAttribute(wmlExpressionEClass, WML_EXPRESSION__NAME);
|
||||
createEAttribute(wmlExpressionEClass, WML_EXPRESSION__LUA_BASED);
|
||||
createEAttribute(wmlExpressionEClass, WML_EXPRESSION__DEFINITION_LOCATION);
|
||||
createEAttribute(wmlExpressionEClass, WML_EXPRESSION__DEFINITION_OFFSET);
|
||||
createEAttribute(wmlExpressionEClass, WML_EXPRESSION__CARDINALITY);
|
||||
|
||||
wmlValuedExpressionEClass = createEClass(WML_VALUED_EXPRESSION);
|
||||
|
@ -898,6 +931,9 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
|
|||
|
||||
initEClass(wmlExpressionEClass, WMLExpression.class, "WMLExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getWMLExpression_Name(), ecorePackage.getEString(), "name", "", 0, 1, WMLExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLExpression__LuaBased(), ecorePackage.getEBoolean(), "_LuaBased", "false", 0, 1, WMLExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLExpression__DefinitionLocation(), ecorePackage.getEString(), "_DefinitionLocation", "", 0, 1, WMLExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLExpression__DefinitionOffset(), ecorePackage.getEInt(), "_DefinitionOffset", "0", 0, 1, WMLExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLExpression__Cardinality(), ecorePackage.getEChar(), "_Cardinality", " ", 0, 1, WMLExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
addEOperation(wmlExpressionEClass, ecorePackage.getEBoolean(), "is_Required", 0, 1, IS_UNIQUE, IS_ORDERED);
|
||||
|
|
|
@ -15,6 +15,9 @@ process( EClass this ):
|
|||
eStructuralFeatures.process() ->
|
||||
// enrich the grammar elements with schema-specific attributes
|
||||
if name == "WMLExpression" then {
|
||||
createAttribute( "_LuaBased", eboolean(), "false" ) ->
|
||||
createAttribute( "_DefinitionLocation", estring(), "" ) ->
|
||||
createAttribute( "_DefinitionOffset", eint(), "0" ) ->
|
||||
createAttribute( "_Cardinality", echar() , " " ) ->
|
||||
|
||||
createCardinalityOperation( "is_Required", '1' ) ->
|
||||
|
@ -42,7 +45,6 @@ process( EClass this ):
|
|||
wmlType( "WMLKey" ) )
|
||||
|
||||
} else if name == "WMLTag" then {
|
||||
//eSuperTypes.add( ESerializable() )->
|
||||
createAttribute( "_InhertedTagName", estring() , "" ) ->
|
||||
createAttribute( "_NeedingExpansion", eboolean() , "false" ) ->
|
||||
createAttribute( "_Description", estring(), "" ) ->
|
||||
|
|
|
@ -27,15 +27,17 @@ public class SimpleLuaParser
|
|||
{
|
||||
private Map<String, WMLTag> tags_;
|
||||
private Reader reader_;
|
||||
private String location_;
|
||||
|
||||
private final static String TAG_REGEX = "wml_actions\\..+\\( *cfg *\\)";
|
||||
private final static String ATTRIBUTE_REGEX = "cfg\\.[a-zA-Z0-9_]*";
|
||||
private final static String ATTRIBUTE_CHILD_REGEX = "get_child\\(cfg, *\"[^\"]+\"\\)";
|
||||
|
||||
public SimpleLuaParser( String contents )
|
||||
public SimpleLuaParser( String location, String contents )
|
||||
{
|
||||
tags_ = new HashMap<String, WMLTag>( );
|
||||
reader_ = new StringReader( contents == null ? "" : contents );
|
||||
location_ = location;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,6 +48,9 @@ public class SimpleLuaParser
|
|||
BufferedReader reader = new BufferedReader( reader_ );
|
||||
String line = null;
|
||||
|
||||
//TODO: the lineCount should start from the location's offset
|
||||
int lineCount = 0;
|
||||
|
||||
WMLTag currentTag = null;
|
||||
|
||||
try
|
||||
|
@ -62,6 +67,13 @@ public class SimpleLuaParser
|
|||
token.lastIndexOf( '(' ) );
|
||||
|
||||
currentTag = WmlFactory2.eINSTANCE.createWMLTag( tagName );
|
||||
currentTag.set_LuaBased( true );
|
||||
|
||||
if ( location_ != null ) {
|
||||
currentTag.set_DefinitionLocation( location_ );
|
||||
currentTag.set_DefinitionOffset( lineCount );
|
||||
}
|
||||
|
||||
tags_.put( tagName, currentTag );
|
||||
}
|
||||
|
||||
|
@ -86,6 +98,8 @@ public class SimpleLuaParser
|
|||
WmlFactory2.eINSTANCE.createWMLKey( childName, "string", '1', false ) );
|
||||
}
|
||||
}
|
||||
|
||||
++ lineCount;
|
||||
}
|
||||
}
|
||||
catch ( IOException e ) {
|
||||
|
|
|
@ -14,17 +14,18 @@ import java.io.FileReader;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.wesnoth.Logger;
|
||||
import org.wesnoth.projects.ProjectCache;
|
||||
import org.wesnoth.utils.ResourceUtils;
|
||||
import org.wesnoth.utils.WMLUtils;
|
||||
import org.wesnoth.wml.WMLVariable.Scope;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.emf.common.util.TreeIterator;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
|
||||
import org.eclipse.xtext.parser.IParseResult;
|
||||
import org.eclipse.xtext.parser.IParser;
|
||||
import org.wesnoth.Logger;
|
||||
import org.wesnoth.projects.ProjectCache;
|
||||
import org.wesnoth.utils.ResourceUtils;
|
||||
import org.wesnoth.utils.WMLUtils;
|
||||
import org.wesnoth.wml.WMLVariable.Scope;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
|
@ -92,6 +93,10 @@ public class SimpleWMLParser
|
|||
|
||||
// clear tags
|
||||
config_.getWMLTags( ).clear( );
|
||||
String currentFileLocation = root_.eResource( ).getURI( ).toFileString( );
|
||||
if ( currentFileLocation == null ) {
|
||||
currentFileLocation = root_.eResource( ).getURI( ).toPlatformString( true );
|
||||
}
|
||||
|
||||
while ( itor.hasNext( ) ) {
|
||||
EObject object = itor.next( );
|
||||
|
@ -137,6 +142,7 @@ public class SimpleWMLParser
|
|||
}
|
||||
else if ( object instanceof WMLLuaCode ) {
|
||||
SimpleLuaParser luaParser = new SimpleLuaParser(
|
||||
currentFileLocation,
|
||||
( ( WMLLuaCode ) object ).getValue( ) );
|
||||
luaParser.parse( );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue