Quick Instructions Using FeatureIDE

Based on material by Don Batory (link).

Here is an index to this document:


FeatureIDE installation in Eclipse Helios (3.6), Java 1.6

Follow these steps in order:

  1. Start Eclipse and go to "Help > Install New Software..."
  2. Add the following remote site: http://wwwiti.cs.uni-magdeburg.de/iti_db/research/featureide/deploy/
  3. Select the the features FeatureIDE, Feature Modeling, and the required FeatureIDE extensions.
  4. Continue with "Install..."

Creating a FeatureIDE Project

  1. Make sure that you have the FeatureIDE Perspective
  2. File->New->FeatureIDE Project
  3. Begin creating a feature model (which is stored in model.xml)

Editing a Feature Model and Comparing Changes (whether the SPL has new products, fewer products, the same products)

Creating Directories for Features

Creating Files in Feature Directories

  1. Right click features directory, New->FeatureIDE File, and make sure that you select the directory in which you are to place your file (which will be a .jak file, incidentally).  Right clicking on, say Base, will not necessarily place your newly created file in Base/!

Note: If you already have a set of .jak files in directories, let FeatureIDE create the directories as above.  Next, copy the contents of your existing directories (with the same name) into the directories created by FeatureIDE.  (You don't have to stop Eclipse to do this).  But you'll notice that Eclipse doesn't see these files until you do a File->Refresh.

  1. Create a configuration file: New->FeatureIDE->Configuration file.

Note that you can have any number of configuration files.  But only one will be the current (which you can designate).

Note in one of the bottom tabs, you'll see a Collaboration Diagram.  Read this diagram as a 2D array.  Row corresponds to a selected feature in your configuration, and a Column corresponds to a Class.   An entry indicates the number of fields and methods that that particular collaboration role adds.  Note also, there is no distinction between methods that refine and methods that are new.

Composing, Translating, and Compiling Code

Every time you update either your current configuration file or any file in a feature directory, features will be composed in SRC, translated to Java and then to .class files in the "default" package.  Note in this example, there are LOTS of errors (26 to be exact).  It can be much more.  The problem here is that the default order in which features are composed by FeatureIDE is exactly in the reverse order for AHEAD. (Hint: AHEAD's order is likely wrong and FeatureIDE got it right). You can see this problem if you select a .jak file that you know must be extended, and extensions are missing (in the video below, this is the Node.jak file). You need to reverse the order of the features (confirm by looking at the source of this configuration), and there should be an automatic rebuild once you save your FM.

Running Your Composed Program

Initially, FeatureIDE may not know what your Main class is.  You will need to manually select this class in the Package Explorer window, select Run As->Java Application.  Henceforth, you should be able to just use the Run button on the Eclipse Menu Bar.

Note: because of the way Eclipse works, there is no need for the unmixin tool.  Every time you update a file in a feature directory, the current configuration is built.

Comparing Two Distinct Feature Models

You have two different feature models that you want to compare.  Here's how you can do it:

  1. Prepare two FeatureIDE projects (A and B) that contain the feature models you want to compare. Either edit them using FeatureIDE or import them from GUIDSL format.
  2. Open the feature model of project A, switch to the tab “Source”, and copy the whole document.
  3. Open the feature model of project B, switch to the tab “Source”, and paste the clipboard.
  4. Switch back to the tab “Feature Diagram” in editor of project B and the feature model edit view will show the results.

This process should eventually be simplified.  A video is to follow.

Beware: I don't know if this really works.

Creating a FeatureIDE Project from AHEAD Source

Suppose you have an AHEAD source directory, and you want to create a corresponding FeatureIDE project.  Here are the steps:

  1. Create a new FeatureIDE Project

  2. Right-click model.xml, FeatureIDE->Import Model from GuiDsl format and select your .m file

  3. Doing so creates all the directories.

  4. Now go an copy your AHEAD feature directories into the features/ directory of your FeatureIDE project and do a File->Refresh