This document provides a guide to migrating applications that extend Papyrus to the new Oxygen version APIs.
An API Evolution Report is generated for "Neon to Oxygen" and it is available here: API Evolution Report
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 |
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.
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:
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.
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:
Nevertheless at present time, an important effort should be made to switch to View point with the generation of Architrecture file.
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. Preexiting ecore diagrams have been migrated to Papyrus Class diagrams ensuring a full compatibilty with Papyrus tools.
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 in elementtype, palette and new child. The string reference has been deleted and a new EErefence attribut has been created.
A first tool has been developed to help you to migrate all models based on Elementtype String reference to Elementtype EReference. org.eclipse.papyrus.tools/migrationelementtype
By providing the git folder where the elementtype files are located and the git folder where you want to migrate your initial model, it will replace all Elementtype String to Elementtype EReference. It will generate an automatic xmi:id which as no human meaning.
For instance, it will switch
<specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
<specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_ScP1oVYCEeS0WsAAtVmToA"/>
In order to have human readble elementtype ids, a plugin has been developed to For instance, it will switch
<specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#_ScP1oVYCEeS0WsAAtVmToA"/>
<specializedTypes xsi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#Abstraction "/>
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:
http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7
by
http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.8
The metamodel has changed to manage the matrices:
For each methods in ICellManager
class, the INattableModelManager
corresponding to the current table has been added as parameter.
When this parameter was already available, this one was moved as the last parameter position.
This signature of methods are now:
Old Signature method | New Signature method |
---|---|
handles(Object, Object) |
handles(Object, Object, INattableModelManager) |
isCellEditable(Object, Object, Map<?,?>) |
isCellEditable(Object, Object, Map<?,?>, INattableModelManager) |
isCellEditable(Object, Object) |
isCellEditable(Object, Object, INattableModelManager) |
getOrCreateStringValueConverterClass(INattableModelManager, Map<Class<? extends AbstractStringValueConverter>,AbstractStringValueConverter>, String) |
getOrCreateStringValueConverterClass(Map<Class<? extends AbstractStringValueConverter>,AbstractStringValueConverter>, String, INattableModelManager) |
setStringValue(Object, Object, String, AbstractStringValueConverter, INattableModelManager, Map<?,?>) |
setStringValue(Object, Object, String, AbstractStringValueConverter, Map<?,?>, INattableModelManager) |
The sortAxisByName(boolean, IConfigRegistry)
method in ICompositeAxisManager
class have one more parameter and become sortAxisByName(boolean, IConfigRegistry, boolean)
. This boolean determinates if this is a rows sort (true
) or a columns sort (false
).