Eclipse icon

This documentation is associated with the plug-in project that provides branding for the associated feature. There is no code to discuss, but rather the support for building runtime systems using features that reference plug-ins as was covered in the Developing Features lecture. Build.properties files are used in the feature project and in the plug-in projects referenced by the feature, to control the runtime preparation and installation packaging support provided by the Plug-in Development Environment (PDE).

Installing and Running the Solution

The solution for this project is an installable feature. The feature definition references several of the plug-in solutions included on the CD-ROM. The installation and configuration options available using Update Manager, or by emulating the installation of an extension, are reviewed in this section. Full details on the process used to build these materials and the installation options that exist were discussed in the Feature Development and Deployment exercise.

Three major tasks will be described:

Importing plug-in source from an installed feature requires that you first complete one of the two feature installation options. If you want to use both options you have to undo the first before trying the second. Once you have the feature installed, you can import its associated plug-in source. The materials on the CD-ROM in these directories will be used during this process:

Installing a Feature as an Extension

You can add the feature that is packaged on the CD-ROM as part of your Eclipse installation. The install extends your existing install using a link file to point at a copy of the code on the CD-ROM. The link file can point to the code on the CD-ROM, or you can first copy the code to your system.

The process of using Update Manager to install a feature was detailed as Step 6. Install a new feature as an extension to an existing product as found in the Feature Development and Deployment exercise. You should use a new/empty workspace for this task. Once done, all workspaces that are started from the Eclipse installation you have customized will include this feature unless you remember the link file.

The short form of the process is:

  1. Begin with an Eclipse installation that you want to extend. Make sure Eclipse has not been started.
  2. In the Eclipse directory, add a new directory named links.

    In the links directory add a file named JSGuide.link to support this extension.
  3. Insert a reference to the runtime feature location in the file (careful, no trailing blanks). Given the CD-ROM directory structure image above, the text in the JSGuide.link file would be:
    path=J:/Solutions/Installable_Feature/Extension_Install_Directory.
    or
    path=J:\\Solutions\\Installable_Feature\\Extension_Install_Directory.
  4. Start Eclipse with a new workspace.

    If you use an old workspace you will be prompted to accept the configuration change.

    You may need to reset the perspective to see the additions to the menu tree. View actions should be visible immediately.
  5. You can ask Eclipse what is installed using the Help > About Eclipse Platform menu option to open the About dialog. From there select Feature Details, select the "The Java Developer's Guide to Eclipse" - CDROM Solution Set feature from the list, and then select Plug-in Details. This will list the subset of the solution plug-ins chosen for this build of the feature:


  6. The Install/Update perspective can be used to identify where features exist, by install location. If you want to see how this information is recorded in the workspace open the platform.cfg file (workspace/.metadata/.config/platform.cfg) and look for a site definition:
    site.0.url=file:J:/Solutions/Installable_Feature/Extension_Install_Directory/Eclipse
    site.0.stamp=41741001
    site.0.stamp.features=-1045368155798
    site.0.stamp.plugins=1044443188506
    site.0.updateable=true
    site.0.linkfile=E:/Eclipse-2.0.2/eclipse/links/JSGuide.link
    site.0.policy=USER-EXCLUDE

Feature Installation: Using Update Manager

You can use the update site that is packaged on the CD-ROM to install the feature solution as part of your Eclipse installation. The install extends your active workspace by installing the code on the CD-ROM to a new install site on your system. The link file can point to the code on the CD-ROM, or you can first copy the code to your system.

The process of using Update Manager to install a feature was detailed in Step 7. Add a feature to an existing product configuration from an update site as found in the Feature Development and Deployment exercise. You should use a new/empty workspace for this task.

The short form of the process is:

  1. Open the Install/Update perspective and use the Feature Updates view to open the Update Manager site found in this directory
    J:\Solutions\Installable_Feature\Update_Manager_Install_Site.

    There is only one feature to be installed. This is what it would look like if you created a Site Bookmark to the location:


  2. Select Install in the Preview view to have the feature installed. Use the wizard to accept the license and choose a new install location
    (for example, E:/JSGuide_Inst).

    The best option is to create a new install location using the install wizard, this makes it easy to remove the code from the base installation by just using a new workspace or deleting the current workspace (assuming it has no active source projects).

    Restart Eclipse when requested.
  3. You may need to reset the perspective to see the additions to the menu tree. View actions should be visible immediately.

    You can ask Eclipse what is installed using the Help > About Eclipse Platform menu option to open the About dialog. From here select Feature Details, select the "The Java Developer's Guide to Eclipse" - CD-ROM Solution Set feature from the list, and then select Plug-in Details. This will list the subset of the solution plug-ins chosen for this build of the feature:

  4. The Install/Update perspective can be used to identify where features exist, by install location. The platform.cfg file (workspace/.metadata/.config/platform.cfg) can be viewed to identify how the install location was configured as part of the workspace:
    site.0.url=file:E:/JSGuide_Inst/
    site.0.stamp=1043961617892
    site.0.stamp.features=-1044207632227
    site.0.stamp.plugins=-949412728
    site.0.updateable=true
    site.0.policy=USER-EXCLUDE

Importing Plug-in Source from an Installed Feature

There are many ways to add existing plug-in projects to your workspace. You can:

The first option is used in the instructions for setting up your workspace to support the plug-in development exercises. The second option requires a repository. The third is explained in Exploring (and Sometimes Correcting) the Eclipse Platform Code, which can be found in the Using the Plug-in Development Environment exercise. Regardless of the technique you have used to install the feature (link file or Update Manager), you can import one or more features as source projects.

Note: If you want to import the feature project, you need to use File > Import and choose the Existing Project into Workspace option. As long as the feature directory has a .project file, the import will let you select the feature directory.

© Copyright International Business Machines Corporation, 2003.
All rights reserved.