Interface ITargetDefinition
- 
 public interface ITargetDefinitionDefines a target platform. A target platform is a collection of bundles and features configured for a specific environment.- Since:
- 3.8
- See Also:
- Use the target platform service to work with target definitions
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description TargetBundle[]getAllBundles()Returns a list of all resolved bundles in this target definition ornull.TargetFeature[]getAllFeatures()Returns the list of feature models available in this target ornullif this target has not been resolved.StringgetArch()Returns the identifier of the architecture this target is configured for, ornullto default to the running architecture.TargetBundle[]getBundles()Returns all bundles included in this target definition ornullif this container is not resolved.DocumentgetDocument()Returns the Document that represents this target, ornullif noneITargetHandlegetHandle()Returns a handle to this target definition.NameVersionDescriptor[]getImplicitDependencies()Returns the implicit dependencies set on this target ornullif none.NameVersionDescriptor[]getIncluded()Returns a list of descriptors that filter the resolved plug-ins in this target.IPathgetJREContainer()Returns JRE container path that this target definition should be built against, ornullif the workspace default JRE should be used.StringgetName()Returns the name of this target, ornullif noneStringgetNL()Returns the identifier of the locale this target is configured for, ornullfor default.StringgetOS()Returns the identifier of the operating system this target is configured for, possiblynull.StringgetProgramArguments()Returns any program arguments that should be used when launching this target ornullif none.IStatusgetStatus()Returns aMultiStatuscontaining all problems with this target.ITargetLocation[]getTargetLocations()Returns the locations defined by this target, possiblenull.StringgetVMArguments()Returns any VM arguments that should be used when launching this target ornullif none.StringgetWS()Returns the identifier of the window system this target is configured for, possiblynull.booleanisResolved()Returns whether allITargetLocations in this target currently in a resolved state.IStatusresolve(IProgressMonitor monitor)Resolves all contents of this target definition by resolving eachITargetLocationin this target definition.voidsetArch(String arch)Sets the architecture this target is configured for, ornullto default to the running architecture.voidsetDocument(Document document)Sets the XML document that stores the state of this target.voidsetImplicitDependencies(NameVersionDescriptor[] bundles)Sets implicit dependencies for this target.voidsetIncluded(NameVersionDescriptor[] included)Sets a list of descriptors to filter the resolved plug-ins in this target.voidsetJREContainer(IPath containerPath)Sets the JRE that this target definition should be built against, ornullto use the workspace default JRE.voidsetName(String name)Sets the name of this target.voidsetNL(String nl)Sets the locale this target is configured for ornullfor default.voidsetOS(String os)Sets the operating system this target is configured for ornullto default to the running operating system.voidsetProgramArguments(String args)Sets any program arguments that should be used when launching this target ornullif none.voidsetTargetLocations(ITargetLocation[] containers)Sets the locations in this target definition ornullif none.voidsetVMArguments(String args)Sets any VM arguments that should be used when launching this target ornullif none.voidsetWS(String ws)Sets the window system this target is configured for ornullto default to the running window system.
 
- 
- 
- 
Method Detail- 
resolveIStatus resolve(IProgressMonitor monitor) Resolves all contents of this target definition by resolving eachITargetLocationin this target definition.Returns a MultiStatuscontaining 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 or- null
- Returns:
- resolution multi-status
 
 - 
isResolvedboolean isResolved() Returns whether allITargetLocations in this target currently in a resolved state.- Returns:
- trueif all locations are currently resolved
 
 - 
setDocumentvoid setDocument(Document document) 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 or- null
- Since:
- 3.12
 
 - 
getDocumentDocument getDocument() Returns the Document that represents this target, ornullif none- Returns:
- document or null
- Since:
- 3.12
 
 - 
getBundlesTargetBundle[] getBundles() Returns all bundles included in this target definition ornullif 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
 
 - 
