Interface ILaunchConfigurationType
- All Superinterfaces:
IAdaptable
A launch configuration type extension is defined in plugin.xml
.
Following is an example definition of a launch configuration type extension.
<extension point="org.eclipse.debug.core.launchConfigurationTypes"> <launchConfigurationType id="com.example.ExampleIdentifier" delegate="com.example.ExampleLaunchConfigurationDelegate" modes="run, debug" name="Example Application"> sourceLocatorId="com.example.SourceLocator"> sourcePathComputerId="com.example.SourcePathComputer"> </launchConfigurationType> </extension>The attributes are specified as follows:
id
specifies a unique identifier for this launch configuration type.delegate
specifies the fully qualified name of the java class that implementsILaunchConfigurationDelegate
. Launch configuration instances of this type will delegate to instances of this class to perform launching.modes
specifies a comma separated list of the modes this type of launch configuration supports -"run"
and/or"debug"
.name
specifies a human readable name for this type of launch configuration.category
is an optional attribute that specifies a category for this launch configuration type. Categories are client defined. This attribute was added in the 2.1 release.sourceLocatorId
an optional unique identifier of a sourceLocator extension that is used to create the source locator for sessions launched using launch configurations of this type. This attribute was added in the 3.0 release.sourcePathComputerId
an optional unique identifier of a sourcePathComputer extension that is used to compute a default source lookup path for launch configurations of this type. This attribute was added in the 3.0 release.
The category
attribute has been added in release 2.1, such that
other tools may re-use the launch configuration framework for purposes other
than the standard running and debugging of programs under development. Such
that clients may access arbitrary attributes specified in launch
configuration type extension definitions, the method
getAttribute
has also been added. Launch configurations that are
to be recognized as standard run/debug launch configurations should not
specify the category
attribute.
Clients that define a launch configuration delegate extension implement the
ILaunchConfigurationDelegate
interface.
- Since:
- 2.0
- 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 TypeMethodDescriptiongetAttribute
(String attributeName) Returns the attribute with the given name, as specified by this launch configuration type's extension definition, ornull
if unspecified.Returns this launch configuration type's category, ornull
if unspecified.Returns the name of the plug-in that contributed this launch configuration type.Deprecated.getDelegate
(String mode) Deprecated.since 3.3, the methodgetDelegates(Set)
should be used instead, as there can be more than one capable delegate per mode or combination of modesgetDelegates
(Set<String> modes) Returns the delegates capable of launching in the specified modes, possibly an empty set.Returns the unique identifier for this type of launch configurationgetName()
Returns the name of this type of launch configuration.Returns the identifier of the plug-in that contributes this launch configuration type.getPreferredDelegate
(Set<String> modes) Returns the preferred launch delegate for this type in the specified mode combination ornull
if there is no preferred delegate.Returns all launch configuration prototypes of the this type, possibly an empty collection.Returns the identifier of the persistable source locator registered with this launch configurations type, ornull
if unspecified.Returns the source path computer registered with this launch configuration type ornull
if unspecified.Returns ajava.util.Set
ofjava.util.Set
s containing all of the supported launch mode combinations for this type.Deprecated.Since 3.3 all modes are provided as sets and not individual strings.boolean
isPublic()
Returns whether this launch configuration type is public.newInstance
(IContainer container, String name) Returns a new launch configuration working copy of this type, that resides in the specified container, with the given name.newPrototypeInstance
(IContainer container, String name) Returns a new launch configuration working copy of this type, that resides in the specified container, with the given name.void
setPreferredDelegate
(Set<String> modes, ILaunchDelegate delegate) Sets the preferred launch delegate for this type in the specified mode combination.boolean
Returns whether this type of launch configuration supports showing command line.boolean
supportsMode
(String mode) Returns whether this type of launch configuration supports the specified mode.boolean
supportsModeCombination
(Set<String> modes) Returns whether this launch configuration supports the specified launch mode combination.boolean
Returns whether this type of launch configuration supports launching processes with error stream redirected and merged with standard output stream.boolean
Returns whether this type of launch configuration supports prototypes.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Method Details
-
getAttribute
Returns the attribute with the given name, as specified by this launch configuration type's extension definition, ornull
if unspecified.- Parameters:
attributeName
- attribute name- Returns:
- the specified extension attribute, or
null
- Since:
- 2.1
-
getCategory
String getCategory()Returns this launch configuration type's category, ornull
if unspecified. This corresponds to the category attribute specified in the extension definition.- Returns:
- this launch configuration type's category, or
null
- Since:
- 2.1
-
getDelegate
Deprecated.usegetDelegate(String)
to specify modeReturns the launch configuration delegate for launch configurations of this type, forrun
mode. The first time this method is called, the delegate is instantiated.- Returns:
- launch configuration delegate
- Throws:
CoreException
- if unable to instantiate the delegate
-
getDelegate
Deprecated.since 3.3, the methodgetDelegates(Set)
should be used instead, as there can be more than one capable delegate per mode or combination of modesReturns the launch configuration delegate for launch configurations of this type, for the specified mode. The first time this method is called for a mode, the delegate is instantiated. Launch delegates may be contributed to a launch configuration type via the extension pointorg.eclipse.debug.core.launchDelegates
- Parameters:
mode
- launch mode- Returns:
- launch configuration delegate
- Throws:
CoreException
- if unable to instantiate the delegate- Since:
- 3.0
-
getDelegates
Returns the delegates capable of launching in the specified modes, possibly an empty set.- Parameters:
modes
- set of launch modes- Returns:
- the
ILaunchDelegate
s capable of launching in the specified modes or an empty collection if none - Throws:
CoreException
- if a problem is encountered- Since:
- 3.3
-
getPreferredDelegate
Returns the preferred launch delegate for this type in the specified mode combination ornull
if there is no preferred delegate.- Parameters:
modes
- the set of modes to support- Returns:
- the preferred delegate or
null
if none - Throws:
CoreException
- if a problem is encountered- Since:
- 3.3
-
setPreferredDelegate
Sets the preferred launch delegate for this type in the specified mode combination. Specifynull
as a preferred delegate to remove any preferred delegate setting for this launch configuration type.- Parameters:
modes
- launch mode combinationdelegate
- preferred launch delegate ornull
- Throws:
CoreException
- if a problem is encountered- Since:
- 3.3
-
supportsModeCombination
Returns whether this launch configuration supports the specified launch mode combination.- Parameters:
modes
- launch mode combination- Returns:
- whether the launch mode combination is supported
- Since:
- 3.3
-
getIdentifier
String getIdentifier()Returns the unique identifier for this type of launch configuration- Returns:
- the unique identifier for this type of launch configuration
-
getName
String getName()Returns the name of this type of launch configuration.- Returns:
- the name of this type of launch configuration
-
getPluginIdentifier
String getPluginIdentifier()Returns the identifier of the plug-in that contributes this launch configuration type.- Returns:
- the identifier of the plug-in that contributes this launch configuration type
- Since:
- 3.0
-
getSourceLocatorId
String getSourceLocatorId()Returns the identifier of the persistable source locator registered with this launch configurations type, ornull
if unspecified. A source locator can be specified by a launch configuration type or launch delegate extension'ssourceLocatorId
attribute.Only one source locator should be provided per launch configuration type and its launch delegates.
- Returns:
- the identifier of the persistable source locator registered with
this launch configurations type, or
null
if unspecified - Since:
- 3.0
-
getSourcePathComputer
ISourcePathComputer getSourcePathComputer()Returns the source path computer registered with this launch configuration type ornull
if unspecified. A source path computer can be specified by a launch configuration type or launch delegate extension'ssourcePathComputerId
attribute.Only one source path computer should be provided per launch configuration type and its launch delegates.
- Returns:
- the source path computer registered with this launch configuration
type or
null
if unspecified - Since:
- 3.0
-
getSupportedModes
Deprecated.Since 3.3 all modes are provided as sets and not individual strings. The methodgetSupportedModeCombinations
should be used instead to retrieve the complete listing of supported modes and their allowable combinations.Returns all of the registered supported modes for this launch configuration type. This method does not return null.The returned set does not convey any mode combination capability nor does it describe how or what the type can launch, all this method does is return a set of strings of all the modes in some way associated with this type
- Returns:
- the set of all supported modes
- Since:
- 3.2
-
getSupportedModeCombinations
Returns ajava.util.Set
ofjava.util.Set
s containing all of the supported launch mode combinations for this type.- Returns:
- a set of sets of all the supported mode combinations supported by this type
- Since:
- 3.3
-
isPublic
boolean isPublic()Returns whether this launch configuration type is public. Public configuration types are available for use by the user, for example, the user can create new configurations based on public types through the UI. Private types are not accessible in this way, but are still available through the methods onILaunchManager
.- Returns:
- whether this launch configuration type is public.
-
newInstance
Returns a new launch configuration working copy of this type, that resides in the specified container, with the given name. Whencontainer
isnull
, the configuration will reside locally in the metadata area. Note: a launch configuration is not actually created until the working copy is saved.The configuration
name
parameter cannot contain file separator characters (sub directories) when thecontainer
isnull
(i.e. when the configuration is to be stored in the local metadata area.- Parameters:
container
- the container in which the new configuration will reside, ornull
if the configuration should reside locally with the metadata.name
- name for the launch configuration- Returns:
- a new launch configuration working copy instance of this type
- Throws:
CoreException
- if an instance of this type of launch configuration could not be created for any reason
-
supportsMode
Returns whether this type of launch configuration supports the specified mode.- Parameters:
mode
- a mode in which a configuration can be launched, one of the mode constants defined byILaunchManager
-RUN_MODE
orDEBUG_MODE
.- Returns:
- whether this kind of launch configuration supports the specified mode
-
getContributorName
String getContributorName()Returns the name of the plug-in that contributed this launch configuration type.- Returns:
- name of contributing plug-in
- Since:
- 3.3
-
getPrototypes
Returns all launch configuration prototypes of the this type, possibly an empty collection.- Returns:
- all launch configuration prototypes of the this type
- Throws:
CoreException
- if unable to retrieve the prototypes- Since:
- 3.12
-
newPrototypeInstance
ILaunchConfigurationWorkingCopy newPrototypeInstance(IContainer container, String name) throws CoreException Returns a new launch configuration working copy of this type, that resides in the specified container, with the given name. Whencontainer
isnull
, the configuration will reside locally in the metadata area. Note: a launch configuration is not actually created until the working copy is saved.The configuration
name
parameter cannot contain file separator characters (sub directories) when thecontainer
isnull
(i.e. when the configuration is to be stored in the local metadata area.- Parameters:
container
- the container in which the new configuration will reside, ornull
if the configuration should reside locally with the metadata.name
- name for the launch configuration- Returns:
- a new launch configuration working copy instance of this type
- Throws:
CoreException
- if an instance of this type of launch configuration could not be created for any reason- Since:
- 3.12
-
supportsPrototypes
boolean supportsPrototypes()Returns whether this type of launch configuration supports prototypes.- Returns:
- whether this kind of launch configuration supports the prototypes
- Since:
- 3.12
-
supportsCommandLine
boolean supportsCommandLine()Returns whether this type of launch configuration supports showing command line.- Returns:
- whether this kind of launch configuration supports showing command line
- Since:
- 3.13
-
supportsOutputMerging
boolean supportsOutputMerging()Returns whether this type of launch configuration supports launching processes with error stream redirected and merged with standard output stream.- Returns:
- whether this kind of launch configuration supports output merging
- Since:
- 3.14
-
getDelegate(String)
to specify mode