|
Faceted Project Framework Version 1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.common.project.facet.core.ProjectFacetsManager
public final class ProjectFacetsManager
This is the entry point to the project facet framework API. From here, you
can (among other things) list available project facets and create instances
of IFacetedProject
.
Method Summary | |
---|---|
static IStatus |
check(Set<IProjectFacetVersion> base,
Set<IFacetedProject.Action> actions)
Checks the validity of applying the specified set of actions to the specified set of base project facets. |
static IFacetedProject |
create(IProject project)
Creates a wrapper around an IProject that exposes API for
manipulating the set of project facets installed on a project. |
static IFacetedProject |
create(IProject project,
boolean convertIfNecessary,
IProgressMonitor monitor)
Creates a wrapper around an IProject that exposes API for
manipulating the set of project facets installed on a project. |
static IFacetedProject |
create(String name,
IPath location,
IProgressMonitor monitor)
Creates a new faceted project. |
static IPreset |
definePreset(String name,
Set<IProjectFacetVersion> facets)
Defines a new preset. |
static IPreset |
definePreset(String name,
String description,
Set<IProjectFacetVersion> facets)
Defines a new preset. |
static boolean |
deletePreset(IPreset preset)
Deletes a preset. |
static IActionDefinition |
getActionDefinition(String id)
Returns the project facet action definition corresponding to the specified action id. |
static Set<IActionDefinition> |
getActionDefinitions()
Returns all of the available project facet action definitions. |
static Set<ICategory> |
getCategories()
Returns all of the categories. |
static ICategory |
getCategory(String id)
Returns the category corresponding to the specified id. |
static Set<IFacetedProject> |
getFacetedProjects()
|
static Set<IFacetedProject> |
getFacetedProjects(IProjectFacet f)
|
static Set<IFacetedProject> |
getFacetedProjects(IProjectFacetVersion fv)
|
static IGroup |
getGroup(String id)
Returns the group corresponding to the specified id. |
static Set<IGroup> |
getGroups()
Returns all of the groups. |
static IPreset |
getPreset(String id)
Returns the preset corresponding to the specified id. |
static Set<IPreset> |
getPresets()
Returns all of the presets. |
static IProjectFacet |
getProjectFacet(String id)
Returns the project facet descriptor corresponding to the specified id. |
static Set<IProjectFacet> |
getProjectFacets()
Returns all of the available project facets. |
static IFacetedProjectTemplate |
getTemplate(String id)
Returns the faceted project template corresponding to the specified id. |
static Set<IFacetedProjectTemplate> |
getTemplates()
Returns all of the faceted project templates. |
static boolean |
isActionDefined(String id)
Determines whether a given project facet action id is recognized. |
static boolean |
isCategoryDefined(String id)
Determines whether a given category id is recognized. |
static boolean |
isGroupDefined(String id)
Determines whether a given group id is recognized. |
static boolean |
isPresetDefined(String id)
Determines whether a given preset id is recognized. |
static boolean |
isProjectFacetDefined(String id)
Determines whether a given project facet id is recognized. |
static boolean |
isTemplateDefined(String id)
Determines whether a given template id is recognized. |
static void |
sort(Set<IProjectFacetVersion> base,
List<IFacetedProject.Action> actions)
Sorts actions in the order that they should be applied to a project such that project facet constraints are not violated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Set<IProjectFacet> getProjectFacets()
public static boolean isProjectFacetDefined(String id)
id
- the id of the project facet
true
if the project facet id is recognized,
false
otherwisepublic static IProjectFacet getProjectFacet(String id)
id
- the id of the project facet
IllegalArgumentException
- if id is not foundpublic static Set<IActionDefinition> getActionDefinitions()
public static boolean isActionDefined(String id)
id
- the id of the project facet action
true
if the project facet action id is recognized,
false
otherwisepublic static IActionDefinition getActionDefinition(String id)
id
- the id of the project facet action
IllegalArgumentException
- if id is not foundpublic static Set<ICategory> getCategories()
public static boolean isCategoryDefined(String id)
id
- the id of the category
true
if the category id is recognized,
false
otherwisepublic static ICategory getCategory(String id)
id
- the id of the category
IllegalArgumentException
- if id is not foundpublic static Set<IPreset> getPresets()
public static boolean isPresetDefined(String id)
id
- the preset id
true
if the preset id is recognized,
false
otherwisepublic static IPreset getPreset(String id)
id
- the preset id
IllegalArgumentException
- if the preset is not foundpublic static IPreset definePreset(String name, Set<IProjectFacetVersion> facets)
name
- the name of the presetfacets
- the set of project facets that the preset should contain
public static IPreset definePreset(String name, String description, Set<IProjectFacetVersion> facets)
name
- the name of the presetdescription
- the description of the presetfacets
- the set of project facets that the preset should contain
public static boolean deletePreset(IPreset preset)
preset
- the preset
true
if the preset was deleted, or
false
if the preset was not found or was not user-definedpublic static Set<IFacetedProjectTemplate> getTemplates()
public static boolean isTemplateDefined(String id)
id
- the template id
true
if the template id is recognized,
false
otherwisepublic static IFacetedProjectTemplate getTemplate(String id)
id
- the template id
IllegalArgumentException
- if the template is not foundpublic static Set<IGroup> getGroups()
public static boolean isGroupDefined(String id)
id
- the group id
true
if the group id is recognized,
false
otherwisepublic static IGroup getGroup(String id)
id
- the group id
IllegalArgumentException
- if the group id is not foundpublic static Set<IFacetedProject> getFacetedProjects() throws CoreException
CoreException
public static Set<IFacetedProject> getFacetedProjects(IProjectFacet f) throws CoreException
CoreException
public static Set<IFacetedProject> getFacetedProjects(IProjectFacetVersion fv) throws CoreException
CoreException
public static IFacetedProject create(IProject project) throws CoreException
IProject
that exposes API for
manipulating the set of project facets installed on a project.
project
- an Eclipse project
IFacetedProject
, or null
CoreException
public static IFacetedProject create(IProject project, boolean convertIfNecessary, IProgressMonitor monitor) throws CoreException
Creates a wrapper around an IProject
that exposes API for
manipulating the set of project facets installed on a project. The
project will be made into a faceted project if necessary.
This method should not be called from the UI thread as it is long- running and may trigger resource change events. Although this framework is safe, there is no guarantee that other bundles are UI-safe and the risk of UI deadlock is high.
project
- an Eclipse projectconvertIfNecessary
- whether the project should be converted into a
faceted projectmonitor
- a progress monitor, or null if progress reporting and
cancellation are not desired
IFacetedProject
, or null
CoreException
public static IFacetedProject create(String name, IPath location, IProgressMonitor monitor) throws CoreException
Creates a new faceted project.
This method should not be called from the UI thread as it is long- running and may trigger resource change events. Although this framework is safe, there is no guarantee that other bundles are UI-safe and the risk of UI deadlock is high.
name
- project namelocation
- monitor
- a progress monitor, or null if progress reporting and
cancellation are not desired
IFacetedProject
CoreException
public static IStatus check(Set<IProjectFacetVersion> base, Set<IFacetedProject.Action> actions)
base
- the set of project facets that the actions will be applied toactions
- the set of actions to evaluate
IStatus.OK
if all of the
constraints were satisfied or otherwise a MultiStatus
composed of
individual status objects for each of the problemspublic static void sort(Set<IProjectFacetVersion> base, List<IFacetedProject.Action> actions)
base
- the set of project facets that the actions will be applied toactions
- the list of actions to sort; this list will be modified
|
Faceted Project Framework Version 1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |