Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » reflection: accessing UML classes from (instance) EObject?
reflection: accessing UML classes from (instance) EObject? [message #478116] 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 #478117 is a reply to message #478116] Thu, 08 January 2009 22:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
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 #478118 is a reply to message #478117] 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
Re: reflection: accessing UML classes from (instance) EObject? [message #627324 is a reply to message #478116] Thu, 08 January 2009 22:32 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
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 #627325 is a reply to message #478117] 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:reflection: accessing UML classes from (instance) EObject?
Next Topic:How to add comments for any Model Object
Goto Forum:
  


Current Time: Thu Apr 25 12:37:34 GMT 2024

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

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

Back to the top