# Copying Cutting Pasting in Papyrus

## Introduction

Papyrus's policy is to ensure consistency between models and diagrams, so by default the cut/copy/paste functionalities act both on diagram and model elements. The Copy/Cut/Paste functionalities are available between models and diagrams but not between eclipse instances. The Cut/Paste functionalities are disable on root and read only elements.

## User Interface

### Model Explorer Menu

Right click on a model explorer element

### Model Explorer KeyBinding

- Type M1+C for Papyrus copy
- Type M1+X for Papyrus cut
- Type M1+V for Papyrus paste

    M1 is the COMMAND key on MacOS X, and the CTRL key on most other platforms.
    M2 is the SHIFT key.

### Diagram Menu

On a Diagram element Right Click>EDIT

### Diagram KeyBinding

- Type M1+C for Papyrus copy
- Type M1+X for Papyrus cut
- Type M1+V for Papyrus paste

- Type M1+M2+C for Graphical copy
- Type M1+M2+X for Graphical cut
- Type M1+M2+V for Graphical paste

### Preferences

Papyrus copy/paste/cut preferences is accessible on Window>Preferences>Papyrus>Paste The preference page lists all the available strategies and the checkbox to select whether the references should be kept.

## List of Paste strategies

### Common Strategies

#### Default Paste Strategy

The strategy paste all copied elements in the selected place. It is required for all other strategies.

#### SterotypeStrategy

The strategy reapply profiles and stereotypes on the newly copied elements.

##### Preferences

- Always apply missing profiles: missing profiles will be applied to the root of the target model
- Never apply missing profiles: stereotypes referencing missing profiles will not be paste

#### Rename Strategy

- Only the duplications of the roots elements will be renamed
- An element is renamed only if there is already an element with the same name on the paste selection
- The element will be renamed in CopyOf_NameOfTheElement_id. The id will be incremented for each same copy/paste. Example: a Class1 will become CopyOf_Class1_1 then CopyOf_Class1_2

#### Diagram in model Explorer Strategy

The strategy allows copy/paste for diagrams in model explorer.

#### Table in model Explorer Strategy

The strategy allows copy/paste for tables in model explorer.

### Uml Strategies

The following strategies will only apply on uml models

#### Constraint Paste Strategy

This strategy works only on uml class diagrams. It draws the constraint "context" link after a paste.

### Sysml Strategies

The following strategies will only apply on sysml models

#### Part Paste Strategy

This strategy duplicates the linked association for each property pasted.