Customize EMF Enums [message #1059785] |
Tue, 21 May 2013 11:19  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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 #1059974 is a reply to message #1059967] |
Wed, 22 May 2013 08:07  |
Eclipse User |
|
|
|
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?
|
|
|
Powered by
FUDForum. Page generated in 0.06702 seconds