Significant improvements have been made to the presets facility for the 2.0 release. A new type of preset, referred to as a dynamic preset, is now available. A dynamic preset uses an extender-supplied factory to synthesize the preset definition on the fly based on the context in which it will be used. The "old-style" declarative presets are still available and are now referred to as static presets. Static presets have also been improved to allow them to extend other presets. A static preset can even extend a dynamic preset.
There is also a new preset that's part of the framework. It's a dynamic preset with id of "default.configuration" and whose contents are synthesized as follows:
New Extension Point
<extension point="org.eclipse.wst.common.project.facet.core.presets">
<static-preset id="{string}" extends="{string}">
<label>{string}</label> (optional)
<description>{string}</description> (optional)
<facet id="{string}" version="{string}"/> (1 or more)
</static-preset> (0 or more)
<dynamic-preset id="{string}">
<factory class="{class:org.eclipse.wst.common.project.facet.core.IPresetFactory}"/>
</dynamic-preset> (0 or more)
<extension>
|
Deprecated Extension Point
<extension point="org.eclipse.wst.common.project.facet.core.facets">
<preset id="{string}">
<label>{string}</label> (optional)
<description>{string}</description> (optional)
<facet id="{string}" version="{string}"/> (1 or more)
</preset> (0 or more)
<extension>
|
Java API Additions
interface org.eclipse.wst.common.project.facet.core.IPreset
{
enum Type { STATIC, DYNAMIC, USER_DEFINED }
Type getType();
}
interface org.eclipse.wst.common.project.facet.core.IDynamicPreset extends IPreset
{
static final String CONTEXT_KEY_FIXED_FACETS;
static final String CONTEXT_KEY_PRIMARY_RUNTIME;
IPreset resolve( Map
|
Deprecated Java API
interface org.eclipse.wst.common.project.facet.core.IPreset
{
boolean isUserDefined()
}
|