1.0 Update to "Setting up class libraries or beans for integration" task file
2.0 Update to "Setting up a tool for integration" task file
The following information replaces the "Setting up class libraries or beans for integration" section in the task information for the External Tool Integration component of VisualAge for Java.
Setting up class libraries or beans for integration
An external class library or set of beans can be set up any time after VisualAge for Java has been installed. In VisualAge for Java, the external class libraries or beans are also called features. After features have been set up, they become visible within the Integrated Development Environment once the Integrated Development Environment is restarted, and the features have been added to the workspace
The steps to set up features for integration into the Integrated Development Environment are as follows.
The following sections provides details about these steps.
Step 1. Create a base directory for the feature
Create the base directory for the feature like this:
X:\IBMVJava\ide\features\base_directory
where X: is the drive where VisualAge for Java is installed.
The base directory name should be based on the complete package prefix for the class.
When naming the base directory, replace the periods (.) in the package name with
dashes (-). The following table shows two examples.
Complete package prefix | Base directory for class library |
com.dingbat.widgets | com-dingbat-widgets |
abc.enterprise.databuilder | abc-enterprise-databuilder |
Each base directory can contain multiple packages. Unique base directory names distinguish features from each other.
Step 2. Create, version and export a project
Use the VisualAge for Java Workbench to create a project for the packages, classes, and resource files for the feature.
To add a project and its associated files to the workspace, perform the
following steps:
After you finish developing the feature, version the project by doing the following:
Once the project is versioned, export the project and its resources as a repository to the base directory for the feature by performing the following steps:
The project and its resources are exported as follows:
X:\IBMVJava\ide\features\base_directory\projects.dat
X:\IBMVJava\ide\features\base_directory\projects.dat.pr\your_project\time_stamp\
your_resources
where your_project is the name of the project you exported, time_stamp
date and time the project was versioned project, and your_resources are the resource files associated with the project.
Step 3. Create a control file
Create a control file, named default.ini, and copy it into the base directory. The control file provides
integration information to the IDE. This file must be a flat ASCII file, cannot include blank lines, and
must follow this format:
Name=<feature_name>
Version=<feature_version>
Help-Item=<menu_text>,<HTML_filename>
Palette-Items=<category_group>[;...]
<category_group>=<category_name>,<class_name>[,<class_name>...]
Prereq-Features=<base_directory>[,< base_directory>]
Parameter values cannot be delimited by quotation marks. In addition, commas (,) and semi-colons (;) cannot be used except when delimiting parameter values, as specified in the
syntax above. Only the Name and Version entries are mandatory; all other entries are optional.
Examples of control files
Example 1. Class Library Integration with Help
Name = Factory API
Version = 3.0
Help-Item = Factory API, index.html
Example 2. Class Library Integration with Help and One Palette Category
Name = Factory API
Version = 3.0
Help-Item = Factory Beans, beans.html
Palette-Items = Factory, com.factory.Generator1,com.factory.Generator2
Example 3. Class Library Integration with Help and Two Palette Categories
Name = Factory API
Version = 3.0
Help-Item = Factory Beans, beans.html
Palette-Items = Factory1, com.factory.Generator1,com.factory.Generator2; Factory2,
com.factory.Mulcher1, com.factory.Mulcher2
Step 4. Create control files for other supported languages (optional)
Create a control file for each language you want to support, and place these files into the base directory. To name these control files, follow the Java naming convention for locale support:
<language>[_<country>].ini.
For example, en_GB.ini would be the name of the British English control file, and fr.ini would be the
name of the French control file.
When determining which control file to use, the Integrated Development Environment follows this sequence, using <language> and <country> values for the default locale:
All control files must be in flat ASCII format, although parameter values can use non-ASCII Unicode values with \uxxxx notation. In addition, a-f characters in \uxxxx format should be uppercased.
Even if language-specific control files are supplied, a default.ini file must always be supplied. As well, only a change in the timestamp of default.ini can trigger the Integrated Development Environment to recognize feature updates.
Step 5. Restart the IDE and add the feature to the workspace
When the Integrated Development Environment starts, your feature is
automatically integrated into the Integrated Development Environment as follows:
All Java projects in the projects.dat file, and resources in the projects.dat.pr directory are copied to the repository. If a problem occurs in either copying the feature to the repository or adding it to the workspace, the feature's default.ini is renamed to default.$$$ so that the Integrated Development Environment will not encounter this problem every time it starts. As well, the Integrated Development Environment produces an error message that appears in the Log window.
Information from the default.ini is saved in the workspace registry of installed features. If a feature is successfully installed, all feature files still remain on the file system. This way, the feature can be easily re-loaded if the workspace needs to be changed or is corrupted.
Once a feature has been successfully integrated, you must still add it to the workspace in order to use it.
The following information replaces the "Action-Items (optional)" section of "Setting up a tool for integration" help file.
Action-Items (optional)
Overrides the default operation that occurs when the user selects the Open menu item or double-clicks on a resource file shown in the Resource page of the Project Browser. The entry includes the following: