Feature #2360

[UI] Improve pasting a copied model element multiple times

Added by Simon Barner over 5 years ago. Updated almost 3 years ago.

Start date:
Due date:
% Done:


Estimated time:


Observed behavior:

  • When a copied model element is pasted in a diagram for the first time (e.g., a component in a component diagram), the following measures are taken to help the user to distinguish the original from the copy
    • Element is copied with an offset (see #2344)
    • The prefix "Copy of" is prepended to the name of the original
  • However, when the same copied element is pasted another time, it is positioned at exactly the same position as the first copy (thanks to #2344, the name is included a suffix to distinguish the first and the second copy)
Expected behavior:
  • The double offset is applied again to the second copy, i.e. the relative position of the second to the first copy is the same as the one of the first copy to the original
  • This results in a stacked view of all pasted copies, growing to the bottom-right


#1 Updated by Anonymous over 4 years ago

  • Assignee set to Anonymous

#2 Updated by Anonymous over 4 years ago

the class org.fortiss.tooling.kernel.ui.util.CopyPasteUtils deals with the copy&paste functionality.

Paste is done from "clipboard", and the name of the object is changed in this class only, but the node is moved by the compositor (of the object). I can see 2 ways in which this issue could be solved,
1) after pasting change the contents of the clipboard and replace the object in the clipboard by the "pasted object".
2) In the compositor somehow find out if there is an object at that offset in the container, if yes then further change the offset.

I prefer the first one, but I understand that a change in kernel is not desired.

#3 Updated by Anonymous over 4 years ago

  • Status changed from New to Feedback
  • Assignee changed from Anonymous to Simon Barner

implemented the first option

#4 Updated by Simon Barner over 4 years ago

  • Status changed from Feedback to Closed

Fix confirmed (tested with CA and PA).

As soon as #2347 is resolved, we will have a really "professional copy-and-paste experience". :-)

#5 Updated by Simon Barner almost 3 years ago

  • Assignee deleted (Simon Barner)

Also available in: Atom PDF