Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » reflection: accessing UML classes from (instance) EObject?
reflection: accessing UML classes from (instance) EObject? [message #426506] Thu, 08 January 2009 22:23 Go to next message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Hi,
when I generate an ecore model based on an UML model, how can I then access the UML (class) model from an (instance)
EObject? I would like to do something like "myObject.eClass().getTheCorrespondingUMLClass()".
Somehow I can't find this explained anywhere.

Thanks for helping

Joel
Re: reflection: accessing UML classes from (instance) EObject? [message #426507 is a reply to message #426506] Thu, 08 January 2009 22:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Joel,

There's no mapping maintained to do that, and certain not in the form of
API whereby the Ecore model has direct references to the UML model. .
If you know which UML package corresponds to which EPackage (via the
nsURI presumably), then likely the name correspondence between the
EClass and the UML UML would be sufficient to do the mapping...


Joel Greenyer wrote:
> Hi,
> when I generate an ecore model based on an UML model, how can I then
> access the UML (class) model from an (instance) EObject? I would like
> to do something like "myObject.eClass().getTheCorrespondingUMLClass()".
> Somehow I can't find this explained anywhere.
>
> Thanks for helping
>
> Joel


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: reflection: accessing UML classes from (instance) EObject? [message #426508 is a reply to message #426507] Fri, 09 January 2009 07:51 Go to previous message
Joel Greenyer is currently offline Joel GreenyerFriend
Messages: 170
Registered: July 2009
Senior Member
Hi Ed,
I was afraid that this information is not stored anywhere explicitly...
Of course the ecore API has no reference to UML, but I thought there would be generically accessible annotations or
something like that.

I'll think of something,
Thanks

Joel

Ed Merks wrote:
> Joel,
>
> There's no mapping maintained to do that, and certain not in the form of
> API whereby the Ecore model has direct references to the UML model. .
> If you know which UML package corresponds to which EPackage (via the
> nsURI presumably), then likely the name correspondence between the
> EClass and the UML UML would be sufficient to do the mapping...
>
>
> Joel Greenyer wrote:
>> Hi,
>> when I generate an ecore model based on an UML model, how can I then
>> access the UML (class) model from an (instance) EObject? I would like
>> to do something like "myObject.eClass().getTheCorrespondingUMLClass()".
>> Somehow I can't find this explained anywhere.
>>
>> Thanks for helping
>>
>> Joel
Previous Topic:Re: EMF Derived Attribute Notifier
Next Topic:Splitting a model into different files
Goto Forum:
  


Current Time: Fri Apr 26 11:44:46 GMT 2024

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

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

Back to the top