Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Problem copy sterotype
Problem copy sterotype [message #628568] Mon, 09 August 2010 17:10 Go to next message
123star  is currently offline 123star
Messages: 70
Registered: June 2010
Member
Hi,

I'd like to copy a Port and all its stereotypes; i tried with EcoreUtil.Copier but it copies only the port and not its stereotypes.

How can I do this?

Thanks in advance, 123star
Re: Problem copy sterotype [message #628582 is a reply to message #628568] Sat, 14 August 2010 08:54 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
This is an expected behavior. Stereotypes are lost during transformation stage.
a trick could be to add a glue at the end of the process in order to rewrite the needed stereotype.
Re: Problem copy sterotype [message #628620 is a reply to message #628568] Wed, 01 September 2010 16:28 Go to previous message
Christian W. Damus is currently offline Christian W. Damus
Messages: 801
Registered: July 2009
Senior Member
Hi, 123star,

The EcoreUtil::Copier can copy a collection of objects. Copy the Port
and its applied stereotypes (using Element::getStereotypeApplications()
API or some such; I forget the exact name) in one copy operation. The
copier will ensure that the stereotype copies correctly link to the port
copy.

HTH,

Christian


On 09/08/10 01:10 PM, 123star wrote:
> Hi,
>
> I'd like to copy a Port and all its stereotypes; i tried with
> EcoreUtil.Copier but it copies only the port and not its stereotypes.
>
> How can I do this?
>
> Thanks in advance, 123star
Previous Topic:Problem copy sterotype
Next Topic:how to create object diagram using UML 2 eclipse tool
Goto Forum:
  


Current Time: Mon Oct 20 13:11:39 GMT 2014

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

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