What's New for 3.1?

This document describes the API changes that have been made in the Faceted Project Framework for the WTP 3.1 release. Both Java API and extension point changes are covered.

  1. FacetedProjectFrameworkException
  2. Batching Validate Edit Calls
  3. Improvements to BasicFacetedProjectWizard
  4. Managing Project Facet Preferences

1. FacetedProjectFrameworkException

A framework-specific subclass of CoreException has been introduced in order to allow IDelegate implementations a way to signal that an exception is expected. An example of an expected exception is when a user declines to make a necessary file writable. Marking an exception as expected can be used as a signal by handlers to alter the way the exception is presented to the user (perhaps not displaying the stack trace and/or not logging it).

Java API Additions

 
interface FacetedProjectFrameworkException extends CoreException
{
    FacetedProjectFrameworkException( IStatus status );
    boolean isExpected();
    void setExcpeted( boolean expected );
}

2. Batching Validate Edit Calls

It is often desirable to batch IWorkspace.validateEdit() calls in order to reduce the number of prompts to the user. An API has been added to allow a facet action to specify the files that it intends to operate on. The framework will make a batched call to validateEdit prior to running any of the actions.

Java API Additions

 
abstract class ActionConfig
{    
    Set getValidateEditFiles();
}

3. Improvements to BasicFacetedProjectWizard

The generic New Faceted Project wizard now allows the project to be added to working sets via UI on the first page.

Java API Additions

 
class BasicFacetedProjectWizard
{    
    IWorkbench getWorkbench();
    IStructuredSelection getSelection();
}

class BasicFacetedProjectWizardFirstPage extends WizardNewProjectCreationPage
{    
}

4. Managing Project Facet Preferences

New facility for managing preferences associated with facets has been introduced. More information can be found in FAQ.

Java API Additions

 
class FacetedProjectFramework
{
    Preferences getPreferences( IProjectFacet facet );
}

interface IFacetedProject
{
    Preferences getPreferences( IProjectFacet facet );
}