public interface ILaunchConfigurationType extends 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 implements ILaunchConfigurationDelegate
. 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.
ILaunchConfiguration
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(String attributeName)
Returns the attribute with the given name, as specified by this launch
configuration type's extension definition, or
null if
unspecified. |
String |
getCategory()
Returns this launch configuration type's category, or
null
if unspecified. |
String |
getContributorName()
Returns the name of the plug-in that contributed this launch configuration type.
|
ILaunchConfigurationDelegate |
getDelegate()
Deprecated.
use
getDelegate(String) to specify mode |
ILaunchConfigurationDelegate |
getDelegate(String mode)
Deprecated.
since 3.3, the method
getDelegates(Set) should be used
instead, as there can be more than one capable delegate per mode or combination
of modes |
ILaunchDelegate[] |
getDelegates(Set<String> modes)
Returns the delegates capable of launching in the specified modes, possibly
an empty set.
|
String |
getIdentifier()
Returns the unique identifier for this type of launch configuration
|
String |
getName()
Returns the name of this type of launch configuration.
|
String |
getPluginIdentifier()
Returns the identifier of the plug-in that contributes this launch configuration type.
|
ILaunchDelegate |
getPreferredDelegate(Set<String> modes)
Returns the preferred launch delegate for this type in the specified mode combination
or
null if there is no preferred delegate. |
String |
getSourceLocatorId()
Returns the identifier of the persistable source locator registered with
this launch configurations type, or
null if unspecified. |
ISourcePathComputer |
getSourcePathComputer()
Returns the source path computer registered with this launch configuration
type or
null if unspecified. |
Set<Set<String>> |
getSupportedModeCombinations()
Returns a
java.util.Set of java.util.Set s containing all of the
supported launch mode combinations for this type. |
Set<String> |
getSupportedModes()
Deprecated.
Since 3.3 all modes are provided as sets and not individual strings. The method
getSupportedModeCombinations
should be used instead to retrieve the complete listing of supported modes and their allowable combinations. |
boolean |
isPublic()
Returns whether this launch configuration type is public.
|
ILaunchConfigurationWorkingCopy |
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.
|
void |
setPreferredDelegate(Set<String> modes,
ILaunchDelegate delegate)
Sets the preferred launch delegate for this type in the specified mode combination.
|
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.
|
getAdapter
String getAttribute(String attributeName)
null
if
unspecified.attributeName
- attribute namenull
String getCategory()
null
if unspecified. This corresponds to the category attribute specified in
the extension definition.null
@Deprecated ILaunchConfigurationDelegate getDelegate() throws CoreException
getDelegate(String)
to specify moderun
mode.
The first time this method is called, the delegate is instantiated.CoreException
- if unable to instantiate the
delegate@Deprecated ILaunchConfigurationDelegate getDelegate(String mode) throws CoreException
getDelegates(Set)
should be used
instead, as there can be more than one capable delegate per mode or combination
of modesorg.eclipse.debug.core.launchDelegates
mode
- launch modeCoreException
- if unable to instantiate the
delegateILaunchDelegate[] getDelegates(Set<String> modes) throws CoreException
modes
- set of launch modesILaunchDelegate
s capable of launching
in the specified modes or an empty collection if noneCoreException
- if a problem is encounteredILaunchDelegate getPreferredDelegate(Set<String> modes) throws CoreException
null
if there is no preferred delegate.modes
- the set of modes to supportnull
if noneCoreException
- if a problem is encounteredvoid setPreferredDelegate(Set<String> modes, ILaunchDelegate delegate) throws CoreException
null
as a preferred delegate to remove any preferred delegate
setting for this launch configuration type.modes
- launch mode combinationdelegate
- preferred launch delegate or null
CoreException
- if a problem is encounteredboolean supportsModeCombination(Set<String> modes)
modes
- launch mode combinationString getIdentifier()
String getName()
String getPluginIdentifier()
String getSourceLocatorId()
null
if unspecified.
A source locator can be specified by a launch configuration type or
launch delegate extension's sourceLocatorId
attribute.
Only one source locator should be provided per launch configuration type and its launch delegates.
null
if unspecifiedISourcePathComputer getSourcePathComputer()
null
if unspecified. A source path computer can be
specified by a launch configuration type or launch delegate extension's
sourcePathComputerId
attribute.
Only one source path computer should be provided per launch configuration type and its launch delegates.
null
if unspecified@Deprecated Set<String> getSupportedModes()
getSupportedModeCombinations
should be used instead to retrieve the complete listing of supported modes and their allowable combinations.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
Set<Set<String>> getSupportedModeCombinations()
java.util.Set
of java.util.Set
s containing all of the
supported launch mode combinations for this type.boolean isPublic()
ILaunchManager
.ILaunchConfigurationWorkingCopy newInstance(IContainer container, String name) throws CoreException
container
is null, 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 the container
is null
(i.e. when the
configuration is to be stored in the local metadata area.
container
- the container in which the new configuration will
reside, or null
if the configuration should reside
locally with the metadata.name
- name for the launch configurationCoreException
- if an instance of this type
of launch configuration could not be created for any
reasonboolean supportsMode(String mode)
mode
- a mode in which a configuration can be launched, one of
the mode constants defined by ILaunchManager
- RUN_MODE
or
DEBUG_MODE
.String getContributorName()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.