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 73 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: 26215
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?
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: 26215
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?
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: Sat Nov 22 00:34:51 GMT 2014

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

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