Migrating extensibility APIs

An API migration tool is provided to help convert the API calls in Java classes, but the tool does not modify any non-Java files such as plug-in dependencies and extension points in the plugin.xml files. The migration tool contains a rule-based search and replace engine along with a large set of rules for converting the public API calls available in the previous release of the Rational® modeling products into the equivalent calls for the current version. The searches are aware of the Java semantics (imports, class declarations, method calls, and so on).

About this task

There are several steps required for migrating client code that was used the version 6 public APIs and extension points. Due to the complexity of UML2 changes between versions 1.x and 2.1, some of the required modifications cannot be handled by the search-and-replace mechanism. In those cases, the rules will insert TODO comments into the Java source code with an indication of what needs to be done. When the tool is installed, the user will be able to select Java classes, Java packages or Java projects and then run this API migration tool against the selection. The tool sweeps the Java classes and applies the migration rules.

Note: Because of the large number of rules and the number of Java searches that will need to be performed, the tool is best run against a small set of plug-ins and not a huge batch run. Therefore, the proposed usage of the tool is for individual teams to convert their own plug-ins. To enable testing, this would imply that the lowest level plug-in in the dependency chain would have to be converted first.

The API migration tool only provides a starting point for the changes that may need to be made to client code. To see examples of client code, click File > New > Example, and choose one of the Modeler Plug-in examples.


Feedback