Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to duplicate model
How to duplicate model [message #1214993] Wed, 27 November 2013 23:25 Go to next message
jonas b is currently offline jonas bFriend
Messages: 23
Registered: July 2013
Junior Member
Hi,

What's the best way to duplicate a model? I have a model where I want to add some elements. The original model is already used in several unit tests. To test my new feature, I want to add new elements. But I don't want to add them to the existing model, since it would break existing tests.

So what I did was to copy all 3 files (di, uml, notation) and then rename the copies. However, the new uml file still references the original model. I replaced the names also in the uml file. But then the xmi:id is still the old one. Can I simply invent a new id?
Re: How to duplicate model [message #1215946 is a reply to message #1214993] Thu, 28 November 2013 09:00 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
I have the need to be able to copy subtrees from one model to another.

This i want to do often in order to copy adapt subtrees to save huge amount of clicks and endless "add child.." work.

As it seems, it is not possible to do this in Eclipse::UML2 either. Probably one needs to go there for the solution of this issue.

Re: How to duplicate model [message #1215972 is a reply to message #1215946] Thu, 28 November 2013 09:16 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 913
Registered: February 2011
Senior Member
Hi Jonas,

The simplest way to copy/paste a full model is to open it, then use "Save as..."

It might also be possible to copy subtrees from one model to another, if they are opened in the same editor. In the Eclipse UML2 Editor, you can do that with "Load resource...". In Papyrus, this is not supported yet.

Regards,
Camille


Camille Letavernier
Re: How to duplicate model [message #1216039 is a reply to message #1215972] Thu, 28 November 2013 09:46 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
Hello Camille,

do you mean the "same diagram editor"? Then these are from the same model (or model fileset including: di, uml, notation) right?

Do you mean that there is a way to open diagrams from different models (model filesets) in the "same diagram editor"?

Best regards,
Furkan
Re: How to duplicate model [message #1216496 is a reply to message #1216039] Thu, 28 November 2013 13:56 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 913
Registered: February 2011
Senior Member
Hi Furkan,


No, I'm saying "in the same Eclipse UML2 Editor". Right click on the uml file > open with > UML Model Editor. Then use Right click > Load resource... to load another UML Model. Then you may be able to copy/paste subtrees from one model to the other.

This case is not supported in Papyrus, because you cannot display two different models in the same editor.


Camille


Camille Letavernier
Re: How to duplicate model [message #1216792 is a reply to message #1215972] Thu, 28 November 2013 16:35 Go to previous messageGo to next message
jonas b is currently offline jonas bFriend
Messages: 23
Registered: July 2013
Junior Member
Ah yes, 'save as' is exactly what I want (why didn't I figure that out myself...). Thanks!
Re: How to duplicate model [message #1218745 is a reply to message #1216496] Fri, 29 November 2013 12:13 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
Hello Camille thanks for the details. I will give this a try..

Re: How to duplicate model [message #1219157 is a reply to message #1218745] Mon, 02 December 2013 12:16 Go to previous messageGo to next message
Furkan Eke is currently offline Furkan EkeFriend
Messages: 31
Registered: June 2012
Member
wrong topic

[Updated on: Mon, 02 December 2013 12:16]

Report message to a moderator

Re: How to duplicate model [message #1230303 is a reply to message #1214993] Sat, 11 January 2014 16:01 Go to previous messageGo to next message
Ray Joseph is currently offline Ray JosephFriend
Messages: 87
Registered: July 2009
Member
I would like to organize my SysML modeling environment so I may reuse elements.

I am new to Papyrus and could use significant help in determining what the consideration are and maybe some examples. Seeing some restrictions address in the previous messages suggest some planning would be in order.

I would appreciate any and all help.

ray
Re: How to duplicate model [message #1801314 is a reply to message #1230303] Wed, 16 January 2019 15:17 Go to previous message
mohi Mising name is currently offline mohi Mising nameFriend
Messages: 4
Registered: March 2010
Junior Member
Hi, in project explorer(if the project explorere is not open ) form the main meunu (windows--- show view---- project explorer), find your model right click on it and choose copy, then you have a prompt to change the name too. it will copy your model in the same project.
Previous Topic:How to customize SysML transitions?
Next Topic:How to get default values defined in profile in a model
Goto Forum:
  


Current Time: Mon Dec 16 01:48:47 GMT 2019

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

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

Back to the top