|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Describes and creates instances of a specific type of launch configuration. Launch configuration types are defined by extensions.
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 suports - "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 atttribute 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 atttribute 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 developement. Such that
clients may access arbitrary attribtes 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.
This interface is not intended to be implemented by clients. Clients
that define a launch configuration delegate extension implement the
ILaunchConfigurationDelegate
interface.
ILaunchConfiguration
Method Summary | |
---|---|
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. |
ILaunchConfigurationDelegate |
getDelegate()
Deprecated. use getDelegate(String) to specify mode |
ILaunchConfigurationDelegate |
getDelegate(String mode)
Returns the launch configuration delegate for launch configurations of this type, for the specified mode. |
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. |
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. |
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. |
boolean |
supportsMode(String mode)
Returns whether this type of launch configuration supports the specified mode. |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
public boolean 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
.
public String getName()
public String getIdentifier()
public boolean isPublic()
ILaunchManager
.
public 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.
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 configuration
CoreException
- if an instance of this type
of launch configuration could not be created for any
reasonpublic ILaunchConfigurationDelegate getDelegate() throws CoreException
getDelegate(String)
to specify mode
run
mode.
The first time this method is called, the delegate is instantiated.
CoreException
- if unable to instantiate the
delegatepublic ILaunchConfigurationDelegate getDelegate(String mode) throws CoreException
org.eclipse.debug.core.launchDelegates
mode
- launch mode
CoreException
- if unable to instantiate the
delegatepublic String getCategory()
null
if unspecified. This corresponds to the category attribute specified in
the extension definition.
null
public String getAttribute(String attributeName)
null
if
unspecified.
attributeName
- attribute name
null
public ISourcePathComputer getSourcePathComputer()
null
if unspecified. A source path computer can be
registered with a launch configuration type in plug-in XML via the
sourcePathComputerId
attribute.
null
if unspecifiedpublic String getSourceLocatorId()
null
if unspecified.
Launch configuration types optionally specify this attribue
in their plug-in XML via the sourceLocatorId
attribute.
null
if unspecifiedpublic String getPluginIdentifier()
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.