Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Problem copy sterotype
icon3.gif  Problem copy sterotype [message #551832] Mon, 09 August 2010 17:10 Go to next message
123star  is currently offline 123star Friend
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 #552901 is a reply to message #551832] Sat, 14 August 2010 08:54 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
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 #556528 is a reply to message #551832] Wed, 01 September 2010 16:28 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
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:How to register UML Metamodel (standalone)
Next Topic:Problem copy sterotype
Goto Forum:
  


Current Time: Sat Apr 20 04:07:52 GMT 2024

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

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

Back to the top