Skip to main content



      Home
Home » Modeling » EMF » Customize EMF Enums
Customize EMF Enums [message #1059785] Tue, 21 May 2013 11:19 Go to next message
Eclipse UserFriend
Hello,

how can i customize a EMF Enum. I want to use another object in the value textfield (properties view), but the textfield only accepted int values.

Generated Code
public enum EnumTest implements Enumerator
{
	TEST(0, "Test", "Test"), //$NON-NLS-1$ //$NON-NLS-2$


But i want to generate such code:
public enum EnumTest implements Enumerator
{
	TEST(AnotherClass.INTEGER_VALUE, "Test", "Test"), //$NON-NLS-1$ //$NON-NLS-2$


Is there a possiblity in EMF?

Thanks
Re: Customize EMF Enums [message #1059865 is a reply to message #1059785] Tue, 21 May 2013 23:10 Go to previous messageGo to next message
Eclipse UserFriend
That's not possible other than by hand modifying the generated code.


On 21/05/2013 5:19 PM, Sir Wayne wrote:
> Hello,
>
> how can i customize a EMF Enum. I want to use another object in the
> value textfield (properties view), but the textfield only accepted int
> values.
> Generated Code
>
> public enum EnumTest implements Enumerator
> {
> TEST(0, "Test", "Test"), //$NON-NLS-1$ //$NON-NLS-2$
>
>
> But i want to generate such code:
>
> public enum EnumTest implements Enumerator
> {
> TEST(AnotherClass.INTEGER_VALUE, "Test", "Test"), //$NON-NLS-1$
> //$NON-NLS-2$
>
>
> Is there a possiblity in EMF?
>
> Thanks
Re: Customize EMF Enums [message #1059967 is a reply to message #1059865] Wed, 22 May 2013 07:49 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your quick reply.

Should i create a improvement ticket?
Re: Customize EMF Enums [message #1059974 is a reply to message #1059967] Wed, 22 May 2013 08:07 Go to previous message
Eclipse UserFriend
No, the Ecore model doesn't support that; it needs the actual value to
support dynamic models and to provide those values reflectively.


On 22/05/2013 1:49 PM, Sir Wayne wrote:
> Thank you for your quick reply.
>
> Should i create a improvement ticket?
Previous Topic:[Edapt] Factory problems ...
Next Topic:[CDO] Clearing a CDOResource content which has a Proxy object
Goto Forum:
  


Current Time: Wed Jul 30 17:09:40 EDT 2025

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

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

Back to the top