Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Duplicate ESETFLAG values when >32 features/class.
Duplicate ESETFLAG values when >32 features/class. [message #1742933] Thu, 08 September 2016 15:55 Go to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
When generating ecore model code (EMF Ecore Code Generator: 2.11.1.v20160208-0841), classes with >32 features contain duplicate ESETFLAG values . For example:

protected static final int PROPERTY_X_ESETFLAG = 1 << 24;
...
protected static final int PROPERTY_Y_EFLAG = 1 << 24;

As a result, when updating PROPERTY_X, ALL_FLAGS is updated to indicate that PROPERTY_Y has changed.

This appears to be a limitation in the EMF Code Generator since an integer is used for ALL_FLAGS, imposing a 32 'feature per class' restriction since an integer (32-bit) can only be left shifted 32 places.

Is there a work-around?

Submitted EMF bug: Bug 501088

For more information, see 155669: Create Remote Script with PUT XML is giving error.

[Updated on: Thu, 08 September 2016 16:18]

Report message to a moderator

Re: Duplicate ESETFLAG values when >32 features/class. [message #1742942 is a reply to message #1742933] Thu, 08 September 2016 17:27 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Paul Slauenwhite wrote on Thu, 08 September 2016 11:55

Is there a work-around?


Create a bogus superclass to hold the first 24 features.

Regards

Ed Willink
Re: Duplicate ESETFLAG values when >32 features/class. [message #1742945 is a reply to message #1742942] Thu, 08 September 2016 18:18 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Thanks Ed for your suggestion. There are some problems with this work-around:

-We have 100+ features in some model classes.
-Our model classes are marshaled to tables in our relational data store.
Re: Duplicate ESETFLAG values when >32 features/class. [message #1742947 is a reply to message #1742945] Thu, 08 September 2016 18:44 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Checking my own models, I find only one use of ESETFLAG, where a boolean needs to be 3-valued. If you are able to allow null, or some other distinctive unset value, you won't need the extra ESETFLAG bit to convert an N-valued domain to N+1 states.

Regards

Ed Willink
Re: Duplicate ESETFLAG values when >32 features/class. [message #1742954 is a reply to message #1742947] Thu, 08 September 2016 20:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Paul,

I returned your Bugzilla as invalid. Please invest at least minimal effort to describe the problem in enough detail that someone else in the world can reproduce it.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Duplicate ESETFLAG values when >32 features/class. [message #1742978 is a reply to message #1742947] Fri, 09 September 2016 02:13 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Thanks Ed W. for your suggestions.

[Updated on: Fri, 09 September 2016 02:17]

Report message to a moderator

Re: Duplicate ESETFLAG values when >32 features/class. [message #1742979 is a reply to message #1742954] Fri, 09 September 2016 02:19 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Ed M.,

I've reopened the defect and attached a test case to reproduce the symptom.
Re: Duplicate ESETFLAG values when >32 features/class. [message #1743118 is a reply to message #1742979] Mon, 12 September 2016 11:12 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
This symptom was caused by an internal code generation tool, which handles generating a consistent *.genmodel across the projects and invoking the EMF Ecore Code Generator to generate our ecore model code. Our product recently upgraded to Java 7 but the tool was not updated. After upgrading the tool to Java 7, the symptom is no longer reproducible.

Apologies Ed M. for opening this defect and thanks to Ed W. for your suggestions.
Previous Topic:context free ocl request
Next Topic:[CDO] Updating package registry
Goto Forum:
  


Current Time: Thu Apr 25 13:05:50 GMT 2024

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

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

Back to the top