public interface ITargetDefinition
Use the target platform service to work with target definitions| Modifier and Type | Method and Description |
|---|---|
TargetBundle[] |
getAllBundles()
Returns a list of all resolved bundles in this target definition or
null. |
TargetFeature[] |
getAllFeatures()
Returns the list of feature models available in this target or
null if
this target has not been resolved. |
String |
getArch()
Returns the identifier of the architecture this target is configured for,
or
null to default to the running architecture. |
TargetBundle[] |
getBundles()
Returns all bundles included in this target definition or
null
if this container is not resolved. |
ITargetHandle |
getHandle()
Returns a handle to this target definition.
|
NameVersionDescriptor[] |
getImplicitDependencies()
Returns the implicit dependencies set on this target or
null if none. |
NameVersionDescriptor[] |
getIncluded()
Returns a list of descriptors that filter the resolved plug-ins in this target.
|
IPath |
getJREContainer()
Returns JRE container path that this target definition should be built against,
or
null if the workspace default JRE should be used. |
String |
getName()
Returns the name of this target, or
null if none |
String |
getNL()
Returns the identifier of the locale this target is configured for, or
null
for default. |
String |
getOS()
Returns the identifier of the operating system this target is configured for,
possibly
null. |
String |
getProgramArguments()
Returns any program arguments that should be used when launching this target
or
null if none. |
IStatus |
getStatus()
Returns a
MultiStatus containing all problems with this target. |
ITargetLocation[] |
getTargetLocations()
Returns the locations defined by this target, possible
null. |
String |
getVMArguments()
Returns any VM arguments that should be used when launching this target
or
null if none. |
String |
getWS()
Returns the identifier of the window system this target is configured for,
possibly
null. |
boolean |
isResolved()
Returns whether all
ITargetLocations in this target currently in
a resolved state. |
IStatus |
resolve(IProgressMonitor monitor)
Resolves all contents of this target definition by resolving each
ITargetLocation in this target definition. |
void |
setArch(String arch)
Sets the architecture this target is configured for, or
null to default
to the running architecture. |
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, or
null
to use the workspace default JRE. |
void |
setName(String name)
Sets the name of this target.
|
void |
setNL(String nl)
Sets the locale this target is configured for or
null for default. |
void |
setOS(String os)
Sets the operating system this target is configured for or
null to
default to the running operating system. |
void |
setProgramArguments(String args)
Sets any program arguments that should be used when launching this target
or
null if none. |
void |
setTargetLocations(ITargetLocation[] containers)
Sets the locations in this target definition or
null if none. |
void |
setVMArguments(String args)
Sets any VM arguments that should be used when launching this target
or
null if none. |
void |
setWS(String ws)
Sets the window system this target is configured for or
null to
default to the running window system. |
IStatus resolve(IProgressMonitor monitor)
ITargetLocation in this target definition.
Returns a MultiStatus containing any non-OK statuses produced
when resolving each ITargetLocation. 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)
monitor - progress monitor or nullboolean isResolved()
ITargetLocations in this target currently in
a resolved state.true if all locations are currently resolvedTargetBundle[] getBundles()
null
if this container is not resolved. Takes all the bundles available from the
set target locations (returned by getAllBundles() and applies
the filters (returned by getIncluded())
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(). Calling getStatus()
will return all problems in this target definition.
nullTargetBundle[] getAllBundles()
null.
Does not filter based on any filters (getIncluded().
Returns null if this target has not been resolved.
Use getBundles() 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(). Calling getStatus()
will return all problems in this target definition.
nullTargetFeature[] getAllFeatures()
null if
this target has not been resolved.nullIStatus getStatus()
MultiStatus containing all problems with this target.
Returns an OK status if there are no problems. Returns null
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 in TargetBundles returned by getBundles().
For more information on the statuses that can be returned see ITargetLocation.getStatus()
and TargetBundle.getStatus().
MultiStatus containing all problems with this target or nullITargetHandle getHandle()
String getName()
null if nonenullvoid setName(String name)
name - target name or nullITargetLocation[] getTargetLocations()
null.nullvoid setTargetLocations(ITargetLocation[] containers)
null if none.containers - target locations or nullNameVersionDescriptor[] getIncluded()
NameVersionDescriptor.TYPE_FEATURE or NameVersionDescriptor.TYPE_PLUGIN as their
type. If the target is set to include all units (no filtering is being done), this method will return
null.nullgetBundles(),
setIncluded(NameVersionDescriptor[])void setIncluded(NameVersionDescriptor[] included)
null 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 of NameVersionDescriptor.TYPE_FEATURE
or NameVersionDescriptor.TYPE_PLUGIN will be considered.
included - list of descriptors to include in the target or null to include all plug-insgetBundles(),
getIncluded()IPath getJREContainer()
null if the workspace default JRE should be used. JavaRuntime can be used
to resolve JRE's and execution environments from a container path.nullJavaRuntimevoid setJREContainer(IPath containerPath)
null
to use the workspace default JRE. JavaRuntime should be used to generate and parse
JRE container paths.containerPath - JRE container pathJavaRuntimeString getOS()
null.null to default to the
running operating systemvoid setOS(String os)
null to
default to the running operating system.os - operating system identifier - one of the operating system constants
defined by Constants or null to default to the running
operating systemString getWS()
null.Constants, or null to default to the
running window systemvoid setWS(String ws)
null to
default to the running window system.ws - window system identifier or null to default to the
running window systemString getArch()
null to default to the running architecture.Constants or null to default to the running
architecturevoid setArch(String arch)
null to default
to the running architecture.arch - architecture identifier or null to default to the
running architecture.String getNL()
null
for default.null for defaultvoid setNL(String nl)
null for default.nl - locale identifier or null for defaultString getProgramArguments()
null if none.null if nonevoid setProgramArguments(String args)
null if none.args - program arguments or nullString getVMArguments()
null if none.null if nonevoid setVMArguments(String args)
null if none.args - VM arguments or nullvoid setImplicitDependencies(NameVersionDescriptor[] bundles)
bundles - implicit dependencies or null if noneNameVersionDescriptor[] getImplicitDependencies()
null if none.null
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.