Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Enumerator to EEnum navigation
Enumerator to EEnum navigation [message #1001930] Thu, 17 January 2013 15:20 Go to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi

Is there an easy way to navigate from an
org.eclipse.emf.common.util.Enumerator to its 'parent' EEnum?

I can only see a tedious approach involving a name match between the
Java class name and some cache/registry of known EEnums.

Regards

Ed Willink
Re: Enumerator to EEnum navigation [message #1002231 is a reply to message #1001930] Fri, 18 January 2013 08:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
Ed,

No, it's much like trying to find an EClass given only a Java Class.
Given there could be EClass/EDataType wrappers, the answer isn't even
necessarily unique.


On 17/01/2013 4:20 PM, Ed Willink wrote:
> Hi
>
> Is there an easy way to navigate from an
> org.eclipse.emf.common.util.Enumerator to its 'parent' EEnum?
>
> I can only see a tedious approach involving a name match between the
> Java class name and some cache/registry of known EEnums.
>
> Regards
>
> Ed Willink
Re: Enumerator to EEnum navigation [message #1002336 is a reply to message #1002231] Fri, 18 January 2013 12:21 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi

Thanks. But I think it was a stupid question. I cannot reproduce the
case of an Enumerator that is not an EEnumLiteral now.

Regards

Ed Willink

On 18/01/2013 08:14, Ed Merks wrote:
> Ed,
>
> No, it's much like trying to find an EClass given only a Java Class.
> Given there could be EClass/EDataType wrappers, the answer isn't even
> necessarily unique.
>
>
> On 17/01/2013 4:20 PM, Ed Willink wrote:
>> Hi
>>
>> Is there an easy way to navigate from an
>> org.eclipse.emf.common.util.Enumerator to its 'parent' EEnum?
>>
>> I can only see a tedious approach involving a name match between the
>> Java class name and some cache/registry of known EEnums.
>>
>> Regards
>>
>> Ed Willink
>
Re: Enumerator to EEnum navigation [message #1002341 is a reply to message #1002336] Fri, 18 January 2013 12:31 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
Ed,

For generated models, the generated enum's enum literals won't be
instances of EEnumLiteral.


On 18/01/2013 1:21 PM, Ed Willink wrote:
> Hi
>
> Thanks. But I think it was a stupid question. I cannot reproduce the
> case of an Enumerator that is not an EEnumLiteral now.
>
> Regards
>
> Ed Willink
>
> On 18/01/2013 08:14, Ed Merks wrote:
>> Ed,
>>
>> No, it's much like trying to find an EClass given only a Java Class.
>> Given there could be EClass/EDataType wrappers, the answer isn't even
>> necessarily unique.
>>
>>
>> On 17/01/2013 4:20 PM, Ed Willink wrote:
>>> Hi
>>>
>>> Is there an easy way to navigate from an
>>> org.eclipse.emf.common.util.Enumerator to its 'parent' EEnum?
>>>
>>> I can only see a tedious approach involving a name match between the
>>> Java class name and some cache/registry of known EEnums.
>>>
>>> Regards
>>>
>>> Ed Willink
>>
>
Previous Topic:Create additional resource on file open
Next Topic:Modeling Custom Exceptions?
Goto Forum:
  


Current Time: Sat Oct 25 00:42:33 GMT 2014

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

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