This is completely new for me… CTRL-A // CTRL-C
ALT-TAB // CTRL-V
It also works in other applications, even Outlook. This kind of functionality [copy past between models] was already written down in the DSL Tools Book [page 437].
Copy past between models is also possible, but than you have to look very careful what and how you do it. For example copy past within the same model create a model element with the same name with a number at the end.
It’s interesting to look at the Model Explorer, also in that one there are shapes added with the same name.
Now, copy pasting from one diagram to another diagram has the same behavior, modelelements are created with a number. [the number is added because they also get shown in the model explorer, two shapes with the same name isn’t possible]
If you want these shapes to be the same, and not a copy, you need to drag and drop the shape from the model explorer on design surface of the new diagram.
The benefit of this is that now these model shapes are connected, changing the name of one [on the diagrams or the model explorer ] will automatically synchronize the other elements.
Another thing to pay attention to is the copy-past behavior between different model projects…. actually you can see it immediately when pasting in the diagram of the other modeling project, no number added. So you could think that the behavior is the same as drag and drop from the model explorer. But that isn’t the case, while adding an other modeling project also a new root is created in the model explorer. So, those two model elements are two different things. Drag and drop isn’t possible between model projects.
If you do want to re-use mode elements in a different modeling project, you can us the copy past functionality, which works really nice. But, you also can copy past the content of the modeldefinition file to the other project. Don’t think that is the way to go… but it works, it also reminds the relationships between the elements. You could create a default package every project needs to us…