IDL 7.1 Plug-in Wizard (Not available in IDL 8)
Topic:
Note: Plug-ins are not supported in IDL 8.0 and 8.1. However, they are supported in IDL 8.2. The link below takes you to an article with more information about how to install plug-ins with IDL 8.2:
http://www.exelisvis.com/Support/HelpArticleDetail/ArticleId/5212.aspx
Introduction
The IDL Plug-in Wizard provides a simple method for IDL users to distribute IDL code or SAVE files to other users. The Plug-in Wizard converts an IDL project into an IDL Workbench feature, and also creates all of the files needed for an update site used to distribute the feature. Other IDL users can use the IDL Workbench update mechanism to locate, download, and install the feature. After a feature is installed, the encapsulated IDL project can be executed.
Table of Contents
***Note: If you do not have Administrator permissions on your machine, you may need to modify your approach when installing Plug-ins or Features, or when creating and/or using a local update site as described in Help Article # 4484
If you are unable to install or utilize a Plug-in or Feature due to read/write permissions on the /idlde/plugins directory, see the help article mentioned above.
|
Discussion:
Plug-ins and Features
The IDL Workbench is built upon the open-source Eclipse development environment. The Eclipse framework defines an application as a collection of plug-ins to the base Eclipse platform. Each plug-in is a collection of resources — source code, object code, documentation content, or almost any other type of file — that defines what the plug-in does and how it does it. The IDL Workbench itself consists of a set of plug-ins that extend and modify the Eclipse development environment.
Eclipse is designed to easily incorporate plug-ins; you can install a plug-in manually by simply dropping it into the appropriate directory. In IDL's case, this means that you drop plug-ins containing IDL source code (.pro
) and save (.sav
) files into the directory that contains the IDL Workbench plug-ins (the idlde/plugins
subdirectory of the IDL installation directory). This directory is included in IDL's default search path for .pro
and .sav
files. Once you have installed a new plug-in, you can immediately execute the plug-in's IDL code.
If you want to distribute your plug-in over the Internet, you can use the IDL Workbench Update Manager, whi ch is responsible for downloading new Workbench functionality. However, the Update Manager does not download individual plug-ins; instead, it downloads features, which contain one or more plug-ins, along with several ASCII files that describe the plug-in(s).
To distribute your IDL code plug-in to other IDL users, you would wrap the plug-in inside a feature, and copy the feature to a special Update Site. At this point, an Update Manager can connect to the Update Site and download the feature.
Plug-ins
A plug-in is simply a directory that contains various resource files. For convenience, a plug-in directory is often zipped up into a single file with a .jar
extension. When IDL plug-ins are installed, the JAR files are unpacked so the source code files can be found and read by IDL.
A plug-in created by the Plug-in Wizard consists of the following:
- All files from the project (the directory structure of the project is preserved)
- A
META-INF
folder that contains a manifest.mf
file
The manifest.mf
file is a text (UTF-8) file that describes the packaging and prerequisites of your code, and is created by the IDL Plugin Wizard. It consists of a list of name-value pairs, as in the following example:
The following table explains the manifest.mf
file values:
Table 14-1: The Manifest.mf File
Keyword
|
Description
|
Manifest-Version
|
This value is always 1.0.
|
Bundle-ManifestVersion
|
This value is always 2.
|
Bundle-Name
|
The Plug-in Name associated with the project.
|
Bundle-SymbolicName
|
The Plug-in ID associated with the project.
|
Bundle-Version
|
The Plug-in Version associated with the project.
|
Bundle-Vendor
|
The Plug-in Provider associated with the project.
|
A plug-in JAR filename has the following syntax:
For example, if a project has a Plug-in ID of purple.rain
and a Plug-in Version of 1.9.84
, the plug-in JAR file is named purple.rain_1.9.84.jar
.
The Plug-in ID and Plug-in Version values are taken from the properties of the project that was selected when the Plug-in Wizard was opened. See IDL Plugin Properties Page for a description of these project properties.
The Plug-in Wizard creates a plug-in to encapsulate the main project code. A plug-in is also generated for each project that is referenced by the main project.
Features
A feature is a wrapper around one or more plug-ins. Physically, it is a directory (or JAR file) that contains two files:
A feature JAR filename has the following syntax:
For example, if the Plug-in ID is purple.rain
and the Plug-in Version is 1.9.84
, the feature JAR file is named purple.rain.feature_1.9.84.jar
.
The Plug-in ID and Plug-in Version values are taken from the properties of the project that was selected when the Plug-in Wizard was opened. See IDL Plugin Properties Page for a description of these project properties.
Feature.xml
The feature.xml
file is created by the IDL Plugin Wizard, and has the following structure:
The following table describes the Feature.xml
tags:
Table 14-2: Tags in the Feature.xml File
Tag
|
Description
|
feature
|
The feature tag uses the following attributes:
- id - The value has the syntax <plug-in ID>.feature (plug-in ID is taken from the selected project)
- version - The plug-in version of the selected project
- provider-name - The Provider property of the main project
|
install-handler
|
This tag tells the Update Manager that the feature contains java code that must be executed during the installation of the feature.
|
description
|
The url attribute is set to the main project's site URL property. The value of the description tag is taken from the main project's Description property.
|
copyright
|
The value is taken from the main project's Copyright property.
|
license
|
The value is taken from the main project's License Agreement property.
|
url
|
The url tag uses the following attributes:
- label - The selected project's Site Name property
- url - The selected project's site URL property
If either of the project's Site Name or Site URL properties are an empty string, the corresponding file attribute is omitted. If both properties are an empty string the URL attribute is omitted.
|
plugin
|
There is a plugin tag for the selected project, and an additional plugin tag for each project that is referenced by the selected project. The plugin tag uses the following attributes:
- id - The project's Plug-in ID property
- version - The project's Plug-in Version property
Note - A plugin tag created for a referenced project will take its value from the referenced project, and not from the project selected when the Plugin Wizard was opened.
|
com.rsi.idldt.idl.plugin.install.handler.jar
The com.rsi.idldt.idl.plugin.install.handler.jar
file is an install handler that contains Java code to be run when the feature is installed. The specific contents of this file are unimportant; at this stage, what matters is that the file contents work as expected.
- back to top -
The Update Site
While you can distribute your IDL code in plug-in form, to do this you must transport the files and the end user must drop the plug-in into the correct IDL directory. There is an alternate method of distributing plug-ins that uses features, Update Sites, and the Workbench Update Manager.
An Update Site is a small collection of files in a set directory structure, located either on a local directory or on a remote machine running a web server. However, the Update Site does not distribute plug-ins. Instead, it hosts features, which are small collections of files that virtually wrap around one or more plug-ins. You can use the Plugin Wizard to package your IDL code into features and create an Update Site to host them. IDL Workbench users can then import or download the features using the Workbench Update Manager.
There are some advantages to distributing IDL code in features, using an Update Site. While a plug-in adds one new module of functionality, a feature can encompass multiple modules of functionality, which makes it an ideal package for wrapping an entire feature set. By distributing code through an Update Site and the IDL Update Manager, you can automate the distribution process and let IDL handle the low-level details. Hosting features on an Update Site is also a convenient way to distribute your IDL code to a large number of users at once.
Update Site Structure
In the directory specifed by the Output Location field on the IDL Plugin Wizard dialog, the Plugin Wizard creates the <plug-in_id>_updatesite directory. All of the Update Site components are inserted into this directory. These components include:
Table 14-3: Components of an Update Site
Component
|
Description
|
site.xml file
|
See Site.xml File for a discussion of this file.
|
Features directory
|
This directory contains the generated feature JAR file.
|
Plug-ins directory
|
This directory contains a plug-in JAR file for the selected project, as well as a plug-in JAR file for each project referenced by the selected project.
|
Site.xml File
The site.xml
file is created by the IDL Plugin Wizard and contains the information necessary to identify the directory structure as an Eclipse Update Site. It contains a short description of the update site and a list of all features that are available for download through the site. In this case, the file describes a single feature.
The site.xml
file has the following structure:
The following table describes the Site.xml
tags:
Table 14-4: Tags in the Site.xml File
Tag
|
Description
|
description
|
The text enclosed by the description tag is the value of the Plug-in Description property associated with the main project.
The description tag uses the following attributes:
|
feature
|
The feature tag uses the following attributes:
- url - The path to the feature JAR file relative to the site.xml file
- id - The Feature ID which is the Plug-in ID of the main project appended with ".feature"
- version - The Feature Version, which is the Plug-in Version of the main project
|
Update Site File Encoding
All of the XML files created for the Update Site are required to be saved with UTF-8 encoding. Additionally, the manifest.mf
file in a plug-in JAR file is also saved with UTF-8 encoding. All files are created with the correct encoding if you use the IDL Plugin Wizard. If you generate or modify files by hand, be sure to save the files with UTF-8 encoding.
- back to top -
Using the Plug-in Wizard
To start the Plugin Wizard, select a project folder in the Project Explorer and either select Project ? Create Plugin Update Site or right-click and select Create Plugin Update Site from the context menu.
After you enter values in the dialog fields and click Finish, the wizard uses the contents of the selected project (and any other linked projects) and takes the following actions:
- For every project, it creates a plug-in JAR file
- Creates a feature JAR file that describes the plug-in(s)
- Inside the directory specified by the Output Location field, it creates the <plug-in_id>_updatesite directory
- Creates the
features
and plug-ins
directories inside of the <plug-in_id>_updatesite directory
- Writes the constructed plug-in and feature JAR files to the
plug-ins
and features
directories
- Creates a
site.xml
file in the <plug-in_id>_updatesite directory
Dialog Options
The following table describes the Plugin Wizard dialog options.
Table 14-5: Plugin Wizard Options
Dialog Option
|
Description
|
ID
|
The ID value is used as the feature ID and the plug-in Bundle-SymbolicName keyword listed in the manifest.mf file.
The ID value is restricted to period-separated segments. Each segment must contain at least one valid character. Valid characters include upper and lower case alphabetical characters (A-Z and a-z), numerical digits (0-9), and the underscore ("_") character.
The default value is the project name converted to lowercase, with spaces replaced by periods.
|
Name
|
The Name value is used as both the feature name as well as the plug-in Bundle-Name keyword listed in the manifest.mf file.
The default value is the the project name.
|
Version
|
The Version value is used as the feature version and the plug-in Bundle-Version keyword listed in the manifest.mf file.
The plug-in version value consists of one to four period-separated segments.
The first three segments must consist of non-negative integers. The fourth segment may contain only upper and lower case alphabetical characters (A-Z and a-z), numeric digits (0-9), the underscore ("_") character, and the dash ("-") character.
The default value is the string "1.0.0".
|
Provider
|
The author of the plug-in and feature.
|
Site Name
|
The name of the Update Site on which the plug-in will be hosted.
|
Site URL
|
The URL of the Update Site on which the plug-in will be hosted. IDL does not check the validity of this address.
|
Description
|
This is the feature description.
You must enter a non-null string (that is, this field may not be left empty). You can enter a maximum of 2048 characters.
If you import text into this field using the Import Text File button, only the first 2048 characters of the file will be imported.
If you need to reference a larger body of text, use this field to refer the user to more complete documentation, such as a web site or a file included in the plug-in.
|
Copyright
|
This is the plug-in copyright description.
You must enter a non-null string (that is, this field may not be left empty). You can enter a maximum of 2048 characters.
If you import text into this field using the Import Text File button, only the first 2048 characters of the file will be imported.
If you need to reference a larger body of text, use this field to refer the user to more complete documentation, such as a web site or a file included in the plug-in.
|
License Agreement
|
This is the plug-in license description.
You must enter a non-null string (that is, this field may not be left empty). You can enter a maximum of 2048 characters.
If you import text into this field using the Import Text File button, only the first 2048 characters of the file will be imported.
If you need to reference a larger body of text, use this field to refer the user to more complete documentation, such as a web site or a file included in the plug-in.
|
Import Text File
|
This button allows you to import text for the Description, Copyright, or License Agreement fields directly from a file.
To import file text into one of these fields, click one of the tabs and click the Import Text File button. You can select a file from the browse dialog.
When you select a file, it is read as a text file and the text is placed in the current tab (Description, Copyright, or License Agreement). If a non-text file is selected, the text in the current tab is deleted.
|
Output Location
|
This must be a valid directory (one that currently exists).
|
Controlling Properties from the Plugin Wizard and Property Page
The IDL Plugin Properties page is almost identical to the IDL Plugin Wizard dialog, and in fact the two are closely associated. If you specify a project's plug-in properties on this page, the IDL Plugin Wizard will use those property values. Conversely, if you specify a project's plug-in properties on the wizard, the values are saved when the wizard is executed, and will be displayed on the IDL Plugin Properties page.
Including External Code in your Plug-in
By default, the Plugin Wizard packages all of a project's files into the resulting plug-in. You can also include external files in a plug-in by linking to the files inside the project. When the Plugin Wizard is run, these linked files will be added to the plug-in.
Linking to external files in a project has several advantages:
- The latest version of the linked file is always used to build the plug-in
- You do not have to keep all of the code for a plug-in in one place
- You do not have to manually move files around
Distributing DLMs inside a Plug-in
You can include DLMs (Dynamically Loadable Modules) inside of a plug-in. Refer to
Packaging and Installing DLMs for more information.
Distributing IDL Workbench Actions inside a Plug-in
When you create a custom IDL Workbench action, you can distribute it to other users inside a plug-in. A custom action can be exported from the Workbench as a .vexp
(Visualization Export) file, which can be installed by another IDL installation.
If you create a plug-in with the Plugin Wizard that includes a .vexp
file, the wizard will automatically include the extra installer code inside of the plug-in.
For more information on importing and exporting actions, see Sharing Tools and Actions.
Upgrading Features
IDL allows you to install multiple versions of a feature or plug-in, which are normally installed in the /idlde/features
and /idlde/plugins
directories.
Note
You must have write permission on the /idlde/plugins
directory in order to install IDL plug-ins in that location.
You can also install features and plug-ins to different directories, as long as you add the directories to the IDL path. Due to restrictions imposed by the Eclipse update mechanism, whenever a newer version of a plug-in is installed, it must be installed in the same directory as the previous version of that plug-in.
However, due to the way in which IDL builds its path cache, it is possible that when loading the code within a plug-in, IDL may not use the latest version. To avoid this potential problem, whenever a new version of a plug-in is installed in the Workbench, all previous versions of that plug-in are converted from directory structures into ZIP files bearing the same name as the plug-in directory. This process hides the contents of the old plug-ins (IDL source code and SAVE files) from IDL, ensuring that only the latest version of a plug-in is used.
Removing Previously-installed Features
If you install a new version of a previously-installed feature, the Update Manager does not give you the option to automatically uninstall the older version. While it is not necessary to remove older versions of a feature, you can use the following procedure to uninstall a feature from the IDL Workbench.
- In the IDL Workbench, select Help >Software Updates >Manage Configuration.
The Product Configuration dialog appears.
- In the browser on the left side of the dialog, drill down and select the feature you want to uninstall.
- Right-click on the feature, and from the context menu select Uninstall.
- Click OK to disable and uninstall the feature.
- Click Yes to restart the IDL Workbench and complete the uninstallation.
- back to top -
Establishing an Update Site
The IDL Plugin Wizard creates an Update Site to host the plug-ins and features it generates. This collection of files in a set directory structure is written to a local directory, along with the generated plug-in(s) and feature, by the Plugin Wizard. This local Update Site is complete, and its feature is ready to be imported or downloaded by an IDL Update Manager.
You can also establish a remote Update Site that is accessable by other IDL users over the Internet. To create a remote Update Site, you must host the Update Site files on a web server in order to make the site directories web-accessible. In addition, you must assign your site a valid URL.
- back to top -
Downloading Features from an Update Site
Use the following procedure to select an Update Site and download a feature through the IDL Workbench Manager.
- In the IDL Workbench, select Help >Software Updates >Find and Install.
The Install/Update dialog appears.
- Select the Search for new features to install radio button, and click Next.
The Install dialog appears.

- Click New Local Site.
- Browse for the directory of a previous Update Site you created, and click OK.
The Edit Local Site dialog appears.
- You can enter a different name for your Update Site, if you wish. Click OK.
The Update Site is added to the list on the Install dialog.
- Select the site that you just added, and click Finish.
The Updates dialog appears.

- Starting at the level of your Update Site, drill down and select a feature.
- Click Next.
The Install dialog appears.
- Select the I accept the terms in the license agreement radio button, and click Next.
- The feature will be downloaded to the appropriate IDL directory by default, but you can change the installation directory by clicking Change Location. Click Finish.
The Verification dialog displays.
- Click Install.
- In general, it is safest to restart IDL after installing a new feature. Click Yes to restart IDL.
When IDL restarts, the IDL code in the feature is ready for execution.
- back to top -