public class EnvironmentTab 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.
This class may be instantiated.
Modifier and Type | Class and Description |
---|---|
protected class |
EnvironmentTab.EnvironmentVariableContentProvider
Content provider for the environment table
|
class |
EnvironmentTab.EnvironmentVariableLabelProvider
Label provider for the environment table
|
Modifier and Type | Field and Description |
---|---|
protected Button |
appendEnvironment |
protected Button |
envAddButton |
protected Button |
envEditButton |
protected TableViewer |
environmentTable |
protected Button |
envRemoveButton |
protected Button |
envSelectButton |
protected String[] |
envTableColumnHeaders |
protected static String |
P_VALUE |
protected static String |
P_VARIABLE |
protected Button |
replaceEnvironment |
Constructor and Description |
---|
EnvironmentTab()
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. |
protected boolean |
addVariable(org.eclipse.debug.internal.ui.launchConfigurations.EnvironmentVariable variable)
Attempts to add the given variable.
|
protected void |
createAppendReplace(Composite parent)
Creates and configures the widgets which allow the user to
choose whether the specified environment should be appended
to the native environment or if it should completely replace it.
|
void |
createControl(Composite parent)
Creates the top level control for this launch configuration
tab under the given parent composite.
|
protected void |
createEnvironmentTable(Composite parent)
Creates and configures the table that displayed the key/value
pairs that comprise the environment.
|
protected void |
createTableButtons(Composite parent)
Creates the add/edit/remove buttons for the environment table
|
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. |
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.
|
protected void |
handleEnvAddButtonSelected()
Adds a new environment variable to the table.
|
protected void |
handleTableSelectionChanged(SelectionChangedEvent event)
Responds to a selection changed event in the environment table
|
void |
initializeFrom(ILaunchConfiguration configuration)
Initializes this tab's controls with values from the given
launch configuration.
|
void |
performApply(ILaunchConfigurationWorkingCopy configuration)
Stores the environment in the given configuration
|
void |
setDefaults(ILaunchConfigurationWorkingCopy configuration)
Initializes the given launch configuration with
default values for this tab.
|
protected void |
updateAppendReplace()
Updates the enablement of the append/replace widgets.
|
protected void |
updateEnvironment(ILaunchConfiguration configuration)
Updates the environment table for the given launch configuration
|
canSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createUpdateJob, createVerticalSpacer, dispose, getControl, getErrorMessage, getHelpContextId, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, getUpdateJobDelay, getWarningMessage, isDirty, isValid, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setHelpContextId, setLaunchConfigurationDialog, setMessage, setWarningMessage, updateLaunchConfigurationDialog
protected TableViewer environmentTable
protected String[] envTableColumnHeaders
protected static final String P_VARIABLE
protected static final String P_VALUE
protected Button envAddButton
protected Button envEditButton
protected Button envRemoveButton
protected Button appendEnvironment
protected Button replaceEnvironment
protected Button envSelectButton
public EnvironmentTab()
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 compositeprotected void createAppendReplace(Composite parent)
parent
- the composite in which the widgets should be createdprotected void updateAppendReplace()
protected void createEnvironmentTable(Composite parent)
parent
- the composite in which the table should be createdprotected void handleTableSelectionChanged(SelectionChangedEvent event)
event
- the selection change eventprotected void createTableButtons(Composite parent)
parent
- the composite in which the buttons should be createdprotected void handleEnvAddButtonSelected()
protected boolean addVariable(org.eclipse.debug.internal.ui.launchConfigurations.EnvironmentVariable variable)
variable
- the variable to addprotected void updateEnvironment(ILaunchConfiguration configuration)
configuration
- the configuration to use as input for the backing tablepublic void setDefaults(ILaunchConfigurationWorkingCopy configuration)
ILaunchConfigurationTab
configuration
- launch configurationpublic void initializeFrom(ILaunchConfiguration configuration)
ILaunchConfigurationTab
configuration
- launch configurationpublic void performApply(ILaunchConfigurationWorkingCopy configuration)
configuration
- launch configurationILaunchConfigurationTab.performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
public String getName()
ILaunchConfigurationTab
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 Image getImage()
ILaunchConfigurationTab
null
if nonegetImage
in interface ILaunchConfigurationTab
getImage
in class AbstractLaunchConfigurationTab
null
if noneILaunchConfigurationTab.getImage()
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)
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.