Author: timotei
Date: Sat Aug  6 23:12:56 2011
New Revision: 50632

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50632&view=rev
Log:
eclipse plugin: Add a shortcut method for the
WMLUtils.getValue for the WMLKey class

Modified:
    trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.ecore
    trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.genmodel
    trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/WMLKey.java
    trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WMLKeyImpl.java
    
trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WmlPackageImpl.java
    trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/WMLPostProcessor.ext

Modified: trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.ecore
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.ecore?rev=50632&r1=50631&r2=50632&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.ecore (original)
+++ trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.ecore Sat Aug  6 
23:12:56 2011
@@ -41,6 +41,11 @@
         defaultValueLiteral=""/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="WMLKey" 
eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression">
+    <eOperations name="getValue" eType="ecore:EDataType 
http://www.eclipse.org/emf/2002/Ecore#//EString";>
+      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
+        <details key="body" value=" return 
org.wesnoth.utils.WMLUtils.getKeyValue( getValues( ) );"/>
+      </eAnnotations>
+    </eOperations>
     <eStructuralFeatures xsi:type="ecore:EReference" name="values" 
upperBound="-1"
         eType="ecore:EClass 
platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue"
         containment="true"/>

Modified: trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.genmodel
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.genmodel?rev=50632&r1=50631&r2=50632&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.genmodel (original)
+++ trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/WML.genmodel Sat Aug  6 
23:12:56 2011
@@ -28,6 +28,7 @@
       <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"/>
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute 
platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/_DataType"/>
+      <genOperations 
ecoreOperation="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/getValue"/>
     </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">

Modified: trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/WMLKey.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/WMLKey.java?rev=50632&r1=50631&r2=50632&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/WMLKey.java 
(original)
+++ trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/WMLKey.java Sat Aug 
 6 23:12:56 2011
@@ -143,4 +143,13 @@
    */
   void set_DataType(String value);
 
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @model kind="operation"
+   *        annotation="http://www.eclipse.org/emf/2002/GenModel body=' return 
org.wesnoth.utils.WMLUtils.getKeyValue( getValues( ) );'"
+   * @generated
+   */
+  String getValue();
+
 } // WMLKey

Modified: 
trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WMLKeyImpl.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WMLKeyImpl.java?rev=50632&r1=50631&r2=50632&view=diff
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WMLKeyImpl.java 
(original)
+++ 
trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WMLKeyImpl.java 
Sat Aug  6 23:12:56 2011
@@ -255,6 +255,16 @@
    * <!-- end-user-doc -->
    * @generated
    */
+  public String getValue()
+  {
+     return org.wesnoth.utils.WMLUtils.getKeyValue( getValues( ) );
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
   @Override
   public NotificationChain eInverseRemove(InternalEObject otherEnd, int 
featureID, NotificationChain msgs)
   {

Modified: 
trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WmlPackageImpl.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WmlPackageImpl.java?rev=50632&r1=50631&r2=50632&view=diff
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WmlPackageImpl.java
 (original)
+++ 
trunk/utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/impl/WmlPackageImpl.java
 Sat Aug  6 23:12:56 2011
@@ -905,6 +905,8 @@
     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);
     initEAttribute(getWMLKey__DataType(), ecorePackage.getEString(), 
"_DataType", "", 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+    addEOperation(wmlKeyEClass, ecorePackage.getEString(), "getValue", 0, 1, 
IS_UNIQUE, IS_ORDERED);
+
     initEClass(wmlKeyValueEClass, WMLKeyValue.class, "WMLKeyValue", 
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
     initEClass(wmlMacroCallEClass, WMLMacroCall.class, "WMLMacroCall", 
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

Modified: trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/WMLPostProcessor.ext
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/WMLPostProcessor.ext?rev=50632&r1=50631&r2=50632&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/WMLPostProcessor.ext 
(original)
+++ trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/WMLPostProcessor.ext Sat 
Aug  6 23:12:56 2011
@@ -48,7 +48,7 @@
         createAttribute( "_InhertedTagName", estring() , "" ) ->
         createAttribute( "_NeedingExpansion", eboolean() , "false" ) ->
         createAttribute( "_Description", estring(), "" ) ->
-        
+
         createGenericOperation( "getWMLTags", 
             "EList<WMLTag> result = new 
org.eclipse.emf.common.util.BasicEList<WMLTag>();
         for ( WMLExpression expression : getExpressions( ) ) {
@@ -70,7 +70,11 @@
     } else if name == "WMLKey" then {
         createAttribute( "_Enum", eboolean(), "false" ) ->
         createAttribute( "_Translatable", eboolean(), "false" ) ->
-        createAttribute( "_DataType", estring(), "" ) 
+        createAttribute( "_DataType", estring(), "" ) ->
+
+        createOperation( "getValue",
+            " return org.wesnoth.utils.WMLUtils.getKeyValue( getValues( ) );",
+            estring( ) )
     } else if name == "WMLGrammarElement" then {
            // make all WML Grammar inherit from Serializable
            eSuperTypes.add( ESerializable() )


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to