The Migrator interface is used for migrating user customizable settings from
previous installations of JDeveloper to the user home of a new installation.
Migration may take place during one or both of two migration "phases". The
first phase of migration occurs at startup before the IDE has been
completely initialized and is signalled by a direct call to the migrate
method of the Migrator. First phase migration should deal with the raw
migration of files and should avoid trying to access any state information
of the IDE itself.
Second phase migration may be performed upon notification that all addins
have been loaded indicating that the IDE is in a valid initialized state.
Second phase migration usually involves tweaking a file that has already
been migrated by an associated first phase Migrator implementation. For
example; an extension that persists its settings in the settings.xml file
may require a second phase Migrator to tweak the resultant file that was
migrated by the associated first phase Migrator
oracle.ide.config.IdeSettingsMigrator. In this example, the second phase
Migrator would not attempt to migrate the settings.xml file itself, but
rather would simply add itself as an oracle.ide.IdeListener of the IDE and
wait for the addinsLoaded event in order to make the necessary changes to
the live object returned by oracle.ide.Ide.getSettings(). This would ensure
that the live object reflected the new values which in turn would be
persisted by the live object at the next opportunity, thereby resulting in a
fully migrated settings.xml on disk. Note that when using this approach,
before tweaking any objects, the second phase Migrator would be expected to
verify that the first phase Migrator actually allowed first phase migration
by checking the isSelected method for the category of interest on the first
No more than a single first phase Migrator implementation should ever
attempt to migrate a given file. Any number of second phase Migrator
implementations may attempt to alter the live object resulting from the
loading of the file migrated by the first phase Migrator.