public class PrototypeTab extends AbstractLaunchConfigurationTab
Clients may call AbstractLaunchConfigurationTab.setHelpContextId(String)
on this tab prior to
control creation to alter the default context help associated with this tab.
Clients may instantiate this class only if the associated launch configuration type allows prototypes.
Constructor and Description |
---|
PrototypeTab()
Constructs a new tab with default context help.
|
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.
|
void |
createControl(Composite parent)
Creates the top level control for this launch configuration
tab under the given 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.
|
String |
getId()
Returns this tab's unique identifier or
null if none. |
Image |
getImage()
Returns the image for this tab, or
null if none |
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 config)
Returns whether this tab is in a valid state in the context of the specified launch configuration.
|
void |
performApply(ILaunchConfigurationWorkingCopy configuration)
Copies values from this tab into the given
launch configuration.
|
void |
postApply()
Perform the changes after apply.
|
void |
setDefaults(ILaunchConfigurationWorkingCopy config)
Initializes the given launch configuration with
default values for this tab.
|
createCheckButton, createPushButton, createRadioButton, createSeparator, createUpdateJob, createVerticalSpacer, getAttributeLabel, getAttributesLabelsForPrototype, getControl, getErrorMessage, getHelpContextId, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, getUpdateJobDelay, getWarningMessage, initializeAttributes, isDirty, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setHelpContextId, setLaunchConfigurationDialog, setMessage, setWarningMessage, updateLaunchConfigurationDialog
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
OkToLeaveTab
public PrototypeTab()
public void createControl(Composite parent)
ILaunchConfigurationTab
setLaunchConfigurationDialog
is called.
Implementors are responsible for ensuring that
the created control can be accessed via getControl
parent
- the parent compositepublic void initializeFrom(ILaunchConfiguration configuration)
ILaunchConfigurationTab
configuration
- launch configurationpublic void dispose()
AbstractLaunchConfigurationTab
dispose
in interface ILaunchConfigurationTab
dispose
in class AbstractLaunchConfigurationTab
ILaunchConfigurationTab.dispose()
public void activated(ILaunchConfigurationWorkingCopy workingCopy)
AbstractLaunchConfigurationTab
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 ILaunchConfigurationTab
activated
in class AbstractLaunchConfigurationTab
workingCopy
- the launch configuration being editedILaunchConfigurationTab.activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
public void deactivated(ILaunchConfigurationWorkingCopy workingCopy)
AbstractLaunchConfigurationTab
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 ILaunchConfigurationTab
deactivated
in class AbstractLaunchConfigurationTab
workingCopy
- the launch configuration being editedILaunchConfigurationTab.deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
public boolean isValid(ILaunchConfiguration config)
ILaunchConfigurationTab
This information is typically used by the launch configuration dialog to decide when it is okay to launch.
isValid
in interface ILaunchConfigurationTab
isValid
in class AbstractLaunchConfigurationTab
config
- launch configuration which provides context for validating this tab.
This value must not be null
.ILaunchConfigurationTab.isValid(ILaunchConfiguration)
public void setDefaults(ILaunchConfigurationWorkingCopy config)
ILaunchConfigurationTab
config
- launch configurationpublic void performApply(ILaunchConfigurationWorkingCopy configuration)
ILaunchConfigurationTab
configuration
- launch configurationpublic void postApply()
ILaunchConfigurationTab
public String getName()
ILaunchConfigurationTab
public Image getImage()
ILaunchConfigurationTab
null
if nonegetImage
in interface ILaunchConfigurationTab
getImage
in class AbstractLaunchConfigurationTab
null
if noneILaunchConfigurationTab.getImage()
public String getId()
AbstractLaunchConfigurationTab
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.
getId
in class AbstractLaunchConfigurationTab
null
AbstractLaunchConfigurationTab.getId()
public boolean canSave()
ILaunchConfigurationTab
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.
canSave
in interface ILaunchConfigurationTab
canSave
in class AbstractLaunchConfigurationTab
ILaunchConfigurationTab.canSave()
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.