|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A launch configuration tab is used to edit/view attributes of a specific type of launch configuration. Launch configurations are presented in a dialog, with a tab folder. Each tab manipulates one ore more attributes of a launch configuration.
The tab's lifecycle begins when setLaunchConfigurationDialog(ILaunchConfigurationDialog)
is called. A tab may then be asked repeatedly to initialize its
controls to display values for a launch configuration (see
initializeFrom(ILaunchConfiguration)
), and to
apply its current settings to a launch configuration (see
performApply(ILaunchConfigurationWorkingCopy)
).
While a user manipulates a tab's controls, the tab is not
intended to update a launch configuration. Updating a launch
configuration should only be performed when performApply
is called. To end a tab's lifecyle, dispose()
will
be called. Note that a tab can be disposed before its control
has been created.
To support single-click launching, tabs are required to initialize
default values into launch configurations (possibly when their controls
have not been created). See setDefault(ILaunchConfigurationWorkingCopy)
.
As well, the method launched
can be called when the tab's
control does not exist.
This interface is intended to be implemented by clients.
ILaunchConfigurationType
,
ILaunchConfiguration
Method Summary | |
boolean |
canSave()
Returns whether this tab is in a state that allows the launch configuration whose values this tab is showing to be saved. |
void |
createControl(Composite parent)
Creates the top level control for this launch configuration tab under the given parent composite. |
void |
dispose()
Notifies this launch configuration tab that it has been disposed. |
Control |
getControl()
Returns the top level control for this tab. |
String |
getErrorMessage()
Returns the current error message for this tab. |
Image |
getImage()
Returns the image for this tab, or null if none |
String |
getMessage()
Returns the current message for this tab. |
String |
getName()
Returns the name of this tab. |
void |
initializeFrom(ILaunchConfiguration configuration)
Initializes this tab's controls with values from the given launch configuration. |
boolean |
isValid(ILaunchConfiguration launchConfig)
Returns whether this tab is in a valid state in the context of the specified launch configuration. |
void |
launched(ILaunch launch)
Notifies this tab that the specified configuration has been launched, resulting in the given launch. |
void |
performApply(ILaunchConfigurationWorkingCopy configuration)
Copies values from this tab into the given launch configuration. |
void |
setDefaults(ILaunchConfigurationWorkingCopy configuration)
Initializes the given launch configuration with default values for this tab. |
void |
setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog)
Sets the launch configuration dialog that hosts this tab. |
Method Detail |
public void createControl(Composite parent)
setLaunchConfigurationDialog
is called.
Implementors are responsible for ensuring that
the created control can be accessed via getControl
parent
- the parent compositepublic Control getControl()
May return null
if the control
has not been created yet.
null
public void setDefaults(ILaunchConfigurationWorkingCopy configuration)
configuration
- launch configurationpublic void initializeFrom(ILaunchConfiguration configuration)
configuration
- launch configurationpublic void dispose()
public void performApply(ILaunchConfigurationWorkingCopy configuration)
configuration
- launch configurationpublic String getErrorMessage()
null
to indicate no error message.
An error message should describe some error state, as opposed to a message which may simply provide instruction or information to the user.
null
if nonepublic String getMessage()
A message provides instruction or information to the user, as opposed to an error message which should describe some error state.
null
if nonepublic boolean isValid(ILaunchConfiguration launchConfig)
This information is typically used by the launch configuration dialog to decide when it is okay to launch.
launchConfig
- launch configuration which provides context for validating this tab.
This value must not be null
.
public boolean canSave()
isValid()
in that canSave()
determines if this tab prevents the current launch configuration from being saved, whereas
isValid()
determines if this tab prevents the current launch configuration from
being launched.
This information is typically used by the launch configuration dialog to decide when it is okay to save a launch configuration.
public void setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog)
dialog
- launch configuration dialogpublic void launched(ILaunch launch)
launch
- the result of launching the current
launch configurationpublic String getName()
public Image getImage()
null
if none
null
if none
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |