Creating a Usage programmatically [message #471979] |
Wed, 28 March 2007 12:22  |
Eclipse User |
|
|
|
Originally posted by: jlemmett.cc.hut.fi
Hi,
I can easily create an InterfaceRealization between a component and an
interface by
component.createInterfaceRealization(name, contract);
but I can't seem to figure out how to create a Usage between a component
and an interface. Any help would be appreciated
Janne
|
|
|
Re: Creating a Usage programmatically [message #471981 is a reply to message #471979] |
Wed, 28 March 2007 13:30  |
Eclipse User |
|
|
|
Janne,
This is your lucky day...
A fix was committed for this the other day. See this bug for details on
how to create such a thing...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=173726
The fix should be part of the official API starting in the build after
tomorrow.
This is your workaround..
Usage usage = (Usage) package_.createPackagedElement(
null, UMLPackage.Literals.USAGE);
usage.getClients().add(namedElement);
usage.getSuppliers().add(supplier);
Regards,
- James.
"Janne Lemmetti" <jlemmett@cc.hut.fi> wrote in message
news:eue4oi$sud$1@build.eclipse.org...
> Hi,
>
> I can easily create an InterfaceRealization between a component and an
> interface by
>
> component.createInterfaceRealization(name, contract);
>
> but I can't seem to figure out how to create a Usage between a component
> and an interface. Any help would be appreciated
>
> Janne
|
|
|
Re: Creating a Usage programmatically [message #604108 is a reply to message #471979] |
Wed, 28 March 2007 13:30  |
Eclipse User |
|
|
|
Janne,
This is your lucky day...
A fix was committed for this the other day. See this bug for details on
how to create such a thing...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=173726
The fix should be part of the official API starting in the build after
tomorrow.
This is your workaround..
Usage usage = (Usage) package_.createPackagedElement(
null, UMLPackage.Literals.USAGE);
usage.getClients().add(namedElement);
usage.getSuppliers().add(supplier);
Regards,
- James.
"Janne Lemmetti" <jlemmett@cc.hut.fi> wrote in message
news:eue4oi$sud$1@build.eclipse.org...
> Hi,
>
> I can easily create an InterfaceRealization between a component and an
> interface by
>
> component.createInterfaceRealization(name, contract);
>
> but I can't seem to figure out how to create a Usage between a component
> and an interface. Any help would be appreciated
>
> Janne
|
|
|
Powered by
FUDForum. Page generated in 0.02624 seconds