SOFA 2.0 Editor - GUI Repository Designer for Eclipse



SOFA 2.0 repository editor v. 1.3.0 released. Changes »


SOFA 2.0 repository editor v. 1.0.149 released.


Work on the plug-in is started. History »


Compiling and installation

User's manual

Usage scenarios

Developer's manual

UML diagrams

Java docs

Author MaViNes (c)


OSGI Framework

Eclipse plugin basics

RCP basics

SWT draw basics

jFace tips

SWT Linux/Windows differences

Author MaViNes (c)

<< Previous | Table of contents | Next >>

Chapter 5 Feature and site projects

In order to make possible plug-in installation via the updates manager it is required to develop two related projects for the main plug-in project. The Eclipse IDE requires the feature and site projects to be developed and exported to the installation state in order to make possible plug-in installation via the update manager. Some times it is enough to have just site project to install plug-in properly. But for the current project we need both site and feature project to be developed.

Feature project

Features are important because they are the unit of Eclipse configuration management, they support product branding, and they are part of how products build customized solutions on top of the Eclipse Platform. Using features you can:

  • Identify, based on feature branding, which provided the different functions that are available when you are working with an Eclipse-based product
  • Build on product branding capabilities to further customize Eclipse
  • Automate tasks in the plug-in development environment
  • Dynamically change the configuration for a given workspace by managing the enabled/disabled state of root features, or features included by another but defined as optional, using the Install/Update perspective
The current project uses only simple feature to make installation process user friendly. The feature project includes only two files - and the feature.xml. The feature.xml file is the most important because it is exported to the feature/ folder as a jar bundle and shows to the installer where and what plug-in to install.

The feature.xml file contains such information as short description of the plug-in usage, copyright information, license information, url for updates, list of required plug-ins for the plug-in in order to be installed, and information about installed plugin - its name, version, download-size, install-size, and id.

The eclipse IDE provides user friendly feature editor to put all this parameters in file. The editor is multi paged and all pages are grouped by appropriate categories. For example, all licensing, copyright and update information is on one page. The general information about the feature is on the firs (overview) page. There is also export wizard link there. When all editing is done, just click on this link to call export wizard and to export feature to the appropriate folder.

feature editor
Figure 4: feature editor

Site project

The site project is created just for one purpose - to create the site.xml file. This site should not be packed, it should be just created and edited according to the feature and the project settings. The site.xml file should be placed in the root of the update folder in order for the update manager to update plug-in correctly. The install ready folder structure should look like this:

Very often plugin and feature jars have the same name and version, they are just placed in different folders.

The site.xml is very simple and looks like this:

<?xml version="1.0" encoding="UTF-8"?>
   <feature url="features/org.objectweb.dsrg.sofa.repository.plugin_1.3.0.jar" 
	id="org.objectweb.dsrg.sofa.repository.plugin" version="1.3.0" patch="true">
      <category name="RSP"/>
   <category-def name="RSP" label="RSP"/>

It can be easily created manually without any project. The file contains reference to the feature location and the id and version of the plug-in to be installed. Special attention should be paid to the patch property here. If the first version of a plug-in is released, then the patch can be set to false (patch="false") in all other cases this value should be true.

<< Previous | Table of contents | Next >>

Learn More