Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Referring to inexistent data member in generated package class
Referring to inexistent data member in generated package class [message #1479777] Wed, 19 November 2014 18:24 Go to next message
Jacob He is currently offline Jacob HeFriend
Messages: 10
Registered: October 2013
Junior Member
I am creating an ASTM model by extending modisco's OMG GASTM model. When I generate the model code, there are always some references referring to inexistent data member from GASTMPackage class in package class. Following is one example:

/**
* The number of operations of the '<em>IFile Definition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated not
* @ordered
*/
int IFILE_DEFINITION_OPERATION_COUNT = GASTMPackage.DEFINITION_OPERATION_COUNT + 0;

There is no DEFINITION_OPERATION_COUNT defined in class org.eclipse.modisco.omg.gastm.GASTMPackage.

Why does EMF keep generate reference to inexistent data member? How can I stop getting this error?
Re: Referring to inexistent data member in generated package class [message #1480403 is a reply to message #1479777] Thu, 20 November 2014 06:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30351
Registered: July 2009
Senior Member
Jacob,

That's something we should detect earlier and handle better. It's
because the GASTM model does not have the GenModel's Model -> Operation
Reflection enabled but new GenModels by default will have that enabled.
The combination of the base model having that disabled along with a
derived model having that enabled produces inconsistent results.

On 19/11/2014 7:24 PM, Jacob He wrote:
> I am creating an ASTM model by extending modisco's OMG GASTM model.
> When I generate the model code, there are always some references
> referring to inexistent data member from GASTMPackage class in package
> class. Following is one example:
>
> /**
> * The number of operations of the '<em>IFile Definition</em>' class.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated not
> * @ordered
> */
> int IFILE_DEFINITION_OPERATION_COUNT =
> GASTMPackage.DEFINITION_OPERATION_COUNT + 0;
>
> There is no DEFINITION_OPERATION_COUNT defined in class
> org.eclipse.modisco.omg.gastm.GASTMPackage.
>
> Why does EMF keep generate reference to inexistent data member? How
> can I stop getting this error?
>
Re: Referring to inexistent data member in generated package class [message #1480809 is a reply to message #1480403] Thu, 20 November 2014 13:57 Go to previous message
Jacob He is currently offline Jacob HeFriend
Messages: 10
Registered: October 2013
Junior Member
Thanks. It works after I disable the property.

Ed Merks wrote on Thu, 20 November 2014 01:36
Jacob,

That's something we should detect earlier and handle better. It's
because the GASTM model does not have the GenModel's Model -> Operation
Reflection enabled but new GenModels by default will have that enabled.
The combination of the base model having that disabled along with a
derived model having that enabled produces inconsistent results.

On 19/11/2014 7:24 PM, Jacob He wrote:
> I am creating an ASTM model by extending modisco's OMG GASTM model.
> When I generate the model code, there are always some references
> referring to inexistent data member from GASTMPackage class in package
> class. Following is one example:
>
> /**
> * The number of operations of the '<em>IFile Definition</em>' class.
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated not
> * @ordered
> */
> int IFILE_DEFINITION_OPERATION_COUNT =
> GASTMPackage.DEFINITION_OPERATION_COUNT + 0;
>
> There is no DEFINITION_OPERATION_COUNT defined in class
> org.eclipse.modisco.omg.gastm.GASTMPackage.
>
> Why does EMF keep generate reference to inexistent data member? How
> can I stop getting this error?
>

Previous Topic:Duplicate generated method from extended ecore model
Next Topic:How to annotate to refer other ecore package?
Goto Forum:
  


Current Time: Sun Aug 18 23:55:19 GMT 2019

Powered by FUDForum. Page generated in 0.01940 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top