public interface ILaunchManager
ILaunch
,
ILaunchListener
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_APPEND_ENVIRONMENT_VARIABLES
Launch configuration attribute name.
|
static String |
ATTR_ENVIRONMENT_VARIABLES
Launch configuration attribute name.
|
static String |
ATTR_PRIVATE
Launch configuration attribute - a boolean value that indicates if the
launch configuration is 'private'.
|
static String |
DEBUG_MODE
A launch in a special debug mode (value
"debug" ). |
static String |
PROFILE_MODE
A launch in a special profile mode (value
"profile" ). |
static String |
RUN_MODE
A launch in a normal, non-debug mode(value
"run" ). |
Modifier and Type | Method and Description |
---|---|
void |
addLaunch(ILaunch launch)
Adds the specified launch and notifies listeners.
|
void |
addLaunchConfigurationListener(ILaunchConfigurationListener listener)
Adds the given launch configuration listener to the list
of listeners notified when a launch configuration is
added, removed, or changed.
|
void |
addLaunches(ILaunch[] launches)
Adds the specified launch objects and notifies listeners.
|
void |
addLaunchListener(ILaunchesListener listener)
Adds the given listener to the collection of registered launch listeners.
|
void |
addLaunchListener(ILaunchListener listener)
Adds the given listener to the collection of registered launch listeners.
|
String |
generateLaunchConfigurationName(String namePrefix)
Returns a string that can be used as the name of a launch configuration.
|
String |
generateUniqueLaunchConfigurationNameFrom(String namePrefix)
Deprecated.
since 3.6 clients should use the
generateLaunchConfigurationName(String) method which
will perform validation of the name and correct unsupported name parts. |
IDebugTarget[] |
getDebugTargets()
Returns the collection of debug targets currently registered with this
launch manager.
|
String |
getEncoding(ILaunchConfiguration configuration)
This method returns the character encoding to use when launching the specified
ILaunchConfiguration . |
String[] |
getEnvironment(ILaunchConfiguration configuration)
Returns an array of environment variables to be used when
launching the given configuration or
null if unspecified. |
ILaunchConfiguration |
getLaunchConfiguration(IFile file)
Returns a handle to the launch configuration contained
in the specified file.
|
ILaunchConfiguration |
getLaunchConfiguration(String memento)
Returns a handle to the launch configuration specified by
the given memento.
|
ILaunchConfiguration[] |
getLaunchConfigurations()
Returns all launch configurations defined in the workspace.
|
ILaunchConfiguration[] |
getLaunchConfigurations(ILaunchConfigurationType type)
Returns all launch configurations of the specified type defined in the workspace
|
ILaunchConfigurationType |
getLaunchConfigurationType(String id)
Returns the launch configuration type extension with the specified
id, or
null if it does not exist. |
ILaunchConfigurationType[] |
getLaunchConfigurationTypes()
Returns all defined launch configuration type extensions
|
ILaunch[] |
getLaunches()
Returns the collection of launches currently registered
with this launch manager.
|
ILaunchMode |
getLaunchMode(String mode)
Returns the launch mode registered with the given mode identifier,
or
null if none. |
ILaunchMode[] |
getLaunchModes()
Returns all registered launch modes.
|
ILaunchConfiguration[] |
getMigrationCandidates()
Returns a collection of launch configurations that required migration to be
compatible with current tooling.
|
ILaunchConfiguration |
getMovedFrom(ILaunchConfiguration addedConfiguration)
When a launch configuration is created or moved, registered launch
configuration listeners (see
ILaunchConfigurationListener )
are notified of an add notification for the new configuration. |
ILaunchConfiguration |
getMovedTo(ILaunchConfiguration removedConfiguration)
When a launch configuration is deleted or moved, registered launch
configuration listeners (see
ILaunchConfigurationListener )
are notified of a remove notification for launch configuration that has
been deleted. |
Map<String,String> |
getNativeEnvironment()
Returns the native system environment variables as a map of
variable names and values (Strings).
|
Map<String,String> |
getNativeEnvironmentCasePreserved()
Returns the native system environment variables as a map of
variable names and values (Strings).
|
IProcess[] |
getProcesses()
Returns the collection of processes currently registered with this
launch manager.
|
ISourceContainerType |
getSourceContainerType(String id)
Returns the source container type extension registered with the
given unique identifier, or
null if none. |
ISourceContainerType[] |
getSourceContainerTypes()
Returns all registered source container type extensions.
|
ISourcePathComputer |
getSourcePathComputer(ILaunchConfiguration configuration)
Returns a source path computer to compute a default source lookup path for
the given launch configuration, or
null if a source path
computer has not been registered for the associated launch configuration
type. |
ISourcePathComputer |
getSourcePathComputer(String id)
Returns the source path computer extension registered with the given
unique identifier, or
null if none. |
boolean |
isExistingLaunchConfigurationName(String name)
Return
true if there is a launch configuration with the specified name,
false otherwise. |
boolean |
isRegistered(ILaunch launch)
Returns whether the given launch is currently registered.
|
boolean |
isValidLaunchConfigurationName(String configname)
Returns if the given name is valid or not.
|
IPersistableSourceLocator |
newSourceLocator(String identifier)
Creates and returns a new source locator of the specified
type.
|
void |
removeLaunch(ILaunch launch)
Removes the specified launch and notifies listeners.
|
void |
removeLaunchConfigurationListener(ILaunchConfigurationListener listener)
Removes the given launch configuration listener from the list
of listeners notified when a launch configuration is
added, removed, or changed.
|
void |
removeLaunches(ILaunch[] launches)
Removes the specified launch objects and notifies listeners.
|
void |
removeLaunchListener(ILaunchesListener listener)
Removes the given listener from the collection of registered launch listeners.
|
void |
removeLaunchListener(ILaunchListener listener)
Removes the given listener from the collection of registered launch listeners.
|
static final String RUN_MODE
"run"
).static final String DEBUG_MODE
"debug"
).static final String PROFILE_MODE
"profile"
).static final String ATTR_PRIVATE
static final String ATTR_ENVIRONMENT_VARIABLES
null
which indicates the default environment
should be used.static final String ATTR_APPEND_ENVIRONMENT_VARIABLES
true
),
or if they should replace the environment (i.e. false
). The
default value is true
.void addLaunch(ILaunch launch)
launch
- the launch to addvoid addLaunchConfigurationListener(ILaunchConfigurationListener listener)
listener
- launch configuration listenervoid addLaunches(ILaunch[] launches)
launches
- the launch objects to addvoid addLaunchListener(ILaunchesListener listener)
listener
- the listener to registervoid addLaunchListener(ILaunchListener listener)
listener
- the listener to register@Deprecated String generateUniqueLaunchConfigurationNameFrom(String namePrefix)
generateLaunchConfigurationName(String)
method which
will perform validation of the name and correct unsupported name parts.namePrefix
as a starting point. If
there is no existing launch configuration with this name, then namePrefix
is returned. Otherwise, the value returned consists of the specified prefix plus
some suffix that guarantees uniqueness.namePrefix
- the String that the returned name must begin withString generateLaunchConfigurationName(String namePrefix)
namePrefix
as a starting point. If
there is no existing launch configuration with this name, then namePrefix
is returned. Otherwise, the value returned consists of the specified prefix plus
some suffix that guarantees uniqueness.
If the name prefix does not pass name validation any illegal parts of the name will be removed during the name generation. Illegal characters will be replaced with '_' and illegal names will be replaced with "_reserved_".
namePrefix
- the string that the returned name should begin withboolean isValidLaunchConfigurationName(String configname) throws IllegalArgumentException
IllegalArgumentException
is thrown.configname
- the name to checkIllegalArgumentException
- if the name is invalid, where an invalid
is either a reserved system name (like 'aux' on Win 32) or the name contains invalid characters (like ':' or '/').IDebugTarget[] getDebugTargets()
String[] getEnvironment(ILaunchConfiguration configuration) throws CoreException
null
if unspecified.
Each entry is of the form "var_name=value
".configuration
- launch configurationnull
if unspecifiedCoreException
- if unable to access associated attribute or if
unable to resolve a variable in an environment variable's valueString getEncoding(ILaunchConfiguration configuration) throws CoreException
ILaunchConfiguration
.
The returned encoding can be derived from one of three places in the following order:
ResourcesPlugin
for the workspace preference (which resolves back to the system
property file.encoding
if the user has made no changes to the workspace encoding preference).configuration
- the ILaunchConfiguration
to get the encoding forILaunchConfiguration
CoreException
- if a problem is encounteredILaunchConfiguration getLaunchConfiguration(IFile file)
IFile
is
a launch configuration file or that it exists in the local or
remote file system.file
- launch configuration fileILaunchConfiguration getLaunchConfiguration(String memento) throws CoreException
memento
- launch configuration mementoCoreException
- if the given memento is invalid or
an exception occurs parsing the mementoILaunchConfiguration.getMemento()
ILaunchConfiguration[] getLaunchConfigurations() throws CoreException
CoreException
- if an exception occurs retrieving configurationsILaunchConfiguration[] getLaunchConfigurations(ILaunchConfigurationType type) throws CoreException
type
- a launch configuration typeCoreException
- if an error occurs while retrieving
a launch configurationILaunchConfigurationType getLaunchConfigurationType(String id)
null
if it does not exist.id
- unique identifier for a launch configuration type extensionnull
if it does not existILaunchConfigurationType[] getLaunchConfigurationTypes()
ILaunch[] getLaunches()
ILaunchMode getLaunchMode(String mode)
null
if none.mode
- mode identifiernull
ILaunchMode[] getLaunchModes()
ILaunchConfiguration[] getMigrationCandidates() throws CoreException
CoreException
- if an exception occurs determining
migration candidatesILaunchConfiguration getMovedFrom(ILaunchConfiguration addedConfiguration)
ILaunchConfigurationListener
)
are notified of an add notification for the new configuration. If the
notification is the result of a move this method will return a handle to
the launch configuration that the added launch configuration was moved
from. This method returns null
if the added launch
configuration was not the result of a rename or move. This information is
only available during the add notification call back
launchConfigurationAdded
.
Renaming a configuration is considered the same as moving a configuration.
addedConfiguration
- a launch configuration for which an add
notification is being broadcastnull
if the add notification is not the
result of a moveILaunchConfiguration getMovedTo(ILaunchConfiguration removedConfiguration)
ILaunchConfigurationListener
)
are notified of a remove notification for launch configuration that has
been deleted. If the notification is the result of a move this method
will return a handle to the launch configuration that the removed launch
configuration was moved to. This method returns null
if the
removed launch configuration was not the result of a rename or move. This
information is only available during the add notification call back
launchConfigurationRemoved
.
Renaming a configuration is considered the same as moving a configuration.
removedConfiguration
- a launch configuration for which a
remove notification is being broadcastnull
if the add notification is not the
result of a moveMap<String,String> getNativeEnvironment()
Note that WIN32 system environment preserves
the case of variable names but is otherwise case insensitive.
Depending on what you intend to do with the environment, the
lack of normalization may or may not be create problems. On
WIN32, this method normalizes mixed-case keys variable names
to upper case. Use getNativeEnvironmentCasePreserved()
instead to get a WIN32 system environment where the keys are
the mixed-case variable names recorded by the OS.
String
; value type: String
)Map<String,String> getNativeEnvironmentCasePreserved()
Note that WIN32 system environment preserves
the case of variable names but is otherwise case insensitive.
Depending on what you intend to do with the environment, the
lack of normalization may or may not be create problems. This
method returns mixed-case keys using the variable names
recorded by the OS.
Use getNativeEnvironment()
instead to get a WIN32 system
environment where all keys have been normalized to upper case.
String
; value type: String
)IProcess[] getProcesses()
ISourceContainerType getSourceContainerType(String id)
null
if none.id
- unique identifier of a source container type extensionnull
if noneISourceContainerType[] getSourceContainerTypes()
ISourcePathComputer getSourcePathComputer(ILaunchConfiguration configuration) throws CoreException
null
if a source path
computer has not been registered for the associated launch configuration
type.configuration
- a launch configurationnull
if unspecifiedCoreException
- if an exception occurs while instantiating a source
path computerISourcePathComputer getSourcePathComputer(String id)
null
if none.id
- source path computer identifiernull
if noneboolean isExistingLaunchConfigurationName(String name) throws CoreException
true
if there is a launch configuration with the specified name,
false
otherwise.name
- the name of the launch configuration whose existence is being checkedCoreException
- if unable to retrieve existing launch configuration namesboolean isRegistered(ILaunch launch)
launch
- a launchIPersistableSourceLocator newSourceLocator(String identifier) throws CoreException
identifier
- the identifier associated with a
persistable source locator extensionCoreException
- if an exception occurs creating
the source locatorvoid removeLaunch(ILaunch launch)
launch
- the launch to removevoid removeLaunchConfigurationListener(ILaunchConfigurationListener listener)
listener
- launch configuration listenervoid removeLaunches(ILaunch[] launches)
launches
- the launch objects to removevoid removeLaunchListener(ILaunchesListener listener)
listener
- the listener to unregistervoid removeLaunchListener(ILaunchListener listener)
listener
- the listener to unregister
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.