JMigrator
JMigrator is a
Eclipse plugin supporting
- large refactorings
- migrating applications to new library versions
License
JMigrator is
provided as is as Open-Source software under the Common
Public License (CPL).
Installation
The installation
of JMigrator is described in another document: Installation
Refactoring Tags
A central idea
of JMigrator is to document changes to APIs of interfaces and classes
with special Java Meta Tags called Refactoring
Tags. The
following Refactoring Tags are supported until now:
- deprecatedInheritance:
the inheritance-relationship between two classes is marked as
deprecated; all polymorphic assignments based on this inheritance
generate warnings
- past (class level): a
class refers to an old version of the class; references to the old
version of the class generate warnings
- past (method level): a
method refers to an old version of the method; references to the old
version of the method generate warnings
When an
interface or class is denoted in a refactoring tag, it has the
following form: package1.package2:InterfaceOrClass. In contrast with
standard Java notation the dot between the package and class name is
replaced by a colon. java.util.List would become java.util:List.
When
method is denoted in a refactoring tag, it has the following form: package1.package2:InterfaceOrClass#method. In contrast with
standard Java notation the dot between the package and class name is
replaced by a colon and class and method name are separated by a hash.
The special notation was choosen to simplify parsing of interface,
class and method names.
Using JMigrator
Check Code
Activate "Check
Code" in the menu "JMigrator" to start interpreting the Refactoring
Tags. All old warnings will be removed and new warnings will be
generated. The warnings are displayed in the "problems" view.
Export
Rename-Map
JMigrator can
generate a rename map from the past tags at class and method level. The
rename map can be exported to an ASCII file with "Export Rename-Map".
The ASCII file has a very simple format:
- every
renaming has its own line
- the first
part of each line is the old name (as denoted by the past) tag, then
"->" introduces the new name; old and new names are given in the
format described above (section "Refactoring Tags")
Authors of this
Document
Stefan Roock,
11-jul-2004
Stefan Roock,
08-jun-2004