|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An editable copy of a launch configuration. Attributes of a launch configuration are modified by modifying the attributes of a working copy, and then saving the working copy.
Since 3.3, working copies can be nested. For example a working copy B can
be created from the original launch configuration A. Then a nested working
copy C can be created from working copy B. When the doSave()
method
is called on C, changes are written back to its parent working copy B without
effecting the original launch configuration A. When doSave()
is called
on B, the changes are persisted back to the original A.
This interface is not intended to be implemented by clients. Clients
that define a launch configuration delegate extension implement the
ILaunchConfigurationDelegate
interface.
ILaunchConfiguration
,
ILaunchConfigurationType
,
ILaunchConfigurationDelegate
Field Summary |
---|
Fields inherited from interface org.eclipse.debug.core.ILaunchConfiguration |
---|
ATTR_SOURCE_LOCATOR_ID, ATTR_SOURCE_LOCATOR_MEMENTO, LAUNCH_CONFIGURATION_FILE_EXTENSION |
Method Summary | |
---|---|
void |
addModes(Set modes)
Adds the specified launch modes to this configuration's settings. |
ILaunchConfiguration |
doSave()
Saves this working copy to its underlying file and returns a handle to the resulting launch configuration. |
ILaunchConfiguration |
getOriginal()
Returns the original launch configuration this working copy was created from or null if this is a new
working copy created from a launch configuration type. |
ILaunchConfigurationWorkingCopy |
getParent()
Returns the parent of this working copy or null if this working
copy is not a nested copy of another working copy. |
boolean |
isDirty()
Returns whether this configuration has been modified since it was last saved or created. |
void |
removeModes(Set modes)
Removes the specified launch modes from this configuration's settings. |
void |
rename(String name)
Renames this launch configuration to the specified name. |
void |
setAttribute(String attributeName,
boolean value)
Sets the boolean-valued attribute with the given name. |
void |
setAttribute(String attributeName,
int value)
Sets the integer-valued attribute with the given name. |
void |
setAttribute(String attributeName,
List value)
Sets the java.util.List -valued attribute with the given name.
|
void |
setAttribute(String attributeName,
Map value)
Sets the java.util.Map -valued attribute with the given name.
|
void |
setAttribute(String attributeName,
String value)
Sets the String-valued attribute with the given name. |
void |
setAttributes(Map attributes)
Sets the attributes of this launch configuration to be the ones contained in the given map. |
void |
setContainer(IContainer container)
Sets the container this launch configuration will be stored in when saved. |
void |
setMappedResources(IResource[] resources)
Sets the resources associated with this launch configuration, possibly null .
|
void |
setModes(Set modes)
Set the launch modes for this configuration. |
void |
setPreferredLaunchDelegate(Set modes,
String delegateId)
Set the preferred launch delegates' id for the given mode set. |
Methods inherited from interface org.eclipse.debug.core.ILaunchConfiguration |
---|
contentsEqual, copy, delete, exists, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getCategory, getFile, getLocation, getMappedResources, getMemento, getModes, getName, getPreferredDelegate, getType, getWorkingCopy, isLocal, isMigrationCandidate, isReadOnly, isWorkingCopy, launch, launch, launch, migrate, supportsMode |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
public boolean isDirty()
public ILaunchConfiguration doSave() throws CoreException
Since 3.3, if this is a nested working copy, the contents of this working copy are saved to the parent working copy and the parent working copy is returned without effecting the original launch configuration.
CoreException
- if an exception occurs while
writing this configuration to its underlying file.public void setAttribute(String attributeName, int value)
attributeName
- the name of the attribute, cannot be null
value
- the valuepublic void setAttribute(String attributeName, String value)
null
, the attribute is removed from
this launch configuration.
attributeName
- the name of the attribute, cannot be null
value
- the value, or null
if the attribute is to be undefinedpublic void setAttribute(String attributeName, List value)
java.util.List
-valued attribute with the given name.
The specified List must contain only String-valued entries.
If the value is null
, the attribute is removed from
this launch configuration.
attributeName
- the name of the attribute, cannot be null
value
- the value, or null
if the attribute is to be undefinedpublic void setAttribute(String attributeName, Map value)
java.util.Map
-valued attribute with the given name.
The specified Map must contain only String keys and String values.
If the value is null
, the attribute is removed from
this launch configuration.
attributeName
- the name of the attribute, cannot be null
value
- the value, or null
if the attribute is to be undefinedpublic void setAttribute(String attributeName, boolean value)
attributeName
- the name of the attribute, cannot be null
value
- the valuepublic ILaunchConfiguration getOriginal()
null
if this is a new
working copy created from a launch configuration type.
null
public void rename(String name)
null
. Has no effect if the name
is the same as the current name. If this working copy is based
on an existing launch configuration, this will cause
the underlying launch configuration file to be renamed when
this working copy is saved.
name
- the new name for this configurationpublic void setContainer(IContainer container)
null
, this configuration
will be stored locally with the workspace. The specified
container must exist, if specified.
If this configuration is changed from local to non-local, a file will be created in the specified container when saved. The local file associated with this configuration will be deleted.
If this configuration is changed from non-local to local, a file will be created locally when saved. The original file associated with this configuration in the workspace will be deleted.
container
- the container in which to store this
launch configuration, or null
if this
configuration is to be stored locallypublic void setAttributes(Map attributes)
String
, Integer
, or
Boolean
, List
, Map
. Attributes
previously set on this launch configuration but not included in the given
map are considered to be removals. Setting the given map to be
null
is equivalent to removing all attributes.
attributes
- a map of attribute names to attribute values.
Attribute names are not allowed to be null
public void setMappedResources(IResource[] resources)
null
.
Clients contributing launch configuration types are responsible for maintaining
resource mappings.
resources
- the resource to map to this launch configuration or null
public void setModes(Set modes)
Setting launch modes on a configuration allows the configuration to be launched in a mixed mode - for example, debug and profile.
modes
- launch mode identifiers to set on this configuration
or null
to clear mode settingspublic void setPreferredLaunchDelegate(Set modes, String delegateId)
null
as a delegate
id will cause the mapping for the specified mode set (if any) to be removed.
modes
- the set of modes to set this delegate id fordelegateId
- the id of the delegate to associate as preferred for the specified mode set
or null
to clear the settingpublic void addModes(Set modes)
Setting launch modes on a configuration allows the configuration to be launched in a mixed mode - for example, debug and profile.
modes
- launch mode identifiers to append to the current set of
launch modes set on this configurationpublic void removeModes(Set modes)
Setting launch modes on a configuration allows the configuration to be launched in a mixed mode - for example, debug and profile.
modes
- launch mode identifiers to remove from the current set of
launch modes set on this configurationpublic ILaunchConfigurationWorkingCopy getParent()
null
if this working
copy is not a nested copy of another working copy.
null
|
Eclipse Platform Release 3.3 |
|||||||||||
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, 2007. All rights reserved.