What's New for 2.0?

This document describes the API changes that have been made in the Faceted Project Framework for WTP 2.0 release. Both Java API and extension point changes are covered. Note that the Faceted Project Framework API remains provisional for the 2.0 release. This means it will continue undergoing further significant changes in future release(s).

  1. IProjectFacetVersion and IRuntimeComponentVersion Extend Comparable
  2. Requires Constraint Supports Groups
  3. Labels and Descriptions for Groups
  4. New IFacetedProject Validation API
  5. AddRemoveFacetsWizard Class Renamed to ModifyFacetedProjectWizard

1. IProjectFacetVersion and IRuntimeComponentVersion Extend Comparable

The IProjectFacetVersion and IRuntimeComponentVersion interfaces now extend Comparable. Using the compareTo methods will yield significantly better performance than calling the version comparator directly on the version strings as the compareTo methods use pre-computed results and do not need to parse the version strings.

As part of this change, IVersionExpr.evaluate( String ) method has been replaced with IVersionExpr.check( Comparable ) method.

2. Requires Constraint Supports Groups

The requires constraint can now be declared using facet groups instead of individual facets. Any member of the group will satisfy the constraint. This allows a level of indirection so that a facet does not need to know about all of the group members.

Extension Point Changes

 
<extension point="org.eclipse.wst.common.project.facet.core.facets">
  <project-facet-version>
    <constraint>
      <requires group="group.id"/>
    </constraint>
  </project-facet-version>
<extension>

3. Labels and Descriptions for Groups

It is now possible to associate labels and description with groups. Note that groups are still automatically created on first use, so the use of the new group element is only necessary in order to specify the label and the description.

Extension Points Changes

 
<extension point="org.eclipse.wst.common.project.facet.core.facets">
  <group id="..."> (0 or more)
    <label>...</label>
    <description>...</description> (0 or 1)
  </group>
<extension>

Java API Changes

 
org.eclipse.wst.common.project.facet.core.IGroup
{
   String getLabel();
   String getDescription();
}

4. New IFacetedProject Validation API

There is now API for validating the faceted project. It allows the caller to find out about any problems with the project without searching for problem markers created by the faceted project validation builder. The validation builder now uses the new API.

Java API Changes

 
org.eclipse.wst.common.project.facet.core.IFacetedProject
{
   IStatus validate( IProgressMonitor monitor );
}

5. AddRemoveFacetsWizard Class Renamed to ModifyFacetedProjectWizard

The AddRemoveFacetsWizard class has been renamed to ModifyFacetedProjectWizard to align with terminology change being made in the rest of the system. The old class is deprecated, but still supported (extends the new class).