|
Faceted Project Framework Version 1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFacetedProject
This interface is used for manipulating the set of facets installed on a
project. Use ProjectFacetsManager.create(IProject)
to get an instance
of this interface.
Nested Class Summary | |
---|---|
static class |
IFacetedProject.Action
Represents a single action such as installing or uninstalling a project facet. |
Field Summary |
---|
Fields inherited from interface org.eclipse.wst.common.project.facet.core.IFacetedProjectBase |
---|
PROBLEM_OTHER, PROBLEM_PROJECT_NAME |
Method Summary | |
---|---|
void |
addListener(IFacetedProjectListener listener)
Deprecated. |
void |
addTargetedRuntime(IRuntime runtime,
IProgressMonitor monitor)
Adds a new runtime to the set of runtimes targeted by this project. |
IMarker |
createErrorMarker(String message)
|
IMarker |
createErrorMarker(String type,
String message)
|
IMarker |
createWarningMarker(String message)
|
IMarker |
createWarningMarker(String type,
String message)
|
IFacetedProjectWorkingCopy |
createWorkingCopy()
|
IProjectFacetVersion |
getInstalledVersion(IProjectFacet f)
|
IRuntime |
getRuntime()
Deprecated. use getTargetRuntimes() and getPrimaryRuntime() instead |
void |
installProjectFacet(IProjectFacetVersion fv,
Object config,
IProgressMonitor monitor)
Installs a project facet on this project. |
void |
modify(Set<IFacetedProject.Action> actions,
IProgressMonitor monitor)
Modifies the set of project facets installed on this project by performing a series of actions such as install and uninstall. |
void |
removeListener(IFacetedProjectListener listener)
Deprecated. |
void |
removeTargetedRuntime(IRuntime runtime,
IProgressMonitor monitor)
Removes a runtime from the set of runtimes targeted by this project. |
void |
setFixedProjectFacets(Set<IProjectFacet> facets)
Sets the set of fixed project facets for this project. |
void |
setPrimaryRuntime(IRuntime runtime,
IProgressMonitor monitor)
Sets the primary target runtime for this project. |
void |
setRuntime(IRuntime runtime,
IProgressMonitor monitor)
Deprecated. use setTargetRuntimes() and setPrimaryRuntime() instead |
void |
setTargetedRuntimes(Set<IRuntime> runtimes,
IProgressMonitor monitor)
Sets the runtimes that this project will target. |
void |
uninstallProjectFacet(IProjectFacetVersion fv,
Object config,
IProgressMonitor monitor)
Uninstalls a project facet from this project. |
Methods inherited from interface org.eclipse.wst.common.project.facet.core.IFacetedProjectBase |
---|
addListener, getFixedProjectFacets, getPrimaryRuntime, getProject, getProjectFacets, getProjectFacetVersion, getTargetedRuntimes, hasProjectFacet, hasProjectFacet, isFixedProjectFacet, isTargetable, isTargeted, removeListener, validate, validate |
Method Detail |
---|
IProjectFacetVersion getInstalledVersion(IProjectFacet f)
void installProjectFacet(IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException
Installs a project facet on this project. This method is equivalent to
calling the modify(Set, IProgressMonitor)
method with a single
install action.
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.
fv
- the descriptor of the project facet version that should be
installedconfig
- the associated configuration object, or null
monitor
- a progress monitor, or null if progress reporting and
cancellation are not desired
CoreException
- if anything goes wrong during installvoid uninstallProjectFacet(IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException
Uninstalls a project facet from this project. This method is
equivalent to calling the modify(Set, IProgressMonitor)
method
with a single uninstall action.
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.
fv
- the descriptor of the project facet version that should be
uninstalledconfig
- the associated configuration object, or null
monitor
- a progress monitor, or null if progress reporting and
cancellation are not desired
CoreException
- if anything goes wrong during uninstallvoid modify(Set<IFacetedProject.Action> actions, IProgressMonitor monitor) throws CoreException
Modifies the set of project facets installed on this project by performing a series of actions such as install and uninstall.
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.
actions
- the set of actions to apply to the projectmonitor
- a progress monitor, or null if progress reporting and
cancellation are not desired
CoreException
- if anything goes wrong while applying actionsvoid setFixedProjectFacets(Set<IProjectFacet> facets) throws CoreException
facets
- the set of project facets to mark as fixed
CoreException
- if failed while updating the set of fixed project
facetsIRuntime getRuntime()
void setRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException
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.
monitor
- a progress monitor, or null if progress reporting and
cancellation are not desired
CoreException
void setTargetedRuntimes(Set<IRuntime> runtimes, IProgressMonitor monitor) throws CoreException
Sets the runtimes that this project will target. When a project targets a runtime, the set of facets that can be installed is limited to those supported by that runtime. When a project targets multiple runtimes, the set of applicable facets is limited to those supported by all targeted runtimes.
If the existing primary runtime is null
or is not part of
the new set of targeted runtimes, the primary runtime will be reset to
one picked at random from the new set. If the new set is empty, the
primary runtime will be set to null
.
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.
runtimes
- the new set of runtimes to targetmonitor
- a progress monitor, or null
if progress
reporting and cancelation are not desired
CoreException
- if the project contains one or more facets that
are not supported by all of the new runtimes; if failed for any other
reasonvoid addTargetedRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException
Adds a new runtime to the set of runtimes targeted by this project. If the set of targeted runtimes has been empty prior to this call, this runtime will become the primary runtime
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.
runtime
- the runtimemonitor
- a progress monitor, or null
if progress
reporting and cancelation are not desired
CoreException
- if the project contains one or more facets that
are not supported by this runtime; if failed for any other reasonvoid removeTargetedRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException
Removes a runtime from the set of runtimes targeted by this project.
If this runtime has been the primary runtime prior to this call, a new
primary will be automatically assigned (unless the list of target
runtimes becomes empty, in which case the primary runtime will be set
to null
).
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.
runtime
- the runtime to removemonitor
- a progress monitor, or null
if progress
reporting and cancelation are not desired
CoreException
- if failed for any reasonvoid setPrimaryRuntime(IRuntime runtime, IProgressMonitor monitor) throws CoreException
Sets the primary target runtime for this project. The new primary has to be one of the runtimes currently targeted by the 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.
runtime
- the new primary runtimemonitor
- a progress monitor, or null
if progress
reporting and cancelation are not desired
CoreException
- if the primary runtime is not one of the runtimes
currently targeted by the project; if failed for any other reasonIFacetedProjectWorkingCopy createWorkingCopy()
IMarker createErrorMarker(String message) throws CoreException
CoreException
IMarker createErrorMarker(String type, String message) throws CoreException
CoreException
IMarker createWarningMarker(String message) throws CoreException
CoreException
IMarker createWarningMarker(String type, String message) throws CoreException
CoreException
void addListener(IFacetedProjectListener listener)
void removeListener(IFacetedProjectListener listener)
|
Faceted Project Framework Version 1.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |