Project

General

Profile

Feature #1865

MIRA: Copy traces when copying requirements

Added by Anonymous almost 7 years ago. Updated 7 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
12/12/2013
Due date:
% Done:

0%

Estimated time:

Description

At the moment traces of requirements are not copied when pasting the requirement after a copy or cut action.

Traces should be also copied/moved after a affirmation of the user (confirmation dialog).


Related issues

Related to Bug #1971: MIRA: Error when copying components in the component architectureClosed03/03/2014

Related to Feature #2343: Handle complex copy&paste operations in the tooling pluginsNew06/02/2015

History

#1 Updated by Anonymous over 6 years ago

  • Assignee changed from Anonymous to Anonymous
  • Target version changed from Phoenix - BACKLOG to Phoenix 2.6 Release

#2 Updated by Anonymous over 6 years ago

  • Assignee changed from Anonymous to Anonymous

#3 Updated by Anonymous over 6 years ago

  • Assignee changed from Anonymous to Anonymous

#4 Updated by Anonymous over 6 years ago

  • Target version changed from Phoenix 2.6 Release to AF3 2.6 RC4 UI Improvement

#5 Updated by Anonymous about 6 years ago

  • Target version changed from AF3 2.6 RC4 UI Improvement to Phoenix 2.7 Release

#6 Updated by Anonymous about 6 years ago

The way to do this is to let Requirement (with the real implementation being in RequirementStaticImpl of course) implement org.fortiss.tooling.kernel.model.SpeciallyCopyiable.java (a change to .ecore is necessary).
There is only one method to be implemented, namely the specialCopyHook(Map<EObject, EObject> copyMap) which is called on both, copy/cut and paste. This can be seen in org.fortiss.tooling.kernel.ui.util.CopyPasteUtils.java.

Every element which implements SpeciallyCopyiable will have the specialCopyHook called separatedly.
In RequirementStaticImpl.java we then should get void specialCopyHook(RequirementImpl requirementImpl, Map<EObject, EObject> copyMap).

One can not directly differ whether a current call of specialCopyHook is called from copying/cuting or pasting. Unsure and hard to explain content ahead: the only difference is the map we are copying to. When copying/cuting the map is the clipboard and when pasting the map is the real model. When copying/cuting we therefore have only the map's content and no real model instances of the content. When pasting we have the map's content and real model instances of, for example, the requirements that were selected to be pasted. So by checking whether there are real model instances we can find out whether we just have to only create a RequirementRelation and add it to the map or to create one and add it to the analysis node. (Dr. Aravantinos is the expert on this matter and has done something similar but not equal with Component ports, which can be found by checking the type hierarchy of SpeciallyCopyiable)

A possible pitfall is when more than one requirement is selected and put in the clipboard. For the following example lets assume we have two requirements in the clipboard, though more complex scenarios are possible.
If those two requirements share a requirement relation, then it is wished that the newly created requirements also share the newly created requirement relation, which is created by specialCopyHook. As every requirement has its own call of specialCopyHook though, we can not just create a requirement relation and set its targets and sources, we have to check for which requirements are in the copy map and which are not and set targets and sources accordingly.

When cuting (Ctrl+X) it is to note that selected requirements and related requirement relations which become empty are destroyed, so a full representation of requirements and their requirement relations has to be saved to the copy map.

It definitely is possible but someone with more knowledge about creating components, adding them to the analysis node (and make all this work with the CommandStackService to provide bugless change revert ?) is required.

#7 Updated by Anonymous about 6 years ago

  • Assignee changed from Anonymous to Anonymous

#8 Updated by Anonymous almost 6 years ago

  • Target version changed from Phoenix 2.7 Release to Phoenix - BACKLOG

#9 Updated by Anonymous over 2 years ago

  • Assignee set to Anonymous

#10 Updated by Anonymous over 2 years ago

  • Target version changed from Phoenix - BACKLOG to AF3 2.13 RC1 (Feature Freeze)

#11 Updated by Anonymous over 2 years ago

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

#12 Updated by Simon Barner over 2 years ago

  • Related to Feature #2343: Handle complex copy&paste operations in the tooling plugins added

#13 Updated by Simon Barner over 2 years ago

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

Moving target version as per today's discussion.

#14 Updated by Johannes Eder 7 months ago

  • Status changed from New to Rejected
  • Assignee deleted (Anonymous)

MIRA traces have been removed.

Also available in: Atom PDF