Project

General

Profile

Bug #2347

[UI] Avoid that copied model elements are added as children of the original selection

Added by Simon Barner over 5 years ago. Updated 6 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Start date:
06/03/2015
Due date:
% Done:

60%

Estimated time:

Description

Problem:

When pasting a set of copied model elements, the copies will be added as children to one of the originally selected elements.

Note that the problem as occurs if multiple elements are copied/pasted. In this case, the copies are added to the "youngest" of the copied model elements

Steps to reproduce:

  • Create Component Architecture
  • Add Component "C"
  • Within "Component Architecture" diagram editor, click onto "C" in order to select it
  • Copy "C" to the clipboard (e.g., CTRL+C)
  • Paste copy of "C" from the clipboard (e.g., CTRL+V)
  • Observe that the copy of "C" has been added as a child element of C

Expected behavior:

The copy of "C" is added as a sister element of "C", i.e. as a child of the component architecture

component-editor.PNG (6.83 KB) component-editor.PNG Simon Barner, 12/07/2016 04:11 PM
component-navigator.PNG (3.08 KB) component-navigator.PNG Simon Barner, 12/07/2016 04:11 PM

Related issues

Related to Bug #2777: [State automata] not possible to copy paste a state while it is selectedClosed12/06/2016

History

#1 Updated by Simon Barner over 5 years ago

  • Tracker changed from Feature to Bug

#2 Updated by Anonymous about 5 years ago

  • Assignee set to Anonymous
  • Target version changed from AF3 2.8 RC1 (Feature Freeze) to AF3 2.8 RC2 (Tested & Bugfixed)

#3 Updated by Anonymous about 5 years ago

  • Target version changed from AF3 2.8 RC2 (Tested & Bugfixed) to AF3 2.10 GUI Improvement Week

#4 Updated by Johannes Eder over 4 years ago

  • Target version changed from AF3 2.10 GUI Improvement Week to AF3 2.10 Feature Freeze

#5 Updated by Anonymous over 4 years ago

  • Priority changed from Normal to High
  • Target version changed from AF3 2.10 Feature Freeze to AF3 2.10 Post-release

#6 Updated by Anonymous about 4 years ago

  • Target version changed from AF3 2.10 Post-release to AF3 2.11 GUI Improvement Week

#7 Updated by Anonymous almost 4 years ago

Not easy. Was thinking at first that we can directly change the compositor so that if you compose an element with "itself" then we actually add the copy to the parent and not to yourself.

But this would then prevent pasting "C" into "C" even if done on purpose: if I open the editor of "C" and want explicitly to paste "C" in there.

So the behaviour should actually depend on the editor which is open when pasting.
Problem is that we do not have access to the editor when in the PasteAction.

Could try using PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().

#8 Updated by Anonymous almost 4 years ago

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

Should now be fixed.

#9 Updated by Anonymous almost 4 years ago

  • Related to Bug #2777: [State automata] not possible to copy paste a state while it is selected added

#10 Updated by Simon Barner almost 4 years ago

The original issue seems to be fixed (elements are no longer added as children of the original selection). However, the following issues remain:

Copying first Component in Component Architecture Editor

  • Start a fresh AF3 instance and create a new project (this is necessary because sometimes this problem seems to disappear after a while)
  • Add new "Component Architecture"
  • Add new component "Component" using drag and drop from the model element library
  • Select "Component" (single left click)
  • Copy (CTRL+C)
  • Observe that paste (CTRL+V) has no effect
  • Only after selecting the "background" (i.e., the component architecture), it CTRL+V works as expected (also multiple times)

Naming of copies in Component Architecture Editor

  • Add new component "Component"
  • Select "Component"
  • Copy (CTRL+C)
  • Paste (CTRL+V) multiple times: All copies of the component are named "Component" (regression of #2360)
  • See component-editor.png

Naming of copies in Model Navigator

  • Add new component "Component"
  • Select "Component"
  • Copy (CTRL+C)
  • Paste (CTRL+V) multiple times: Each time the copy is added, the suffix "1" is added to the component name
  • See component-navigator.png

Pasting copies in Platform Architecture Editor

  • Add new generic execution unit "Generic ECU"
  • Select "Generic ECU"
  • Only after selecting the "background" (i.e., the platform architecture), it CTRL+V works as expected (but only once, i.e. paste the next copy, the background has to clicked using the mouse again)
  • Naming of ECU copies is fine (also in the model navigator, btw.)

#11 Updated by Anonymous almost 4 years ago

  • Status changed from Feedback to In Progress
  • Priority changed from High to Normal
  • Target version changed from AF3 2.11 GUI Improvement Week to AF3 2.12 GUI Sprint
  • % Done changed from 0 to 60

Ok, no time for all of those. I delay till next GUI sprint.

#12 Updated by Anonymous over 3 years ago

  • Assignee changed from Anonymous to Anonymous

#13 Updated by Anonymous over 3 years ago

So the naming of Components and Requirements works just fine.
The pasting issue in the Platform Architecture Editor still persists: Only after selecting the "background" (i.e., the platform architecture), it CTRL+V works as expected (but only once, i.e. paste the next copy, the background has to clicked using the mouse again)
I wasn't able to figure out, why it works in the component editor, but not in the platform editor.

#14 Updated by Anonymous almost 3 years ago

  • Status changed from In Progress to Rejected

#15 Updated by Simon Barner almost 3 years ago

  • Status changed from Rejected to In Progress
  • Assignee deleted (Anonymous)

Reopening since the issue persists.

#16 Updated by Anonymous over 2 years ago

  • Assignee set to Simon Barner

#17 Updated by Simon Barner over 2 years ago

  • Target version changed from AF3 2.12 GUI Sprint to AF3 2.14 RC1 (Feature Freeze)

#18 Updated by Johannes Eder over 1 year ago

  • Target version changed from AF3 2.14 RC1 (Feature Freeze) to Backlog

#19 Updated by Johannes Eder over 1 year ago

  • Target version changed from Backlog to AF3 2.16 RC1 (Feature Freeze)

#20 Updated by Johannes Eder over 1 year ago

  • Target version changed from AF3 2.16 RC1 (Feature Freeze) to AF3 2.16 RC2 (Tested, Bug-free)

#21 Updated by Simon Barner about 1 year ago

  • Target version changed from AF3 2.16 RC2 (Tested, Bug-free) to AF3 2.17 (Tested, Bug Free)

To be check with planned new implementation of component editor

#22 Updated by Johannes Eder 6 months ago

  • Target version changed from AF3 2.17 (Tested, Bug Free) to AF3 2.18 - Critical bugs fixed

Also available in: Atom PDF