Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » setNamespace / setOwner ?
setNamespace / setOwner ? [message #528930] Thu, 22 April 2010 12:41 Go to next message
Itamar is currently offline Itamar
Messages: 39
Registered: November 2009
Member
Is there an API call to set an Element's owner? (e.g. set a Class's owning Package / set an Operation's owning Class)
Re: setNamespace / setOwner ? [message #529592 is a reply to message #528930] Mon, 26 April 2010 13:48 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 802
Registered: July 2009
Senior Member
Hi, Itamar,

The most conventional way to set the owner of any element is to add that
element to the appropriate containment reference of its intended parent.
e.g.,

someClass.getOwnedOperations().add(someOperation)

Some containments have settable inverses, but probably not all, so it's
easiest just to work top-down.

Cheers,

Christian


On 22/04/10 08:41 AM, Itamar wrote:
> Is there an API call to set an Element's owner? (e.g. set a Class's
> owning Package / set an Operation's owning Class)
Re: setNamespace / setOwner ? [message #529870 is a reply to message #529592] Tue, 27 April 2010 14:21 Go to previous messageGo to next message
Itamar is currently offline Itamar
Messages: 39
Registered: November 2009
Member
Thanks!

I was sure I tried this.. Anyway, it works. Thank you.
Re: setNamespace / setOwner ? [message #628414 is a reply to message #529592] Tue, 27 April 2010 14:21 Go to previous message
Itamar is currently offline Itamar
Messages: 39
Registered: November 2009
Member
Thanks!

I was sure I tried this.. Anyway, it works. Thank you.
Previous Topic:Ecore 2 Uml conversion question
Next Topic:[Announce] Webinar: CDO Model Repository - Apr. 29
Goto Forum:
  


Current Time: Wed Oct 22 12:25:15 GMT 2014

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

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