Support free tutorials









vogella training Training Books



Eclipse Feature Projects - Tutorial

Lars Vogel

Version 2.3

12.08.2013

Eclipse Feature Project

This tutorial describes the purpose and usage of Eclipse feature projects and Fragments.


Table of Contents

1. What are feature projects and features?
2. Advantages of using features
3. Creating a feature
4. Support this website
4.1. Thank you
4.2. Questions and Discussion
5. Links and Literature
5.1. Eclipse resources
5.2. vogella Resources

Get the book Eclipse RCP book

1. What are feature projects and features?

An Eclipse feature project contains features. A feature describes a list of plug-ins and other features which can be understood as a logical unit. It also has a name, version number and license information assigned to it.

A feature is described via a feature.xml file. For example the file might look like the following in a text editor.

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="de.vogella.featuretest.feature"
      label="Feature"
      version="1.0.0.qualifier"
      provider-name="EXAMPLE">
      
   <description url="http://www.example.com/description">
      [Enter Feature Description here.]
   </description>

   <copyright url="http://www.example.com/copyright">
      [Enter Copyright Description here.]
   </copyright>

   <license url="http://www.example.com/license">
      [Enter License Description here.]
   </license>

   <plugin
         id="de.vogella.featuretest.testplugin"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature> 

2. Advantages of using features

The grouping of plug-ins into logical units makes it easier to handle a set of plug-ins. Instead of adding a large number of individual plug-ins to your product configuration file you can group them using features. That increases the visibility of your application structure.

Features can be used by the Eclipse update manager, the build process and optionally for the definition of Eclipse products. Features can also be used as the basis for a launch configuration.

Eclipse provides several predefined features, e.g. the org.eclipse.e4.rcp for Eclipse 4 based RCP applications.

3. Creating a feature

You can create a new feature project via the following menu path: File NewOther...Plug-in Development Feature Project.

If you open the feature.xml file you can change the feature properties via a special editor.

The Information tab allows you to enter a description and copyright related information for this feature.

The Plug-ins tab allows you to change the included plug-ins in the feature. The Included Features tab allows you to include other features into this feature. Via the Dependencies tab you can define other features which must be present to use this feature.

The Build tab is used for the build process and should include the feature.xml file. The last two tabs give access to the configuration files in text format.

4. Support this website

This tutorial is Open Content under the CC BY-NC-SA 3.0 DE license. Source code in this tutorial is distributed under the Eclipse Public License. See the vogella License page for details on the terms of reuse.

Writing and updating these tutorials is a lot of work. If this free community service was helpful, you can support the cause by giving a tip as well as reporting typos and factual errors.

4.1. Thank you

Please consider a contribution if this article helped you. It will help to maintain our content and our Open Source activities.

4.2. Questions and Discussion

If you find errors in this tutorial, please notify me (see the top of the page). Please note that due to the high volume of feedback I receive, I cannot answer questions to your implementation. Ensure you have read the vogella FAQ as I don't respond to questions already answered there.

5. Links and Literature

5.1. Eclipse resources

The Eclipse p2 update wiki

5.2. vogella Resources

vogella Training Android and Eclipse Training from the vogella team

Android Tutorial Introduction to Android Programming

GWT Tutorial Program in Java, compile to JavaScript and HTML

Eclipse RCP Tutorial Create native applications in Java

JUnit Tutorial Test your application

Git Tutorial Put all your files in a distributed version control system