getAllBundlesTargetBundle[] getAllBundles() Returns a list of all resolved bundles in this target definition ornull. Does not filter based on any filters (getIncluded(). Returnsnullif 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
 
 - 
getAllFeaturesTargetFeature[] getAllFeatures() Returns the list of feature models available in this target ornullif this target has not been resolved.- Returns:
- collection of feature models or null
 
 - 
getStatusIStatus getStatus() Returns aMultiStatuscontaining all problems with this target. Returns an OK status if there are no problems. Returnsnullif 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 inTargetBundles returned bygetBundles(). For more information on the statuses that can be returned seeITargetLocation.getStatus()andTargetBundle.getStatus().- Returns:
- MultiStatuscontaining all problems with this target or- null
 
 - 
getHandleITargetHandle getHandle() Returns a handle to this target definition.- Returns:
- target handle
 
 - 
getNameString getName() Returns the name of this target, ornullif none- Returns:
- name or null
 
 - 
setNamevoid setName(String name) Sets the name of this target.- Parameters:
- name- target name or- null
 
 - 
getTargetLocationsITargetLocation[] getTargetLocations() Returns the locations defined by this target, possiblenull.- Returns:
- target locations or null
 
 - 
setTargetLocationsvoid setTargetLocations(ITargetLocation[] containers) Sets the locations in this target definition ornullif none.- Parameters:
- containers- target locations or- null
 
 - 
getIncludedNameVersionDescriptor[] 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_FEATUREorNameVersionDescriptor.TYPE_PLUGINas 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:
- getBundles(),- setIncluded(NameVersionDescriptor[])
 
 - 
setIncludedvoid setIncluded(NameVersionDescriptor[] included) 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, passnullas the argument.The descriptions passed to this method must have an ID set. The version may be nullto include any version of the matches the ID. Only descriptors with a type ofNameVersionDescriptor.TYPE_FEATUREorNameVersionDescriptor.TYPE_PLUGINwill be considered.- Parameters:
- included- list of descriptors to include in the target or- nullto include all plug-ins
- See Also:
- getBundles(),- getIncluded()
 
 - 
getJREContainerIPath getJREContainer() Returns JRE container path that this target definition should be built against, ornullif 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:
- JavaRuntime
 
 - 
setJREContainervoid setJREContainer(IPath containerPath) Sets the JRE that this target definition should be built against, ornullto use the workspace default JRE. JavaRuntime should be used to generate and parse JRE container paths.- Parameters:
- containerPath- JRE container path
- See Also:
- JavaRuntime
 
 - 
getOSString getOS() Returns the identifier of the operating system this target is configured for, possiblynull.- Returns:
- operating system identifier or nullto default to the running operating system
 
 - 
setOSvoid setOS(String os) Sets the operating system this target is configured for ornullto default to the running operating system.- Parameters:
- os- operating system identifier - one of the operating system constants defined by- Constantsor- nullto default to the running operating system
 
 - 
getWSString 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, ornullto default to the running window system
 
 - 
setWSvoid setWS(String ws) Sets the window system this target is configured for ornullto default to the running window system.- Parameters:
- ws- window system identifier or- nullto default to the running window system
 
 - 
getArchString getArch() Returns the identifier of the architecture this target is configured for, ornullto default to the running architecture.- Returns:
- architecture identifier - one of the architecture constants
        defined by Constantsornullto default to the running architecture
 
 - 
setArchvoid setArch(String arch) Sets the architecture this target is configured for, ornullto default to the running architecture.- Parameters:
- arch- architecture identifier or- nullto default to the running architecture.
 
 - 
getNLString getNL() Returns the identifier of the locale this target is configured for, ornullfor default.- Returns:
- locale identifier or nullfor default
 
 - 
setNLvoid setNL(String nl) Sets the locale this target is configured for ornullfor default.- Parameters:
- nl- locale identifier or- nullfor default
 
 - 
getProgramArgumentsString getProgramArguments() Returns any program arguments that should be used when launching this target ornullif none.- Returns:
- program arguments or nullif none
 
 - 
setProgramArgumentsvoid setProgramArguments(String args) Sets any program arguments that should be used when launching this target ornullif none.- Parameters:
- args- program arguments or- null
 
 - 
getVMArgumentsString getVMArguments() Returns any VM arguments that should be used when launching this target ornullif none.- Returns:
- VM arguments or nullif none
 
 - 
setVMArgumentsvoid setVMArguments(String args) Sets any VM arguments that should be used when launching this target ornullif none.- Parameters:
- args- VM arguments or- null
 
 - 
setImplicitDependenciesvoid setImplicitDependencies(NameVersionDescriptor[] bundles) 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 or- nullif none
 
 - 
getImplicitDependenciesNameVersionDescriptor[] getImplicitDependencies() Returns the implicit dependencies set on this target ornullif none.- Returns:
- implicit dependencies or null
 
 
- 
 
-