Interface ITargetDefinition
- Since:
- 3.8
- See Also:
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list of all resolved bundles in this target definition ornull
.Returns the list of feature models available in this target ornull
if this target has not been resolved.getArch()
Returns the identifier of the architecture this target is configured for, ornull
to default to the running architecture.Returns all bundles included in this target definition ornull
if this container is not resolved.Returns the Document that represents this target, ornull
if noneReturns a handle to this target definition.Returns the implicit dependencies set on this target ornull
if none.Returns a list of descriptors that filter the resolved plug-ins in this target.Returns JRE container path that this target definition should be built against, ornull
if the workspace default JRE should be used.getName()
Returns the name of this target, ornull
if nonegetNL()
Returns the identifier of the locale this target is configured for, ornull
for default.getOS()
Returns the identifier of the operating system this target is configured for, possiblynull
.Returns any program arguments that should be used when launching this target ornull
if none.Returns aMultiStatus
containing all problems with this target.Returns the locations defined by this target, possiblenull
.Returns any VM arguments that should be used when launching this target ornull
if none.getWS()
Returns the identifier of the window system this target is configured for, possiblynull
.boolean
Returns whether allITargetLocation
s in this target currently in a resolved state.resolve
(IProgressMonitor monitor) Resolves all contents of this target definition by resolving eachITargetLocation
in this target definition.void
Sets the architecture this target is configured for, ornull
to default to the running architecture.void
setDocument
(Document document) Sets the XML document that stores the state of this target.void
setImplicitDependencies
(NameVersionDescriptor[] bundles) Sets implicit dependencies for this target.void
setIncluded
(NameVersionDescriptor[] included) Sets a list of descriptors to filter the resolved plug-ins in this target.void
setJREContainer
(IPath containerPath) Sets the JRE that this target definition should be built against, ornull
to use the workspace default JRE.void
Sets the name of this target.void
Sets the locale this target is configured for ornull
for default.void
Sets the operating system this target is configured for ornull
to default to the running operating system.void
setProgramArguments
(String args) Sets any program arguments that should be used when launching this target ornull
if none.void
setTargetLocations
(ITargetLocation[] containers) Sets the locations in this target definition ornull
if none.void
setVMArguments
(String args) Sets any VM arguments that should be used when launching this target ornull
if none.void
Sets the window system this target is configured for ornull
to default to the running window system.
-
Method Details
-
resolve
Resolves all contents of this target definition by resolving eachITargetLocation
in this target definition.Returns a
MultiStatus
containing any non-OK statuses produced when resolving eachITargetLocation
. An OK status will be returned if no non-OK statuses are returned from the locations. A CANCEL status will be returned if the monitor is cancelled.For more information on how a target resolves, see
ITargetLocation.resolve(ITargetDefinition, IProgressMonitor)
- Parameters:
monitor
- progress monitor ornull
- Returns:
- resolution multi-status
-
isResolved
boolean isResolved()Returns whether allITargetLocation
s in this target currently in a resolved state.- Returns:
true
if all locations are currently resolved
-
setDocument
Sets the XML document that stores the state of this target. The document is updated with each setter that has an affect on the target file source.- Parameters:
document
- xml document ornull
- Since:
- 3.12
-
getDocument
Document getDocument()Returns the Document that represents this target, ornull
if none- Returns:
- document or
null
- Since:
- 3.12
-
getBundles
TargetBundle[] getBundles()Returns all bundles included in this target definition ornull
if this container is not resolved. Takes all the bundles available from the set target locations (returned bygetAllBundles()
and applies the filters (returned bygetIncluded()
) to determine the final list of bundles in this target.Some of the returned bundles may have non-OK statuses. These bundles may be missing some information (location, version, source target). To get a bundle's status call
TargetBundle.getStatus()
. CallinggetStatus()
will return all problems in this target definition.- Returns:
- resolved bundles or
null
-
getAllBundles
TargetBundle[] getAllBundles()Returns a list of all resolved bundles in this target definition ornull
. Does not filter based on any filters (getIncluded()
. Returnsnull
if this target has not been resolved. UsegetBundles()
to get the filtered list of bundles.Some of the returned bundles may have non-OK statuses. These bundles may be missing some information (location, version, source target). To get a bundle's status call
TargetBundle.getStatus()
. CallinggetStatus()
will return all problems in this target definition.- Returns:
- collection of resolved bundles or
null
-
getAllFeatures
TargetFeature[] getAllFeatures()Returns the list of feature models available in this target ornull
if this target has not been resolved.- Returns:
- collection of feature models or
null
-
getStatus
IStatus getStatus()Returns aMultiStatus
containing all problems with this target. Returns an OK status if there are no problems. Returnsnull
if this target has not been resolved.The returned status will include all non-OK statuses returned by
resolve(IProgressMonitor)
as well as any non-OK statuses found inTargetBundle
s returned bygetBundles()
. For more information on the statuses that can be returned seeITargetLocation.getStatus()
andTargetBundle.getStatus()
.- Returns:
MultiStatus
containing all problems with this target ornull
-
getHandle
ITargetHandle getHandle()Returns a handle to this target definition.- Returns:
- target handle
-
getName
String getName()Returns the name of this target, ornull
if none- Returns:
- name or
null
-
setName
Sets the name of this target.- Parameters:
name
- target name ornull
-
getTargetLocations
ITargetLocation[] getTargetLocations()Returns the locations defined by this target, possiblenull
.- Returns:
- target locations or
null
-
setTargetLocations
Sets the locations in this target definition ornull
if none.- Parameters:
containers
- target locations ornull
-
getIncluded
NameVersionDescriptor[] getIncluded()Returns a list of descriptors that filter the resolved plug-ins in this target. The list may include both plug-ins and features. The returned descriptors will have an id, may have a version and will have eitherNameVersionDescriptor.TYPE_FEATURE
orNameVersionDescriptor.TYPE_PLUGIN
as their type. If the target is set to include all units (no filtering is being done), this method will returnnull
.- Returns:
- list of name version descriptors or
null
- See Also:
-
setIncluded
Sets a list of descriptors to filter the resolved plug-ins in this target. The list may include both plug-ins and features. To include all plug-ins in the target, passnull
as the argument.The descriptions passed to this method must have an ID set. The version may be
null
to include any version of the matches the ID. Only descriptors with a type ofNameVersionDescriptor.TYPE_FEATURE
orNameVersionDescriptor.TYPE_PLUGIN
will be considered.- Parameters:
included
- list of descriptors to include in the target ornull
to include all plug-ins- See Also:
-
getJREContainer
IPath getJREContainer()Returns JRE container path that this target definition should be built against, ornull
if the workspace default JRE should be used. JavaRuntime can be used to resolve JRE's and execution environments from a container path.- Returns:
- JRE container path or
null
- See Also:
-
setJREContainer
Sets the JRE that this target definition should be built against, ornull
to use the workspace default JRE. JavaRuntime should be used to generate and parse JRE container paths.- Parameters:
containerPath
- JRE container path- See Also:
-
getOS
String getOS()Returns the identifier of the operating system this target is configured for, possiblynull
.- Returns:
- operating system identifier or
null
to default to the running operating system
-
setOS
Sets the operating system this target is configured for ornull
to default to the running operating system.- Parameters:
os
- operating system identifier - one of the operating system constants defined byConstants
ornull
to default to the running operating system
-
getWS
String getWS()Returns the identifier of the window system this target is configured for, possiblynull
.- Returns:
- window system identifier - one of the window system constants
defined by
Constants
, ornull
to default to the running window system
-
setWS
Sets the window system this target is configured for ornull
to default to the running window system.- Parameters:
ws
- window system identifier ornull
to default to the running window system
-
getArch
String getArch()Returns the identifier of the architecture this target is configured for, ornull
to default to the running architecture.- Returns:
- architecture identifier - one of the architecture constants
defined by
Constants
ornull
to default to the running architecture
-
setArch
Sets the architecture this target is configured for, ornull
to default to the running architecture.- Parameters:
arch
- architecture identifier ornull
to default to the running architecture.
-
getNL
String getNL()Returns the identifier of the locale this target is configured for, ornull
for default.- Returns:
- locale identifier or
null
for default
-
setNL
Sets the locale this target is configured for ornull
for default.- Parameters:
nl
- locale identifier ornull
for default
-
getProgramArguments
String getProgramArguments()Returns any program arguments that should be used when launching this target ornull
if none.- Returns:
- program arguments or
null
if none
-
setProgramArguments
Sets any program arguments that should be used when launching this target ornull
if none.- Parameters:
args
- program arguments ornull
-
getVMArguments
String getVMArguments()Returns any VM arguments that should be used when launching this target ornull
if none.- Returns:
- VM arguments or
null
if none
-
setVMArguments
Sets any VM arguments that should be used when launching this target ornull
if none.- Parameters:
args
- VM arguments ornull
-
setImplicitDependencies
Sets implicit dependencies for this target. Bundles in this collection are always considered by PDE when computing plug-in dependencies. Only symbolic names need to be specified in the given descriptors.- Parameters:
bundles
- implicit dependencies ornull
if none
-
getImplicitDependencies
NameVersionDescriptor[] getImplicitDependencies()Returns the implicit dependencies set on this target ornull
if none.- Returns:
- implicit dependencies or
null
-