Class EnvironmentTab
- All Implemented Interfaces:
- IPrototypeAttributesLabelProvider,- ILaunchConfigurationTab,- ILaunchConfigurationTab2
 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.
- Since:
- 3.0
- Restriction:
- This class is not intended to be sub-classed by clients.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classContent provider for the environment tableclassLabel provider for the environment table
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidactivated(ILaunchConfigurationWorkingCopy workingCopy) This method was added to theILaunchConfigurationTabinterface 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 booleanaddVariable(org.eclipse.debug.internal.ui.launchConfigurations.EnvironmentVariable variable) Attempts to add the given variable.protected intaddVariables(List<org.eclipse.debug.internal.ui.launchConfigurations.EnvironmentVariable> variables) Attempts to add the given variables.protected voidcreateAppendReplace(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.voidcreateControl(Composite parent) Creates the top level control for this launch configuration tab under the given parent composite.protected voidcreateEnvironmentTable(Composite parent) Creates and configures the table that displayed the key/value pairs that comprise the environment.protected voidcreateTableButtons(Composite parent) Creates the add/edit/remove buttons for the environment tablevoiddeactivated(ILaunchConfigurationWorkingCopy workingCopy) This method was added to theILaunchConfigurationTabinterface in the 3.0 release to allow tabs to distinguish between a tab being deactivated and saving its attributes to a launch configuration.getId()Returns this tab's unique identifier ornullif none.getImage()Returns the image for this tab, ornullif nonegetName()Returns the name of this tab.protected voidAdds a new environment variable to the table.protected voidResponds to a selection changed event in the environment tableprotected voidInitialize attributes labels.voidinitializeFrom(ILaunchConfiguration configuration) Initializes this tab's controls with values from the given launch configuration.voidperformApply(ILaunchConfigurationWorkingCopy configuration) Stores the environment in the given configurationvoidsetDefaults(ILaunchConfigurationWorkingCopy configuration) Initializes the given launch configuration with default values for this tab.protected voidUpdates the enablement of the append/replace widgets.protected voidupdateEnvironment(ILaunchConfiguration configuration) Updates the environment table for the given launch configurationMethods inherited from class org.eclipse.debug.ui.AbstractLaunchConfigurationTabcanSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createUpdateJob, createVerticalSpacer, dispose, getAttributeLabel, getAttributesLabelsForPrototype, getControl, getErrorMessage, getHelpContextId, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, getUpdateJobDelay, getWarningMessage, isDirty, isValid, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setHelpContextId, setLaunchConfigurationDialog, setMessage, setWarningMessage, updateLaunchConfigurationDialogMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.debug.ui.ILaunchConfigurationTabOkToLeaveTab, postApply
- 
Field Details- 
environmentTable
- 
envTableColumnHeaders
- 
P_VARIABLE- See Also:
 
- 
P_VALUE- See Also:
 
- 
envAddButton
- 
envEditButton
- 
envRemoveButton
- 
envCopyButton- Since:
- 3.14
 
- 
envPasteButton- Since:
- 3.14
 
- 
appendEnvironment
- 
replaceEnvironment
- 
envSelectButton
 
- 
- 
Constructor Details- 
EnvironmentTabpublic EnvironmentTab()Constructs a new tab with default context help.
 
- 
- 
Method Details- 
createControlDescription copied from interface:ILaunchConfigurationTabCreates the top level control for this launch configuration tab under the given parent composite. This method is called once on tab creation, aftersetLaunchConfigurationDialogis called.Implementors are responsible for ensuring that the created control can be accessed via getControl- Parameters:
- parent- the parent composite
 
- 
createAppendReplaceCreates 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.- Parameters:
- parent- the composite in which the widgets should be created
 
- 
updateAppendReplaceprotected void updateAppendReplace()Updates the enablement of the append/replace widgets. The widgets should disable when there are no environment variables specified.
- 
createEnvironmentTableCreates and configures the table that displayed the key/value pairs that comprise the environment.- Parameters:
- parent- the composite in which the table should be created
 
- 
handleTableSelectionChangedResponds to a selection changed event in the environment table- Parameters:
- event- the selection change event
 
- 
createTableButtonsCreates the add/edit/remove buttons for the environment table- Parameters:
- parent- the composite in which the buttons should be created
 
- 
handleEnvAddButtonSelectedprotected void handleEnvAddButtonSelected()Adds a new environment variable to the table.
- 
addVariableprotected boolean addVariable(org.eclipse.debug.internal.ui.launchConfigurations.EnvironmentVariable variable) Attempts to add the given variable. Returns whether the variable was added or not (as when the user answers not to overwrite an existing variable).- Parameters:
- variable- the variable to add
- Returns:
- whether the variable was added
 
- 
addVariablesprotected int addVariables(List<org.eclipse.debug.internal.ui.launchConfigurations.EnvironmentVariable> variables) Attempts to add the given variables. Returns the number of variables added (as when the user answers not to overwrite an existing variable).- Parameters:
- variables- the variables to add
- Returns:
- the number of variables added
- Since:
- 3.14
 
- 
updateEnvironmentUpdates the environment table for the given launch configuration- Parameters:
- configuration- the configuration to use as input for the backing table
 
- 
setDefaultsDescription copied from interface:ILaunchConfigurationTabInitializes the given launch configuration with default values for this tab. This method is called when a new launch configuration is created such that the configuration can be initialized with meaningful values. This method may be called before this tab's control is created.- Parameters:
- configuration- launch configuration
 
- 
initializeFromDescription copied from interface:ILaunchConfigurationTabInitializes this tab's controls with values from the given launch configuration. This method is called when a configuration is selected to view or edit, after this tab's control has been created.- Parameters:
- configuration- launch configuration
 
- 
performApplyStores the environment in the given configuration- Parameters:
- configuration- launch configuration
- See Also:
 
- 
getNameDescription copied from interface:ILaunchConfigurationTabReturns the name of this tab.- Returns:
- the name of this tab
 
- 
getIdDescription copied from class:AbstractLaunchConfigurationTabReturns this tab's unique identifier ornullif none. By default,nullis returned. Subclasses should override as necessary.Tab identifiers allow contributed tabs to be ordered relative to one another. - Overrides:
- getIdin class- AbstractLaunchConfigurationTab
- Returns:
- tab id or null
- Since:
- 3.3
- See Also:
 
- 
getImageDescription copied from interface:ILaunchConfigurationTabReturns the image for this tab, ornullif none- Specified by:
- getImagein interface- ILaunchConfigurationTab
- Overrides:
- getImagein class- AbstractLaunchConfigurationTab
- Returns:
- the image for this tab, or nullif none
- See Also:
 
- 
activatedDescription copied from class:AbstractLaunchConfigurationTabThis method was added to theILaunchConfigurationTabinterface 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'sinitializeFrommethod. 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 activatedanddeactivatedallow tabs to determine the appropriate course of action.- Specified by:
- activatedin interface- ILaunchConfigurationTab
- Overrides:
- activatedin class- AbstractLaunchConfigurationTab
- Parameters:
- workingCopy- the launch configuration being edited
- See Also:
 
- 
deactivatedDescription copied from class:AbstractLaunchConfigurationTabThis method was added to theILaunchConfigurationTabinterface 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'sperformApplymethod. 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 activatedanddeactivatedallow tabs to determine the appropriate course of action.- Specified by:
- deactivatedin interface- ILaunchConfigurationTab
- Overrides:
- deactivatedin class- AbstractLaunchConfigurationTab
- Parameters:
- workingCopy- the launch configuration being edited
- See Also:
 
- 
initializeAttributesprotected void initializeAttributes()Description copied from class:AbstractLaunchConfigurationTabInitialize attributes labels.- Overrides:
- initializeAttributesin class- AbstractLaunchConfigurationTab
- Since:
- 3.13
 
 
-