public interface IBundleProjectDescription
IProject
via IBundleProjectService.getDescription(IProject)
.Modifier and Type | Field and Description |
---|---|
static String |
PLUGIN_NATURE
Constant for the PDE Plug-in project nature, value is
"org.eclipse.pde.PluginNature" . |
static String |
VERSION_3_0
Identifies bundles developed for Eclipse 3.0, value is
"3.0" . |
static String |
VERSION_3_1
Identifies bundles developed for Eclipse 3.1, value is
"3.1" . |
static String |
VERSION_3_2
Identifies bundles developed for Eclipse 3.2, value is
"3.2" . |
static String |
VERSION_3_3
Identifies bundles developed for Eclipse 3.3, value is
"3.3" . |
static String |
VERSION_3_4
Identifies bundles developed for Eclipse 3.4, value is
"3.4" . |
static String |
VERSION_3_5
Identifies bundles developed for Eclipse 3.5, value is
"3.5" . |
static String |
VERSION_3_6
Identifies bundles developed for Eclipse 3.6, value is
"3.6" . |
static String |
VERSION_3_7
Identifies bundles developed for Eclipse 3.7, value is
"3.7" . |
static String |
VERSION_3_8
Identifies bundles developed for Eclipse 3.8, value is
"3.8" . |
Modifier and Type | Method and Description |
---|---|
void |
apply(IProgressMonitor monitor)
Creates or modifies a bundle project and associated artifacts based current settings.
|
String |
getActivationPolicy()
Returns this bundle's activation policy or
null if unspecified. |
String |
getActivator()
Returns the value of the Bundle-Activator header for the described bundle,
or
null if none. |
IPath[] |
getBinIncludes()
Returns the file and folder entries to be included on the
bin.includes entry
of the build.properties file of the described bundle project. |
IBundleClasspathEntry[] |
getBundleClasspath()
Returns the entries on the Bundle-Classpath header of the described bundle,
or
null if unspecified. |
String |
getBundleName()
Returns the value of the Bundle-Name header for the described bundle
or
null if unspecified. |
IPath |
getBundleRoot()
Returns the location within the project that is the root of the bundle related
artifacts, or
null to indicate the default location (project folder). |
String |
getBundleVendor()
Returns the value of the Bundle-Vendor header for the described bundle
or
null if unspecified. |
Version |
getBundleVersion()
Returns the value of the Bundle-Version header for the described bundle.
|
IPath |
getDefaultOutputFolder()
Returns a project relative path for the described bundle's default output folder used on the Java build path,
or
null to indicate the default output location is used. |
String[] |
getExecutionEnvironments()
Returns the required execution environments for the described bundle, or
null if unspecified. |
String |
getExportWizardId()
Returns the identifier of the
org.eclipse.ui.exportWizards extension
used in the manifest editor for exporting the project associated with these
settings, or null if the default export wizard should be used. |
String |
getHeader(String header)
Returns the value of the specified header from the bundle manifest, or
null
if unspecified. |
IHostDescription |
getHost()
Returns the host bundle for the described fragment,
or
null if this description does not describe a fragment. |
String[] |
getLaunchShortcuts()
Returns identifiers of
org.eclipse.debug.ui.launchShortcuts
referenced by org.eclipse.pde.ui.launchShortcuts extensions
that will be displayed in the manifest editor for the project associated
with these settings, or null if default shortcuts are being
used. |
IPath |
getLocalization()
Returns the value of the Bundle-Localization header for the described bundle
or
null if unspecified. |
URI |
getLocationURI()
Returns the location URI for the described project.
|
String[] |
getNatureIds()
Returns the list of natures associated with the described project.
|
IPackageExportDescription[] |
getPackageExports()
Returns the value of the Export-Package header or
null if unspecified. |
IPackageImportDescription[] |
getPackageImports()
Returns the value of the Import-Package header or
null if unspecified. |
IProject |
getProject()
Returns the project associated with the described bundle.
|
IRequiredBundleDescription[] |
getRequiredBundles()
Returns the value of the Require-Bundle header or
null if unspecified. |
String |
getSymbolicName()
Returns the symbolic name of the described bundle or
null if unspecified. |
String |
getTargetVersion()
Returns the version of Eclipse the described bundle is targeted for, or
null
if unspecified. |
boolean |
hasNature(String natureId)
Returns whether the project nature specified by the given
nature extension id has been added to the described project.
|
boolean |
isEquinox()
Returns whether the described bundle is targeted for the Equinox OSGi framework.
|
boolean |
isExtensionRegistry()
Returns whether this bundle supports extension points and extensions via
IExtensionRegistry support. |
boolean |
isSingleton()
Returns whether the described bundle is a singleton.
|
void |
setActivationPolicy(String policy)
Sets this bundle's activation policy.
|
void |
setActivator(String className)
Sets the value of the Bundle-Activator header for the described bundle,
or
null if none. |
void |
setBinIncludes(IPath[] paths)
Sets file and folder entries on the
bin.includes entry of
the build.properties file of the described bundle project. |
void |
setBundleClassath(IBundleClasspathEntry[] entries)
Deprecated.
|
void |
setBundleClasspath(IBundleClasspathEntry[] entries)
Sets the entries for the Bundle-Classpath header of the described bundle,
or
null if unspecified. |
void |
setBundleName(String name)
Sets the value of the Bundle-Name header for the described bundle.
|
void |
setBundleRoot(IPath path)
Sets the location within the project where the root of the bundle and its associated
artifacts will reside, or
null to indicate the default bundle root location
should be used (project folder). |
void |
setBundleVendor(String name)
Sets the value of the Bundle-Vendor header for the described bundle.
|
void |
setBundleVersion(Version version)
Sets the value of the Bundle-Version header for the described bundle.
|
void |
setDefaultOutputFolder(IPath output)
Sets a project relative path for the default output folder used on the Java build path
for the described bundle.
|
void |
setEquinox(boolean equinox)
Sets whether the described bundle is targeted for the Equinox OSGi framework.
|
void |
setExecutionEnvironments(String[] environments)
Sets the required execution environments for the described bundle, possible
null . |
void |
setExportWizardId(String id)
Sets the identifier of the
org.eclipse.ui.exportWizards extension
used in the manifest editor for exporting the project associated with these
settings, or null if the default export wizard should be used. |
void |
setExtensionRegistry(boolean supportExtensions)
Sets whether this bundle supports extension points and extensions via
IExtensionRegistry support. |
void |
setHeader(String header,
String value)
Sets the value of the specified header in the bundle manifest to the given value
or removes the header if the value is
null . |
void |
setHost(IHostDescription host)
Sets the the Fragment-Host header for the described fragment.
|
void |
setLaunchShortcuts(String[] ids)
Sets the identifiers of
org.eclipse.debug.ui.launchShortcuts
referenced by org.eclipse.pde.ui.launchShortcuts extensions
to be displayed in the manifest editor for the project associated with these settings,
or null to indicate default shortcuts should be used. |
void |
setLocalization(IPath path)
Sets the value of the Bundle-Localization header for the described bundle.
|
void |
setLocationURI(URI location)
Sets the location for the described project.
|
void |
setNatureIds(String[] natures)
Sets the list of natures associated with the described project.
|
void |
setPackageExports(IPackageExportDescription[] exports)
Sets the value of the Export-Package header for the described bundle.
|
void |
setPackageImports(IPackageImportDescription[] imports)
Sets the value of the Import-Package header for the described bundle.
|
void |
setRequiredBundles(IRequiredBundleDescription[] bundles)
Sets the value of the Require-Bundle header for the described bundle.
|
void |
setSingleton(boolean singleton)
Sets whether the described bundle is a singleton.
|
void |
setSymbolicName(String name)
Sets the symbolic name of the described bundle.
|
void |
setTargetVersion(String version)
Sets the version of Eclipse the described bundle is to targeted for.
|
static final String VERSION_3_0
"3.0"
.static final String VERSION_3_1
"3.1"
.static final String VERSION_3_2
"3.2"
.static final String VERSION_3_3
"3.3"
.static final String VERSION_3_4
"3.4"
.static final String VERSION_3_5
"3.5"
.static final String VERSION_3_6
"3.6"
.static final String VERSION_3_7
"3.7"
.static final String VERSION_3_8
"3.8"
.static final String PLUGIN_NATURE
"org.eclipse.pde.PluginNature"
.void apply(IProgressMonitor monitor) throws CoreException
monitor
- progress monitor or null
CoreException
- if project creation or modification failsvoid setSymbolicName(String name)
A symbolic name must be specified.
name
- bundle symbolic nameString getSymbolicName()
null
if unspecified.null
void setLocationURI(URI location)
null
is specified, the default location is used.
Setting the location on a description for a project which already exists has no effect; the new project location is ignored when the description is applied to the already existing project. This method is intended for use on descriptions for new projects.
This operation maps the root folder of the project to the exact location provided. For example, if the location for project named "P" is set to the URI file://c:/my_plugins/Project1, the file resource at workspace path /P/index.html would be stored in the local file system at file://c:/my_plugins/Project1/index.html.
location
- the location for the described project or null
getLocationURI()
,
IProjectDescription.setLocationURI(URI)
URI getLocationURI()
null
is
returned if the default location should be used.null
setLocationURI(URI)
void setBundleName(String name)
null
, the bundle name defaults to the bundle symbolic name.name
- bundle nameString getBundleName()
null
if unspecified.
For new projects, the bundle name defaults to the bundle symbolic name.
null
void setBundleVendor(String name)
name
- bundle vendor nameString getBundleVendor()
null
if unspecified.null
void setBundleVersion(Version version)
null
, the bundle version defaults to 1.0.0.qualifier
.version
- bundle versionVersion getBundleVersion()
For new projects, the bundle version is 1.0.0.qualifier
unless
otherwise specified.
null
if unspecifiedvoid setSingleton(boolean singleton)
singleton
- whether the described bundle is a singletonboolean isSingleton()
A bundle description for a new project is not a singleton, by default.
void setLocalization(IPath path)
path
- bundle root relative path or null
IPath getLocalization()
null
if unspecified.null
String[] getNatureIds()
setNatureIds(String[])
,
IProjectDescription.setNatureIds(String[])
void setNatureIds(String[] natures)
When creating a new project, plug-in and Java natures (PLUGIN_NATURE
and JavaCore.NATURE_ID
) will be added by default when unspecified.
natures
- the list of naturesgetNatureIds()
,
IProjectDescription.getNatureIds()
boolean hasNature(String natureId)
natureId
- the nature extension identifiertrue
if the described project has the given natureIProjectDescription.hasNature(String)
void setHost(IHostDescription host)
null
value is specified, this bundle description
describes a fragment.host
- host specification or null
IHostDescription getHost()
null
if this description does not describe a fragment.null
void setDefaultOutputFolder(IPath output)
null
indicates the Java project's default output
location should be used.output
- project relative path to default output location or null
IPath getDefaultOutputFolder()
null
to indicate the default output location is used.null
void setExecutionEnvironments(String[] environments)
null
.
When more than one environment specified, the first will be used to configure compiler compliance
and build path settings.environments
- execution environment identifiers or null
String[] getExecutionEnvironments()
null
if unspecified.
When more than one environment is specified, the first will be used to configure compiler compliance
and build path settings.null
@Deprecated void setBundleClassath(IBundleClasspathEntry[] entries)
setBundleClasspath(IBundleClasspathEntry[])
null
if unspecified. Specifies the relationship between
source and/or binary folders with bundle classpath entries. When null
is specified, no Bundle-Classpath header will be produced.entries
- Bundle-Classpath header entries or null
void setBundleClasspath(IBundleClasspathEntry[] entries)
null
if unspecified. Specifies the relationship between
source and/or binary folders with bundle classpath entries. When null
is specified, no Bundle-Classpath header will be produced.entries
- Bundle-Classpath header entries or null
IBundleClasspathEntry[] getBundleClasspath()
null
if unspecified.null
if unspecifiedsetBundleClasspath(IBundleClasspathEntry[])
void setActivator(String className)
null
if none.className
- activator class name or null
String getActivator()
null
if none.null
void setTargetVersion(String version)
isEquinox()
is false
.
When isEquinox()
is true
, and a target version
is unspecified or set to null
, the newest available
target version of Eclipse is used.version
- one of the version constant values defined by this class or null
setEquinox(boolean)
String getTargetVersion()
null
if unspecified. When unspecified, the project is targeted to the newest available
version of Eclipse when isEquinox()
is true
.null
void setEquinox(boolean equinox)
An Equniox specific lazy-start header will be generated in the associated manifest
when true
based on the target version and activation policy. For new projects
the value is false
, by default.
This following headers are affected when true
, based on the getTargetVersion()
and getActivationPolicy()
. The headers are removed when getActivationPolicy()
is
unspecified (null
).
Eclipse-AutoStart
is set to true
when the target version is 3.1
and getActivationPolicy()
is Constants.ACTIVATION_LAZY
Eclipse-LazyStart
is set to true
when the target version is 3.2 or 3.3
and getActivationPolicy()
is Constants.ACTIVATION_LAZY
Bundle-ActivationPolicy
is set to lazy
when the target version is 3.4 or
greater and getActivationPolicy()
is Constants.ACTIVATION_LAZY
equinox
- whether targeted for the Equinox OSGi frameworkgetTargetVersion()
boolean isEquinox()
void setActivationPolicy(String policy)
Constants.ACTIVATION_LAZY
or null
(unspecified). Any other values are ignored (equivalent to
null
). When unspecified, a corresponding header is not generated. By default
the value is unspecified for newly created projects.
An Equniox specific lazy-start header will be generated in the associated manifest
based on the getTargetVersion()
and the specified policy. The headers are
removed when the policy is unspecified (null
).
Eclipse-AutoStart
is set to true
when the target version is 3.1
and policy is Constants.ACTIVATION_LAZY
Eclipse-LazyStart
is set to true
when the target version is 3.2 or 3.3
and policy is Constants.ACTIVATION_LAZY
Bundle-ActivationPolicy
is set to lazy
when the target version is 3.4 or
greater and policy is Constants.ACTIVATION_LAZY
policy
- activation policy or null
getTargetVersion()
String getActivationPolicy()
null
if unspecified.null
void setExtensionRegistry(boolean supportExtensions)
IExtensionRegistry
support. By default, this value is false
for new projects.supportExtensions
- whether extension points and extensions are supportedboolean isExtensionRegistry()
IExtensionRegistry
support. By default, this value is false
for new projects.void setRequiredBundles(IRequiredBundleDescription[] bundles)
bundles
- required bundle descriptions or null
if noneIRequiredBundleDescription[] getRequiredBundles()
null
if unspecified.null
void setPackageImports(IPackageImportDescription[] imports)
imports
- package import descriptions or null
if noneIPackageImportDescription[] getPackageImports()
null
if unspecified.null
void setPackageExports(IPackageExportDescription[] exports)
exports
- package export descriptions or null
if noneIPackageExportDescription[] getPackageExports()
null
if unspecified.null
IProject getProject()
void setBinIncludes(IPath[] paths)
bin.includes
entry of
the build.properties
file of the described bundle project.
By default, the MANIFEST/
folder and any entries on the
Bundle-Classpath will be included. This sets any additional entries that
are to be included.
paths
- bundle root relative paths of files and folders to include
or null
if noneIPath[] getBinIncludes()
bin.includes
entry
of the build.properties
file of the described bundle project.
By default, the MANIFEST/
folder and any entries on the
Bundle-Classpath will be included. This returns any additional entries that
are to be included.
bin.includes
entry or null
void setBundleRoot(IPath path)
null
to indicate the default bundle root location
should be used (project folder).
This has no effect on existing projects. This method is intended for use on descriptions
for new projects. To modify the bundle root of an existing project use
IBundleProjectService.setBundleRoot(IProject, IPath)
.
The bundle root is the folder containing the META-INF/
folder. When a project
does not yet exist, bundle files will be created relative to the bundle root. When a project
already exists and the bundle root location is modified, existing bundle artifacts at the old
root are not moved or modified. Instead, the modify operation will update any existing bundle
files at the new root location, or create them if not yet present.
path
- project relative path to bundle root artifacts in the project or null
IPath getBundleRoot()
null
to indicate the default location (project folder).null
String[] getLaunchShortcuts()
org.eclipse.debug.ui.launchShortcuts
referenced by org.eclipse.pde.ui.launchShortcuts
extensions
that will be displayed in the manifest editor for the project associated
with these settings, or null
if default shortcuts are being
used.org.eclipse.debug.ui.launchShortcuts
extensions
or null
void setLaunchShortcuts(String[] ids)
org.eclipse.debug.ui.launchShortcuts
referenced by org.eclipse.pde.ui.launchShortcuts
extensions
to be displayed in the manifest editor for the project associated with these settings,
or null
to indicate default shortcuts should be used.
When default shortcuts are used, all org.eclipse.pde.ui.launchShortcuts
extensions
are considered. When specific shortcuts are specified, the available shortcuts will be limited
to those specified.
Important: When specifying shortcuts, both org.eclipse.debug.ui.launchShortcuts
and
org.eclipse.pde.ui.launchShortcuts
must exist. Labels for shortcuts in the editor
are derived from the org.eclipse.pde.ui.launchShortcuts
.
ids
- identifiers of org.eclipse.debug.ui.launchShortcuts
extensions
or null
String getExportWizardId()
org.eclipse.ui.exportWizards
extension
used in the manifest editor for exporting the project associated with these
settings, or null
if the default export wizard should be used.org.eclipse.ui.exportWizards
extension
or null
void setExportWizardId(String id)
org.eclipse.ui.exportWizards
extension
used in the manifest editor for exporting the project associated with these
settings, or null
if the default export wizard should be used.id
- identifier of an org.eclipse.ui.exportWizards
extension
or null
void setHeader(String header, String value)
null
.
Using this method will override the value of a header generated by other methods
in this interface. For example, using the method setBundleName(String)
will
generate a value for the Bundle-Name
header, but calling setHeader(String, String)
for the Bundle-Name
header will override any value set via setBundleName(String)
.
This method is intended to be used to set the value of a header that does
not have explicit API.
To include an empty header value.trim().length()
must equal zero (i.e an empty string or a string of
whitespace).
header
- header namevalue
- header value or null
to remove
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.