Papyrus User Guide
- 1 Using modeling editors
- 1.1 UML modeling
- 1.1.1 Getting Started
- 1.1.2 Tutorials on UML modeling with Papyrus
- 18.104.22.168 Model/Diagram creation wizard
- 22.214.171.124 Create a Papyrus Package diagram from a EMF ECore UML model
- 126.96.36.199 Table Documentation
- 1.1.3 Papyrus Zoo of UML Models
- 1.1.4 Constraints in Papyrus
- 1.1.5 Working with Profiles
- 1.2 SysML Modeling
- 1.3 MARTE Modeling
- 1.4 fUML and Alf Modeling
- 1.1 UML modeling
- 2 Developing custom DSL based editor with Papyrus
- 2.1 UML Profile Modeling
- 2.2 MetaModel Modeling
- 2.3 Additional Editor Integration (this section is for the Backone)
- 2.4 Diagram Editors Customizations
- 3 Additional Utilities of Papyrus
- 3.1 Collaborative Work Support
- 3.2 Layer Support
- 3.3 Model Execution
- 3.4 Automatic Layout Support
- 3.5 Code Generation Support
- 3.6 Reverse Engineering
- 3.7 Documentation Support
- 3.8 Deploy your applications
- 3.9 Fragment a Model
- 4 General Feature
- 5 Embedded Editors
- 6 Property View
Using modeling editors
The Papyrus perspective contains :
- Model Explorer view
- Outline view
- Multi diagram editor view
- Properties view
Model Explorer View
The model explorer is used to navigate to the all model's elements and the diagrams.
This action link the model explorer with the active diagram selection. This action works bidirectionally.
This action allow to add new semantic element.
This action allow to add new diagram in current selection.
All actions are available on diagram item.
The model explorer used Common Navigator Framework and provide facilities to customize view.
To customize the content of treeViewer:
To filter the content of treeViewer:
The Outline offers a thumbnail of the graphical representation and the list of semantic elements used in current diagram.
Tutorials on UML modeling with Papyrus
Model/Diagram creation wizard
Create a new Model.
Choose the model file name and the first diagram to create.
Create a diagram from an existing uml file
From your uml file, select the "Initialize Papyrus diagram" to access the creation wizard of Papyrus. Your Papyrus diagram will be linked with your existing model.
Apply a static profile
- 1 - Select a package element (ie a Model or a Package).
- 2 - Select the tab "Profile" on the "Properties" view
- 3 - Click on the plug-in icon
- 4 - Select your static profile
- 5 - Choose profiles to apply
Load an additionnal resource
Show additional resources in your model explorer view
Add an additional resource
Right click on an element of your model and select the menu "Load resource..."
Create a Papyrus Package diagram from a EMF ECore UML model
Papyrus Zoo of UML Models
Composite Structure Diagram
The project is available here 
Constraints in Papyrus
Create and edit constraints
Validate OCL Constraints of a Profile
Working with Profiles
Externalized Profile Applications
Tutorials on SysML modeling with Papyrus
Papyrus Zoo of SysML Models
Tutorials on MARTE modeling with Papyrus
Papyrus Zoo of MARTE Models
fUML and Alf Modeling
Developing custom DSL based editor with Papyrus
UML Profile Modeling
Additional Editor Integration (this section is for the Backone)
Diagram Editors Customizations
Specific Diagram Editors Creation
Diagram Editor Palette Customization
Here you can find the documentation describing palette customization: Doc
This document can also be found in Papyrus help section => User Guide => Palette customization
Property Editor Customization
Model Explorer Customization
Diagram Appearance Customization with CSS Stylesheets
Additional Utilities of Papyrus
Collaborative Work Support
See Layers Guide
Automatic Layout Support
Code Generation Support
Existing Code Generation Facilities
Currently, Papyrus supports code generation for the following programming languages:
Upcoming Code Generation Facilities
Papyrus is going to support code generation for the following programming languages, which are in the experimental phase now, soon:
- ADA code generation
- C code generation
Adding a New Code Generator
Apart from the aforementioned programming language, it is also possible to develop and integrate other code generators to Papyrus. To learn about how to add a new code generator to Papyrus, refer to the following wikipage.
Java Reverse Engineering
Deploy your applications
Fragment a Model
See Submodel Guide
The palette is available with any diagrams. But its content depends on the diagrams type.
The standard palette ( the top container of the palette in red in the here-after capture) contents a standard selection tool (the white arrow), a zoom in and zoom out tool, and marquee selection tools.
The standard palette is available for every diagram.
Standard Selection tool
See Zoom Tools
Marquee Selection Tools
Papyrus has its own set of Toolbars. A Toolbar regroups a set of tools belonging to the same kind of activity.
The different Toolbars can be shown or hide depending on the perspectives.
The toolbars visibility can be customized from the menu Windows/Customize Perspectives.
See Text alignment
Papyrus provides embedded editors to edit UML Elements. Of course these editors allows to edit the name of the elements, but they allow to edit much more than this.
UML ValueSpecification editor
This editor allows to edit UMLValueSpecification. ValueSpecifications are used to define the default value of a Property or to define the multiplicity of a MultiplicityElement (lower and upper values). Papyrus provides an Xtext Editor for UML ValueSpecification. This editor provides completion (CTRL+SPACE) to help the user to define the value to set crossing easily the model.
You can use this editors in Papyrus table or in papyrus Property View for example.
The developer documentation for this editors is available here.
The default grammar of the XText parser for the Value Specification is the following:
(visibility)? (name'=')? value
The values accepted for the differents attributes are the following:
|name||No|| String representing an ID (i.e. XText grammar: |
If the text filled is not compatible with the grammar of XText parser, an
OpaqueExpression will be created.
The XText parser for Value Specification is not restrictive with the text filled, i.e. the different features setted on an existing Value Specification will be kept if possible.
For example: If an existing Value Specification is a
LiteralBoolean named 'testBoolean' with the visibility 'public' and the value setted to
true, the text
false have the same result: the value of
LiteralBoolean existing will pass to
false (the name and the visilibity don't change).
The XText parser reacts differently instead of the type of the Value Specification's container:
Example: Without defined type on Value Specification's container
If the type of Value Specification's container is not defined, the default behaviour will be applied.
Here, some examples:
|Text filled||Namely||Created ValueSpecification|
|+testInstanceValue=InstanceSpec1|| 'InstanceSpec1' is an
||public||testInstanceValue|| 'instance' attribute of |
Example: With defined type on Value Specification's container
If the type of Value Specification's container is setted, the same text filled will be have different behaviour depending to the type. In fact, the value filled must be consistent to the type, otherwise an
OpaqueExpression will be created.
The different types corresponding to
LiteralSpecification are the following:
Here, some examples:
|Text filled||Value Specification's container type||Created ValueSpecification|
Textual Editor For Named Element
Since Papyrus 1.1.0 (Eclipse Mars), Papyrus provides a new texutal editor to edit references to UML NamedElement. This editor works only for references which are not in containment. This editor has not been developed using XText. It use a custom string parser and provide a completion (CTRL+SPACE) to help the user to find the named elements to reference in the model.
You can use this editor in Property View or in Papyrus table for example. Developer documentation is available here.
- This editors allows to find named element typing its name.
- In case of several elements to found, the separator to use is the comma </code>'</code>
- If the name of the element contains a comma, you should prefix and suffix its name by a quote
- The value will not be set if the element can't be found is the model
If you have 3 Classes in your model, named
|typed text||completion proposal||explanation|
|empty string||<Undefined>, ...|| we look for nothing, so we provide the |
|Clas||<Undefined>,Class1,Class2,Clas,s3|| 3 classes matches the string, |
|Class||<Undefined>,Class1,Class2||3 classes matches the string, <Undefined>is always proposed|
|'Clas||<Undefined>, Clas,s3|| the string starts with a quote and Clas,s3 contains a comma, so we propose |
|Clas,||<Undefined>,...||interpreted as a list of value, the first value is </code>Clas</code>, and we have no information for the second one, for the completion it is an empty string|
To be defined
The multiplicity editor contains two modes of edition:
- The simple mode which allows to edit the lower and the upper values from a unique editor
- The advanced mode which allows to edit the lower and the upper values from two editors of ValueSpecification.
The simple mode is represented as the following:
This editor must be filled by the following pattern:
|Value filled||Lower value||Upper value|
The values set as lower and upper are always positive (except the
* for the upper which is valued as -1).
This editor is usable only when the lower ValueSpecification is a
null and when the upper ValueSpecification is a
On the other hand, this editor will be displayed like the following:
Simple ValueSpecification editor
The advanced mode with simple ValueSpecificatiton editors is represented as the following:
The lower and the upper ValueSpecification can be created/edited/deleted by the buttons:
XText ValueSpecification editor
The advanced mode with XText ValueSpecification editors is represented as the following:
This editor use the XText ValueSpecification editors (explain here) with some specificities depending on lower or upper value edition.
The specificity of the lower ValueSpecification edition is when the value filled is an integer, this one will be handled as
LiteralInteger instead of
* value will create an
The specificity of the upper ValueSpecification edition is when the value filled is an integer or
- if the integer is positive or -1, a
LiteralUnlimitedNaturalwill be created
- if the integer is negative, an
OpaqueExpressionwill be created instead of
This is possible to switch between the two modes by two ways:
- The button in the multiplicity editor:
- The multiplicity editor preferences in the property views preferences:
Regarless of the way used to switch modes, the mode used is saved in the preferences and will be used for each multiplicity in Papyrus.