Skip to main content
Jump to: navigation, search

Difference between revisions of "Papyrus/Papyrus Developer Guide"

m (Papyrus additional components)
Line 169: Line 169:
==== Papyrus additional components  ====
==== Papyrus additional components  ====
To add extra features to the Papyrus Discover, you should edit the files located here:<strike>/cvsroot/org.eclipse/HEAD/www/modeling/mdt/papyrus/downloads/discovery/juno/</strike>
To add extra features to the Papyrus Discover, you should edit the files located here: ssh://
Now it is on git: ssh://
==== Papyrus as a Modeling component  ====
==== Papyrus as a Modeling component  ====

Revision as of 04:34, 12 June 2014

Development Environment

To ease the development on Papyrus, each member of the team works with basically the same configuration.

Common Environment

Following is a description of the basic configuration:

  • The latest Eclipse Modeling (Or Standard) release
  • EGit
  • [1] JAutoDoc
    • Configure the header template according to your company: Eclipse Preferences -> Java -> JAutodoc
  • Java 1.6:
    • Eclipse Preferences -> Java -> Compiler
    • Eclipse Preferences -> Java -> Installed JREs
    • VM Arguments for debug mode:
-Dosgi.requiredJavaVersion=1.6 -Xms768m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=384m -XX:+CMSClassUnloadingEnabled

Required External Plugins

Papyrus requires some external plugins in order to compile.
The following page maintain a list of Papyrus Required External Plugins

Development Plan


The specifications are available here: Luna plan

Getting the code

Connecting to the git repository

The code is available under git at this location ssh:// or See the Papyrus project developer resources page for more details

Retrieve code

To know if a downloaded plugin should compile, you can have a look to a Papyrus installation. If the plugin comes with the installation, it should compile!

  • The following plugins are not distributed and could be closed (deprecated, not yet provided in the Papyrus distribution or for developpers only):
all plugins of the layer 'developer', except if you need to generate diagrams (in this case you should install GMF Tooling as well) 
  • Only the follwing projects are currently provided by the Papyrus extra-plugins update site. The others projects can be closed.(They are deprecated, not yet provided in the Papyrus distribution or for developpers only):
  • The tests plug-ins are located under tests/junit/plugins or tests/junit/extraplugins. Other test projects are not necessarily maintained

Retrieve configuration files

The Papyrus Code Templates and Java Formatter files are available under the Papyrus repository in the folder doc/DeveloperDocuments/templates/
FAQ How do I control the Java formatter
FAQ How can templates make me the fastest coder ever

The note explains how to install the templates in your environment.

Papyrus Architecture

Papyrus Generation

Papyrus Code Standards

  • Java Doc - every class, method and field including private ones should be documented with Java Doc
  • No abbreviations - the class, methods and variables should have meaningful names
  • Formatting - the code should be formatted in accordance with format templates
  • Always use brackets in conditions, loops, ...
  • Compile - the modified code and other plugins should be compilable. Be sure to use Java 1.5 code compatibility. Check other plugins that could be influenced before commiting!
  • Standard Java Rules coding - Unless specified differently, the Java Standard Coding rules should be applied: no abbreviations, variables starting with lower case; class and types with upper case; Composed name separated with upper case; no underscore in names; ...
  • In case of doubt - check existing code from those following the rules :-)

Papyrus Plug-ins and Features

See Papyrus code standards for plug-ins and features

Papyrus Coding guidelines

A few points may be a little tricky when coding for Papyrus. Among them:

Papyrus Plugin Naming Scheme and Folders Structure

Structure and behavior of papyrus

Papyrus Command Execution, History, Undo/Redo

Papyrus ServiceRegistry

The ServiceRegistry is one of the main Papyrus component. The idea is that each Papyrus feature should be a service registered to the ServiceRegistry.

The ServiceRegistry should be accessible from any code. It allows to retrieve the components you need to perform your task.
A new implementation of the ServiceRegistry is submitted. The new ServiceRegistry is discused here Papyrus Developer Guide/Service Registry

How To ...

Commit, Report Bugs, patchs (Code Contributing)

Papyrus Code Examples

Papyrus Log

Papyrus Editors

Currently Papyrus provides 2 editors kinds : Diagrams and Table. How to add your own editor kind is explained here Papyrus Developper Guide/How to - Add your own editor in Papyrus

JUnit Tests

How to add JUnit tests to the build: Papyrus Developer Guide/Add JUnit Test Bundle

Useful utilities for JUnit tests: Papyrus Developer Guide/JUnit Test Framework

Write Documentation for Papyrus

How to - Related to documentation Papyrus Developer Guide/Writing Documentation

Papyrus Discovery

Papyrus additional components

To add extra features to the Papyrus Discover, you should edit the files located here: ssh://

Papyrus as a Modeling component

Papyrus is available from the Modeling Package, using the discovery UI of this package. This contribution is made by the project located here: git://,

the file is located in the folders discovery/downloads/RELEASE_NAME

Papyrus (Nat)Table Developper Documentation

Papyrus Diagram Developper Documentation

Papyrus Build Process

New plugin Submition Process

New plugin should follow the submition process describe here: Papyrus New Plugin Submission Process

Back to the top