Copying model elements with stereotype applications. [message #476399] |
Thu, 18 October 2007 12:49  |
Eclipse User |
|
|
|
Originally posted by: firstname.name.gmail.com
Hey,
I need to copy a UML model. For this purpose I use the EcoreUtil.Copier, but the
copied model has lost information about stereotype applications.
How may I preserve stereotype information when I do a copy. I looked at
PackageOperations::StereotypeApplicationCopier() but it doesn't seem to achieve
this goal.
thanks.
--
F. Lagarde
|
|
|
Re: Copying model elements with stereotype applications. [message #476408 is a reply to message #476399] |
Mon, 22 October 2007 09:54  |
Eclipse User |
|
|
|
Hi Francois.
There is a similar defect open on that.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=204658
As a suggestion to resolve this, you could determine if the element you are
copying has a stereotype applied to it. You could use
Element::getAppliedStereotypes(). Then for each applied stereotype, you
could get the profile that it belongs to. Try Stereotype::getProfile().
Then, in the destination model, make sure that the corresponding profile is
applied, then apply the stereotype to the element.
(I haven't looked at this problem in great detail yet so there may be more
efficient ways of doing this).
You may want to add your name to the notification list of the bug listed
above.
Cheers,
- James.
""Fran
|
|
|
Re: Copying model elements with stereotype applications. [message #625241 is a reply to message #476399] |
Mon, 22 October 2007 09:54  |
Eclipse User |
|
|
|
Hi Francois.
There is a similar defect open on that.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=204658
As a suggestion to resolve this, you could determine if the element you are
copying has a stereotype applied to it. You could use
Element::getAppliedStereotypes(). Then for each applied stereotype, you
could get the profile that it belongs to. Try Stereotype::getProfile().
Then, in the destination model, make sure that the corresponding profile is
applied, then apply the stereotype to the element.
(I haven't looked at this problem in great detail yet so there may be more
efficient ways of doing this).
You may want to add your name to the notification list of the bug listed
above.
Cheers,
- James.
""Fran
|
|
|
Powered by
FUDForum. Page generated in 0.06479 seconds