Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » setNamespace / setOwner ?
setNamespace / setOwner ? [message #628383] Thu, 22 April 2010 08: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 #628396 is a reply to message #628383] Mon, 26 April 2010 09:48 Go to previous message
Christian W. Damus is currently offline Christian W. Damus
Messages: 766
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)
Previous Topic:Model export retaining portable primitive types
Next Topic:AssociationClass directions
Goto Forum:
  


Current Time: Mon Jul 28 12:40:44 EDT 2014

Powered by FUDForum. Page generated in 0.01730 seconds