Inserting manual updates

The namespace changes and other version 7 changes might require additional manual updates to be made to Java files and data files such as the MANIFEST.MF and plugin.xml files.

Extension point references

The following table lists the public extension points available in version 6 and the equivalent extension points in version 7. The table does not list any new extension points.
Note: The documentation on all extension points is available in the product online help; clickHelp > Help Contents, and open the "Extending Rational® product functionality" topic.
Extension point in version 6 Extension point in version 7
com.ibm.xtools.common.ui.services.properties.propertiesProviders org.eclipse.gmf.runtime.common.ui.services.properties.propertiesProviders
com.ibm.xtools.emf.msl.Pathmaps org.eclipse.gmf.runtime.emf.core.Pathmaps
com.ibm.xtools.emf.validation.constraintProviders org.eclipse.emf.validation.constraintProviders
com.ibm.xtools.presentation.decoratorProviders org.eclipse.gmf.runtime.diagram.ui.decoratorProviders
com.ibm.xtools.presentation.layoutProviders org.eclipse.gmf.runtime.diagram.ui.layoutProviders
com.ibm.xtools.patterns.core.patternProviders com.ibm.xtools.patterns.core.patternProviders
com.ibm.xtools.transform.core.transformationExtensions com.ibm.xtools.transform.core.transformationExtensions
com.ibm.xtools.transform.core.transformationProviders com.ibm.xtools.transform.core.transformationProviders
com.ibm.xtools.uml2.msl.UMLLibraries com.ibm.xtools.uml.msl.UMLLibraries
com.ibm.xtools.uml2.msl.UMLProfiles com.ibm.xtools.uml.msl.UMLProfiles

UML2 Meta-model and profiles

With the new UML2 2.1 metamodel, the namespace URI that defines the metamodel has changed.

If client code programmatically applies stereotypes from the "Basic", "Intermediate" or "Complete" profiles then a change may be required. In version 7, all three profiles were combined into the "Standard" profile.

If client code programmatically imports the package for the UML2 primitive types library or the UML2 metamodel, then you should be aware that the URIs for these corresponding models have changed.
  • In version 6, the metamodel and primitive type model URIs were defined as pathmap://UML2_METAMODELS/UML2.metamodel.uml2 pathmap://UML2_LIBRARIES/UML2PrimitiveTypes.library.uml2
  • In version 7, the metamodel and primitive type model URIs were defined as pathmap://UML_METAMODELS/UML.metamodel.uml pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml

Model Explorer view replaced with Project Explorer view

In the version 6 Rational modeling products, the Model Explorer view was used to browse the contents of a model and the Diagram Navigator view was used to browse the available model diagrams, both UML model diagrams and domain specific (visualizations). In version 7, both of these views have been replaced with the Project Explorer view, which is base Eclipse view. The UML Modeler simply contributes content to this Project Explorer view.
  • If the client code had a view ID reference for the Model Explorer view, for example to add a selection listener for the Model Explorer part, the corresponding Project Explorer part ID must be used, the org.eclipse.ui.navigator.ProjectExplorer.
  • If the client code defined a pop-up menu extension to add menu items to the Model Explorer context menu, then the new version should use an <objectContribution> element that can be defined where the objectClass is specified as "com.ibm.xtools.uml.navigator.ModelServerElement". This corresponds to a UML Modeler contribution to the Project Explorer content.
  • If the client code defined a pop-up menu extension to add menu items to the Diagram editors context menu, then the new version should use a <viewerContribution>element that can be defined where the targetID of the viewer is specified as "org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu".

Using the new UMLModeler class

If the UMLModeler class from com.ibm.xtools.modeler.ui is used, then the model management API for reading and writing UML models uses the new transactional API (org.eclipse.emf.transaction) instead of the deprecated Xtools MSL API (com.ibm.xtools.emf.msl). Some manual code modifications will be needed to make the client code work with the transactional API.

The version 6 code for reading a model used the ResourceSetReadOperation class with an execute(IProgressMonitor) method that performed the required logic. With the new transactional API, the corresponding code to read a model is as follows:
TransactionalEditingDomain editDomain = UMLModeler.getEditingDomain();
      editDomain.runExclusive( new Runnable() {
		    public void run() {
			          // code to read the model goes here
		    }
      });
The version 6 code for modifying a model used the ResourceSetModifyOperation class with an execute(IProgressMonitor) method that performed the required logic. With the new transactional API, the corresponding code to modify a model is as follows:
String undoLabel = "Modify Operation";
       TransactionalEditingDomain editDomain = UMLModeler.getEditingDomain();
       editDomain.getCommandStack().execute( 
		     new RecordingCommand(editDomain, undoLabel) {
			          protected void doExecute() {
				                // code to modify the model goes here
			          }
		     });

Feedback