This is a feature of JBuilder Professional and Enterprise.
The Package Migration tool helps you convert existing projects and source code by renaming all specified references to new references. This tool also creates new directories and moves files over based on new package names as applicable. Use this tool to:
To open the Package Migration tool, choose Tools|Package Migration.
Select the type of update you want the Package Migration tool to make. Click the down arrow beside this field to select from previously saved settings or select New to create a new file that will store the settings you define. These predefined settings are available:
For information on the javax.swing
changes, see the Sun's web site at http://http://java.sun.com/j2se/1.3/compatibility.html.
Allows you to create a new file where settings you define in this dialog will be stored. You specify the new file name and description in the Create New Settings dialog box. The name is then added to the list for the Settings field and automatically selected. The description is also displayed beneath the Settings field whenever this settings file is selected.
If you select to create a new package migration settings file and do not choose Save before closing this dialog, a confirmation dialog will display asking whether to save your settings.
Displays the Save Properties File dialog, which prompts you for the file name to store the settings defined in this dialog. By default, the file is given a .properties file extension and is saved in the migration
directory of your user/.jbuilder
directory. This option does not perform the package migration but merely saves the settings defined in this dialog.
This tab collects information in a two-column table on the packages and classes you want renamed (and moved) to new references/locations. The renaming process follows the order specified in the table; use the Move Up and Move Down buttons to change the processing order.
The left column of the table lists the original package or class names that you want changed. Partial package names are acceptable as long as they include a full directory name, followed by a period then an asterisk. Do not specify the file extension; file extensions are listed in the File Types field on the Paths tab. For example, these are valid values for this field:
borland.*
borland.sql.dataset.*
borland.sql.dataset.Connection
The right column of the table lists the new references for the package or class name indicated to the left of the same line. If a package name is specified with use of a wildcard character, new directory structures will be created to match the new package structure if necessary.
Adds a blank entry at the bottom of the table for you to add a new pair of values for Existing Package/Class Name and New Package/Class Name.
Deletes the current line of the table and moves up all entries that follow. There is no undo capability so take care when selecting this option.
Moves the current line up one row in the table, which affects the order in which the current package or class is processed.
Moves the current line down one row in the table, which affects the order in which the current package or class is processed.
Performs the package migration according to settings specified in this dialog. While the Package Migration tool is processing, status information is displayed in the Processing Package Migration dialog box.
This tab collects settings for the locations of files to process, file types to process, and other options.
The root directory where the source files are located. The Package Migration tool uses this path to search for the source files it will process. Click the ellipsis button beside this field to choose a directory using the Select Migration Base Directory dialog box.
Select this checkbox to have a backup copy of all files made before any source files are updated by this tool. Enter the name of the backup directory in the edit box beneath this field or click the ellipsis button to specify the directory where backups are to be stored.
The types of files that the Package Migration tool will process. Include the * wildcard for the filename, a period, then the file extension. Separate multiple file types with a semi-colon (;). This field defaults to *.jpr;*.java
.
Select this option to save the output to a log file. Enter the name of the log file in the edit box or click the ellipsis button to specify a log file.
Prompt On Replace: Specifies that a confirmation dialog be displayed each time an existing file in the new directory location is about to be overwritten. This field is selected by default.
Prompt On Move: This tool creates new directories as needed based on new package/class names, processes the specified files, and moves them to these new directories as appropriate). This option specifies that a dialog should be displayed for each file processed to confirm whether it should be moved to its new location.
Performs the Package Migration according to settings specified in this dialog. While the Package Migration tool is processing, status information is displayed in the Processing Package Migration dialog box.