| <?xml version="1.0" encoding="iso-8859-1"?> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- | |
| transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> | |
| <link rel="stylesheet" href="../style.css" charset="ISO-8859-1" type="text/css"/> | |
| <title>About eclipse feature</title> | |
| </head> | |
| <body> | |
| <h1> | |
| What is a feature? | |
| </h1> | |
| <p> | |
| A way to install new eclipse plug-ins is to manually unzip the corresponding zip file into | |
| the directory where eclipse is installed. Doing so is not convenient due to many reasons among | |
| which the fact that software are, most of the time, made up of several plug-ins. | |
| Installing a new software product will then require to install several plug-ins and | |
| this could become really not convenient if we would just update one of the plug-ins. | |
| </p> | |
| <p> | |
| That is why eclipse proposes a simple and efficient mechanism for installing and | |
| updating eclipse software product based on the concepts of <b>feature</b> and <b>update site</b>. | |
| </p> | |
| <p> | |
| A feature is a way of grouping and describing plug-ins that comprise a product. | |
| Grouping plug-ins into features and publishing them on to an update site allows the | |
| product to be installed and updated easily. | |
| </p> | |
| <p> | |
| By using the eclipse update manager, only specify the URL of the update site and eclipse will | |
| Automatically search for features available on this update site and you can choose what features to install. | |
| You can also use the update manager to search for updates of already existing features. | |
| </p> | |
| <h1> | |
| Creating a feature | |
| </h1> | |
| <p> | |
| So as to create a feature, just do the following: <br/> | |
| <ul> | |
| <li>Select File > New > Feature Project and fill in the requested information.</li> | |
| </ul> | |
| </p> | |
| <p> | |
| Eclipse will create a file named 'feature.xml' in the project folder. | |
| Double clicking on this file will open a user-friendly editor that will allow to control (add/remove plugins, ') the content of the feature. | |
| </p> | |
| <h1> | |
| Creating an update site | |
| </h1> | |
| <p> | |
| Once the feature created, it is now possible to create an update site by doing the following: <br/> | |
| <ul> | |
| <li> Select File > New > Other ;</li> | |
| <li> Then in the Plug-in Development folder select Update Site Project ;</li> | |
| <li> Then fill in all the requested information.</li> | |
| </ul> | |
| </p> | |
| <p> | |
| It is possible to generate a sample web page by ticking the check box 'generate a sample web page'. | |
| </p> | |
| <p> | |
| After that Eclipse would have created a file named 'site.xml'. | |
| Double clicking on this file will open a user friendly interface that will allow to control (add/remove/publish features, ') features. | |
| </p> | |
| <p> | |
| Building a feature generates one jar file per plug-in involved in this feature and puts the jars in the 'plug-ins' directory. The features are localized in the 'features' directory. | |
| Publishing a feature makes it available from the update site. <b>It should be pointed out that a feature cannot not be installable from the update manager until it is published</b>, even | |
| if it has been added to the update site and built. | |
| </p> | |
| <h1> | |
| Managing feature versioning | |
| </h1> | |
| <p> | |
| One interesting thing with features is that they can be versioned. Indeed, if you have a feature made up of three plug-ins, if you fix a bug or add some functionality on one or more of the plug-ins you can keep on the former feature and easily create a new one with the same name but a different version. | |
| And both can made be available through the update site. The question is how to do that? <br/> | |
| <ul> | |
| <li>Change the feature version by editing its 'feature.xml' file ;</li> | |
| <li>Remove the involved plug-ins from the feature ;</li> | |
| <li>Change the involved plug-ins version by editing their 'plugin.xml' file ;</li> | |
| <li>Save all the changed "plugin.xml" files ;</li> | |
| <li>Add the removed plug-ins (now they have a different version) ;</li> | |
| <li>Save the feature ;</li> | |
| <li>Edit the 'site.xml' file of the update site and click on 'Add' in the 'features' tab ;</li> | |
| <li>Select the required feature (the one with the same name than the former but with a different version) ;</li> | |
| <li>Build this feature ;</li> | |
| <li>Publish it to make it available through the update manager.</li> | |
| </ul> | |
| <br/> | |
| <u>note</u>: when removing add adding plugins, you can add or remove any plugin of your choice. | |
| </p> | |
| <h1> | |
| Using the update manager | |
| </h1> | |
| <p> | |
| To open the update manager only select Help > Software Updates > Find and Install'<br/> | |
| Then two possibilities are offered: <br/> | |
| <ul> | |
| <li><b>Search for updates of the currently installed features. It should be highlighted that this functionality will work only with features that specify an update URL</b>. To specify an update URL for your feature, only edit its 'feature.xml' and in the 'overview' tab, right click on 'Update URLs' (it is on the right) and select New > Update URL then type in the URL of the update site where you put the new feature (a feature is considered an update of another if it has the same name but a different version) ;</li> | |
| <li><b>Search for new features to install</b>. You can search on already existing update sites and if none click on 'Add Update Site' and type in its URL to add it. Then choose an update site and click next. You will be listed all the features available on that selected update site (excepted those already installed). You can then select which feature to install'.</li> | |
| </ul> | |
| </p> | |
| <p> | |
| For further information about features and update sites see the eclipse help and article: | |
| <a href="http://www.eclipse.org/articles/Article-Update/keeping-up-to-date.html"> | |
| http://www.eclipse.org/articles/Article-Update/keeping-up-to-date.html | |
| </a> | |
| </p> | |
| </body> | |
| </html> |