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 IDE once the IDE has been restarted.
The high-level steps to set up classes for IDE integration are:
Create a subdirectory from the ide/features directory. This will be the base directory for the feature. The subdirectory name should be based on the classes' complete package prefix. When naming the subdirectory, 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 |
Unique base directory names distinguish features from each other.
Two files are required to enable the Feature Integrator facility: projects.dat and default.ini.
The file projects.dat is a VisualAge for Java Version 2.0 repository that must contains Java projects. Only one versioned edition of each project can be included in the repository. You can create this file by importing the classes into an existing IDE project and then exporting the project as a repository (.dat) file. This ensures that the class data available at load time is compiled. Given bytecodes, the IDE can perform optimizations that reduce footprint and increase performance for importing and loading.
The file default.ini is the control file, and is described in the following section.
Resource files associated with the feature can be optionally provided. Follow these steps when providing resource files:
When the feature is integrated with the IDE, all subdirectories of project_resources are copied into ide/project_resources, overwriting any project resource files that have the same names.
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.
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
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 IDE 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.
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 IDE to recognize feature updates.
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 feature is now added to the workspace and any beans specified in a control file Palette-Items entry appear on the Visual Composition Editor palette.
You can also add the feature from the Visual Composition Editor palette:
After a feature has been added, it can be deleted through the Quick Start window.
Setting Up a Class or Bean for Integration
Updating and Removing Integrated Tools and
Classes