Copying elements from one model to another losing stereotypes [message #1709864] |
Thu, 01 October 2015 10:21  |
Eclipse User |
|
|
|
Hi,
I have a project made of a model file and a profile file.
New developments have been made in the model in // and I need to merge all of those in a single model.
What I did is that I loaded both projects in the same workspace, then select in the Project Explorer the source project and go to the Model Explorer and copy the element I am interesting in, then go back to the Project Explorer to select the target project, switch to the Model Explorer view and paste at the right location the element.
However when doing that the stereotypes are not copied.
Is there a way to copy the stereotypes? Or another way to merge projects?
I am using Papyrus 1.1.0 on Eclipse Mars.
Thanks and regards,
Marc
|
|
|
|
|
Re: Copying elements from one model to another losing stereotypes [message #1709955 is a reply to message #1709930] |
Fri, 02 October 2015 04:53   |
Eclipse User |
|
|
|
Hi Marc,
This is supposed to work, but I can confirm the bug regarding Stereotypes applied on the copied elements, when you make a cross-editor copy/paste. This works fine when copy/pasting inside the same editor however.
The workaround would be to load the source model inside the target model (So you have both models loaded in the same editor), then make your copy/paste.
To do so:
- Open the target model
- In the model explorer, Right click on the root model -> Import -> Import package from user model
- Select your source model, press OK. The source model now appears in your model explorer (And you can open the diagrams as well if you want to make a graphical copy)
- Copy the elements you want from the source model, and paste them in your target model
Note that you need to manually apply the same profile before copying stereotyped elements. If the profile is not applied on the target model, stereotypes will not be applied during the paste.
HTH,
Camille
|
|
|
Re: Copying elements from one model to another losing stereotypes [message #1710498 is a reply to message #1709955] |
Wed, 07 October 2015 03:54  |
Eclipse User |
|
|
|
I'm facing exactly the same issue as Marc does (we're working on the same model). I did some more analysis on the workaround as described below:
1. Exported the model as zip1
2. Imported the model from zip1 into new workspace1
3. Modified the model in workspace1
3a. Renamed the model
3b. Added a class with an additional stereotype
3c. Added an attribute with additional stereotype
3d. Added a comment
4. Exported the model as zip2 from workspace1
5. Imported the modified model from zip2 into workspace3
6. Imported the model from workspace3 into the original model as a package
7. Copied the new class to the trunk model from the package
Result is I lose all stereotypes and stereotype parameter values when copying from the package to the original model tree.
I'm using:
Version: Mars Release (4.5.0)
Build id: 20150621-1200
Best Regards,
/Peter
|
|
|
Powered by
FUDForum. Page generated in 0.04322 seconds