Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Enum editing
EMF Enum editing [message #957340] Thu, 25 October 2012 06:43 Go to next message
zainab alhaidary is currently offline zainab alhaidaryFriend
Messages: 20
Registered: April 2012
Junior Member
Dear All,

In my RCP application database model I have an Enum called Quality Criteria and I have an EClass that has has an attribute of type Quality Criteria (a photo is attached to explain). Through out the application I need to modify this Enum and add/delete some items. I tried several methods like QualityCriteria.VALUES.add(E) but it didn't work. Would anyone please let me know how can I do it?
  • Attachment: EEnum.jpg
    (Size: 68.32KB, Downloaded 222 times)
Re: EMF Enum editing [message #957431 is a reply to message #957340] Thu, 25 October 2012 08:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
You can't change generated EMF models at runtime, just as you can't add
enumerators to Java enums at runtime.


On 25/10/2012 8:43 AM, zainab alhaidary wrote:
> Dear All,
>
> In my RCP application database model I have an Enum called Quality Criteria and I have an EClass that has has an attribute of type Quality Criteria (a photo is attached to explain). Through out the application I need to modify this Enum and add/delete some items. I tried several methods like QualityCriteria.VALUES.add(E) but it didn't work. Would anyone please let me know how can I do it?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Enum editing [message #957438 is a reply to message #957431] Thu, 25 October 2012 08:16 Go to previous messageGo to next message
zainab alhaidary is currently offline zainab alhaidaryFriend
Messages: 20
Registered: April 2012
Junior Member
Is there any modifiable option that I can use instead of enum?
Re: EMF Enum editing [message #957559 is a reply to message #957438] Thu, 25 October 2012 10:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
You can always make it just a string and modify the property
descriptor's getChoiceOfValues to provide the fixed set of strings the
user may enter via a drop down.

On 25/10/2012 10:16 AM, zainab alhaidary wrote:
> Is there any modifiable option that I can use instead of enum?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF Enum editing [message #957741 is a reply to message #957559] Thu, 25 October 2012 13:06 Go to previous message
zainab alhaidary is currently offline zainab alhaidaryFriend
Messages: 20
Registered: April 2012
Junior Member
thank you Smile
Previous Topic:Need to modify the locking mechanism in CDO
Next Topic:unary reference f, fESet=true, despite setting feature to null, is this correct?
Goto Forum:
  


Current Time: Thu Apr 25 15:21:16 GMT 2024

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

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

Back to the top