public abstract class AbstractLaunchConfigurationTab extends Object implements ILaunchConfigurationTab2
Clients may subclass this class.
ILaunchConfigurationTab| Constructor and Description |
|---|
AbstractLaunchConfigurationTab() |
| Modifier and Type | Method and Description |
|---|---|
void |
activated(ILaunchConfigurationWorkingCopy workingCopy)
This method was added to the
ILaunchConfigurationTab interface
in the 3.0 release to allow tabs to distinguish between a tab being activated
and a tab group be initialized for the first time, from a selected launch
configuration. |
boolean |
canSave()
Returns whether this tab is in a state that allows the launch configuration whose values
this tab is showing to be saved.
|
protected Button |
createCheckButton(Composite parent,
String label)
Creates and returns a new check button with the given
label.
|
protected Button |
createPushButton(Composite parent,
String label,
Image image)
Creates and returns a new push button with the given
label and/or image.
|
protected Button |
createRadioButton(Composite parent,
String label)
Creates and returns a new radio button with the given
label and/or image.
|
protected void |
createSeparator(Composite comp,
int colSpan)
Create a horizontal separator.
|
protected Job |
createUpdateJob()
Creates and returns a job used to update the launch configuration dialog
for this tab.
|
protected void |
createVerticalSpacer(Composite comp,
int colSpan)
Creates vertical space in the parent
Composite |
void |
deactivated(ILaunchConfigurationWorkingCopy workingCopy)
This method was added to the
ILaunchConfigurationTab interface
in the 3.0 release to allow tabs to distinguish between a tab being deactivated
and saving its attributes to a launch configuration. |
void |
dispose()
By default, do nothing.
|
Control |
getControl()
Returns the top level control for this tab.
|
String |
getErrorMessage()
Returns the current error message for this tab.
|
String |
getHelpContextId()
Returns the help context id for this tab or
null. |
String |
getId()
Returns this tab's unique identifier or
null if none. |
Image |
getImage()
Returns the image for this tab, or
null if none |
protected ILaunchConfigurationDialog |
getLaunchConfigurationDialog()
Returns the dialog this tab is contained in, or
null if not yet set. |
protected ILaunchManager |
getLaunchManager()
Convenience method to return the launch manager.
|
String |
getMessage()
Returns the current message for this tab.
|
protected Shell |
getShell()
Returns the shell this tab is contained in, or
null. |
protected long |
getUpdateJobDelay()
Return the time delay that should be used when scheduling the
update job.
|
String |
getWarningMessage()
Returns a warning message to be displayed to the user
or
null if none is present. |
protected boolean |
isDirty()
Returns if this tab has pending changes that need to be saved.
|
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)
Deprecated.
As of R3.0, this method is no longer called by the launch
framework. Since tabs do not exist when launching is performed elsewhere
than the launch dialog, this method cannot be relied upon for launching
functionality.
|
protected void |
scheduleUpdateJob()
Schedules the update job to run for this tab based on this tab's delay.
|
protected void |
setAttribute(String attribute,
ILaunchConfigurationWorkingCopy configuration,
boolean value,
boolean defaultValue)
Convenience method to set a boolean attribute of on a launch
configuration.
|
protected void |
setControl(Control control)
Sets the control to be displayed in this tab.
|
protected void |
setDirty(boolean dirty)
Sets the dirty state of the tab.
|
protected void |
setErrorMessage(String errorMessage)
Sets this page's error message, possibly
null. |
void |
setHelpContextId(String id)
Sets the help context id for this tab.
|
void |
setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog)
Sets the launch configuration dialog that hosts this tab.
|
protected void |
setMessage(String message)
Sets this page's message, possibly
null. |
protected void |
setWarningMessage(String warningMessage)
Sets this page's warning message, possibly
null. |
protected void |
updateLaunchConfigurationDialog()
Updates the buttons and message in this page's launch
configuration dialog.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateControl, getName, initializeFrom, performApply, setDefaultsprotected ILaunchConfigurationDialog getLaunchConfigurationDialog()
null if not yet set.nullprotected void updateLaunchConfigurationDialog()
public Control getControl()
ILaunchConfigurationTab
May return null if the control
has not been created yet.
getControl in interface ILaunchConfigurationTabnullILaunchConfigurationTab.getControl()protected void setControl(Control control)
control - the control for this tabpublic String getErrorMessage()
ILaunchConfigurationTabnull 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.
getErrorMessage in interface ILaunchConfigurationTabnull if noneILaunchConfigurationTab.getErrorMessage()public String getWarningMessage()
ILaunchConfigurationTab2null if none is present.getWarningMessage in interface ILaunchConfigurationTab2null if none is present.ILaunchConfigurationTab2.getWarningMessage()public String getMessage()
ILaunchConfigurationTabA message provides instruction or information to the user, as opposed to an error message which should describe some error state.
getMessage in interface ILaunchConfigurationTabnull if noneILaunchConfigurationTab.getMessage()@Deprecated public void launched(ILaunch launch)
launched in interface ILaunchConfigurationTablaunch - the result of launching the current
launch configurationILaunchConfigurationTab.launched(ILaunch)public void setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog)
ILaunchConfigurationTabsetLaunchConfigurationDialog in interface ILaunchConfigurationTabdialog - launch configuration dialogILaunchConfigurationTab.setLaunchConfigurationDialog(ILaunchConfigurationDialog)protected void setErrorMessage(String errorMessage)
null.errorMessage - the error message or nullprotected void setWarningMessage(String warningMessage)
null.warningMessage - the warning message or nullprotected void setMessage(String message)
null.message - the message or nullprotected ILaunchManager getLaunchManager()
public void dispose()
dispose in interface ILaunchConfigurationTabILaunchConfigurationTab.dispose()protected Shell getShell()
null.nullprotected Button createPushButton(Composite parent, String label, Image image)
parent - parent controllabel - button label or nullimage - image of nullprotected Button createRadioButton(Composite parent, String label)
parent - parent controllabel - button label or nullprotected Button createCheckButton(Composite parent, String label)
parent - the parent compositelabel - the button labelpublic boolean canSave()
ILaunchConfigurationTabisValid() 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.
canSave in interface ILaunchConfigurationTabILaunchConfigurationTab.canSave()public boolean isValid(ILaunchConfiguration launchConfig)
ILaunchConfigurationTabThis information is typically used by the launch configuration dialog to decide when it is okay to launch.
isValid in interface ILaunchConfigurationTablaunchConfig - launch configuration which provides context for validating this tab.
This value must not be null.ILaunchConfigurationTab.isValid(ILaunchConfiguration)protected void createVerticalSpacer(Composite comp, int colSpan)
Compositecomp - the parent to add the vertical space tocolSpan - the number of line of vertical space to addprotected void createSeparator(Composite comp, int colSpan)
comp - parent widgetcolSpan - number of columns to spanpublic Image getImage()
ILaunchConfigurationTabnull if nonegetImage in interface ILaunchConfigurationTabnull if noneILaunchConfigurationTab.getImage()public String getId()
null if none.
By default, null is returned. Subclasses should override
as necessary.
Tab identifiers allow contributed tabs to be ordered relative to one another.
nullprotected void setAttribute(String attribute, ILaunchConfigurationWorkingCopy configuration, boolean value, boolean defaultValue)
null.attribute - attribute identifierconfiguration - the configuration on which to set the attributevalue - the value of the attributedefaultValue - the default value of the attributeprotected boolean isDirty()
protected void setDirty(boolean dirty)
dirty - what to set the dirty flag topublic void activated(ILaunchConfigurationWorkingCopy workingCopy)
ILaunchConfigurationTab interface
in the 3.0 release to allow tabs to distinguish between a tab being activated
and a tab group be initialized for the first time, from a selected launch
configuration. To maintain backwards compatible behavior, the default
implementation provided, calls this tab's initializeFrom method.
Tabs should override this method as required.
The launch tab framework was originally designed to take care of inter tab
communication by applying attributes from the active tab to the launch configuration
being edited, when a tab is exited, and by initializing a tab when activated.
The addition of the methods activated and deactivated
allow tabs to determine the appropriate course of action.
activated in interface ILaunchConfigurationTabworkingCopy - the launch configuration being editedILaunchConfigurationTab.activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)public void deactivated(ILaunchConfigurationWorkingCopy workingCopy)
ILaunchConfigurationTab interface
in the 3.0 release to allow tabs to distinguish between a tab being deactivated
and saving its attributes to a launch configuration. To maintain backwards
compatible behavior, the default implementation provided, calls this tab's
performApply method. Tabs should override this method as required.
The launch tab framework was originally designed to take care of inter tab
communication by applying attributes from the active tab to the launch configuration
being edited, when a tab is exited, and by initializing a tab when activated.
The addition of the methods activated and deactivated
allow tabs to determine the appropriate course of action.
deactivated in interface ILaunchConfigurationTabworkingCopy - the launch configuration being editedILaunchConfigurationTab.deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)protected void scheduleUpdateJob()
protected Job createUpdateJob()
protected long getUpdateJobDelay()
public void setHelpContextId(String id)
Not all tabs honor this setting, but if this method is called prior
to ILaunchConfigurationTab.createControl(Composite), a tab implementation may use this
to set the context help associated with this tab.
id - help context idpublic String getHelpContextId()
null.null if unknown.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.