Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus/Migration Guide/Oxygen

< Papyrus
Revision as of 09:22, 16 May 2017 by Francois.le-fevre.cea.fr (Talk | contribs) (A feature for expert user that creates upon Papyrus)

Papyrus Oxygen API Migration Guide

This document provides a guide to migrating applications that extend Papyrus to the new Oxygen version APIs.

API Evolution Report

An API Evolution Report is generated for "Neon to Oxygen" and it is available here: API Evolution Report

Infra Layer

Deprecated code

Following deprecated types have been removed:

Deprectated Types New Types
org.eclipse.papyrus.infra.emf.readonly.AbstractReadOnlyHandler org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler
org.eclipse.papyrus.commands.NotifyingWorkspaceCommandStack org.eclipse.papyrus.infra.emf.gmf.command.NotifyingWorkspaceCommandStack
org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper
org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper
org.eclipse.papyrus.infra.gmfdiag.common.utils.GMFUnsafe org.eclipse.papyrus.infra.emf.gmf.util.GMFUnsafe
org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusPreferencePage org.eclipse.papyrus.infra.ui.preferences.AbstractPapyrusPreferencePage
org.eclipse.papyrus.uml.diagram.common.util.MDTUtil org.eclipse.papyrus.infra.gmfdiag.common.utils.MDTUtil

ElementTypesConfiguration Framework

ElementTypesConfiguration Metamodel Changes

The metamodel for the ElementTypesConfigurations has been changed to use model-based defintion of specialization relationships among elementtypes and advice ordering specification. Although these changes don't change the underlying concepts of the elementtypesconfigurations and their extensions, they impact the *.elementtypesconfigurations models created with this metamodel.

You'll find all the details of the changes below. A little developer tool has been developed to assist the migration in the org.eclipse.papyrus.types.dev plugin (namely: org.eclipse.papyrus.dev.types.handlers.MigrateSpecializations). Note that if there are specializations of elementtypes coming from multiple files, you must select all the files to migrate.

Migration of the NsURI

Old Namespace URI New Namespace URI
http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.1 http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2

Migration of the SpecializationTypeConfiguration

The specializedTypesID attribute of org.eclipse.papyrus.infra.types.SpecializationTypeConfiguration is now specializedTypes. Instead of being a list of String-based identifiers of elementtypes, developers can now reference to the org.eclipse.papyrus.infra.types.ElementTypeConfiguration to specialize at a model level directly.

Should the elementtype to reference be already defined using the extension point mechanism, developers may use an org.eclipse.papyrus.infra.types.ExternallyRegisteredType to have a model element that is a "proxy" to the extension point definition.

Migration of the AdviceConfiguration

The before and after attributes of org.eclipse.papyrus.infra.types.AdviceConfiguration are now lists of org.eclipse.papyrus.infra.types.AdviceConfiguration instead of being lists of String-based qualified names of Java classes implementing org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice. Developers can now reference to the org.eclipse.papyrus.infra.types.AdviceConfiguration to force advice execution order at a model level directly.

Should the advice to reference be already defined using the extension point mechanism, developers may use an org.eclipse.papyrus.infra.types.ExternallyRegisteredAdvice to have a model element that is a "proxy" to the extension point definition.

Toolsmiths Layer

A feature for expert user that creates upon Papyrus

A new feature has been created to gather all plugins utilities dedicated to create utility programs upon Papyrus. At present time, it contains the following plugins:

  • org.eclipse.papyrus.customization.nattableconfiguration
  • org.eclipse.papyrus.toolsmiths.palette
  • org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.editor
  • org.eclipse.papyrus.views.properties.toolsmiths
  • org.eclipse.papyrus.uml.properties.generation
  • org.eclipse.papyrus.views.properties.model.xwt
  • org.eclipse.papyrus.infra.gmfdiag.expansion.edit
  • org.eclipse.papyrus.infra.gmfdiag.expansion.editor
  • org.eclipse.papyrus.infra.emf.types.ui.properties
  • org.eclipse.gmf.runtime.emf.ui.properties
  • org.eclipse.papyrus.uml.types.ui.properties
  • org.eclipse.papyrus.toolsmiths


To do so a refactoring has been done to migrate those plugins into their own sub folders. At present time a maven pom approach has been priviled by creating when possible a folder with a pom plugin.

  • rename from plugins/customization/org.eclipse.papyrus.customization.properties.generation to plugins/uml/properties/org.eclipse.papyrus.uml.properties.generation
  • rename from plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt to plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt
  • rename from plugins/customization/org.eclipse.papyrus.customization.properties to plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths
  • rename from plugins/customization/org.eclipse.papyrus.infra.gmfdiag.expansion.[edit/editor] to plugins/infra/gmfdiag/expansion/org.eclipse.papyrus.infra.gmfdiag.expansion.edit
  • rename from plugins/customization/org.eclipse.papyrus.customization.nattableconfiguration to plugins/infra/nattable/org.eclipse.papyrus.customization.nattableconfiguration

Focus on the DSML Configurator Plugin

In order to help expert user to create upon Papyrus, several improvements have been made to a former plugin dedicated to generate plugin from a list of model customization:

  • ModelTemplate now takes into account di and notation files in addition of uml file
  • Palette has been migrated to latest version
  • TableConfiguration plugin has been integrated

Nevertheless at present time, an important effort should be made to switch to View point with the generation of Architrecture file.

Switching from Ecore models to Papyrus UML models

An effort has been made to switch from pure ecore model to Papyrus UML model in all relevant plugins used in Papyrus Toolsmiths. The genmodel is now based on the UML model, it generates the Ecore model used to produce model, edit and editor plugins.

Switching from Elementtype String based references to Elementtype EReference

Papyrus is becomming more and more model based, an effort has been made to migrate all models that use Elementtype with String references to Elementtype with EReferences.


User experience

To improve user experience a set of menu and popups links has been create to gathger all sub menus and commands

PaletteConfiguration model

Currently there is no automatic way to migrate the palette configuration from old to the new version. Later a tool should be available.

Here is a manual method to pass from old to new model.

In a papyrus instance:

  1. Create a copy of your palette configuration model.
  2. open it with a text editor
  3. Remove all elementTypeId attributes. (keep it in the original file)
  4. replace http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7 by http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8
  5. Save it and open it with palette configuration editor.
  6. For each tool, add elementType which corresponds to the elementTypeIds in the original file. Past its id in the search field is a easy way to find the corresponding element type.
  7. In the plugin.xml file at the palette configuration declaration. Replace org.eclipse.papyrus.uml.diagram.common.paletteDefinition by org.eclipse.papyrus.infra.gmfdiag.common.paletteDefinition.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.