Class CommonTab
- java.lang.Object
-
- org.eclipse.debug.ui.AbstractLaunchConfigurationTab
-
- org.eclipse.debug.ui.CommonTab
-
- All Implemented Interfaces:
IPrototypeAttributesLabelProvider,ILaunchConfigurationTab,ILaunchConfigurationTab2
public class CommonTab extends AbstractLaunchConfigurationTab
Launch configuration tab used to specify the location a launch configuration is stored in, whether it should appear in the favorites list, and perspective switching behavior for an associated launch.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.
- Since:
- 2.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description CommonTab()Constructs a new tab with default context help.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivated(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.booleancanSave()Returns whether this tab is in a state that allows the launch configuration whose values this tab is showing to be saved.voidcreateControl(Composite parent)Creates the top level control for this launch configuration tab under the given parent composite.protected voidcreateLaunchInBackgroundComponent(Composite parent)Creates the controls needed to edit the launch in background attribute of an external toolvoiddeactivated(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.StringgetId()Returns this tab's unique identifier ornullif none.ImagegetImage()Returns the image for this tab, ornullif noneprotected org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManagergetLaunchConfigurationManager()Convenience accessorStringgetName()Returns the name of this tab.protected voidinitializeAttributes()Initialize attributes labels.voidinitializeFrom(ILaunchConfiguration configuration)Initializes this tab's controls with values from the given launch configuration.static booleanisLaunchInBackground(ILaunchConfiguration configuration)Returns whether the given configuration should be launched in the background.booleanisValid(ILaunchConfiguration config)Returns whether this tab is in a valid state in the context of the specified launch configuration.voidperformApply(ILaunchConfigurationWorkingCopy configuration)Copies values from this tab into the given launch configuration.voidsetDefaults(ILaunchConfigurationWorkingCopy config)Initializes the given launch configuration with default values for this tab.protected voidupdateLaunchInBackground(ILaunchConfiguration configuration)Updates the launch on background check button-
Methods inherited from class org.eclipse.debug.ui.AbstractLaunchConfigurationTab
createCheckButton, createPushButton, createRadioButton, createSeparator, createUpdateJob, createVerticalSpacer, dispose, getAttributeLabel, getAttributesLabelsForPrototype, getControl, getErrorMessage, getHelpContextId, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, getUpdateJobDelay, getWarningMessage, isDirty, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setHelpContextId, setLaunchConfigurationDialog, setMessage, setWarningMessage, updateLaunchConfigurationDialog
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.debug.ui.ILaunchConfigurationTab
OkToLeaveTab, postApply
-
-
-
-
Method Detail
-
createControl
public void createControl(Composite parent)
Description 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
-
createLaunchInBackgroundComponent
protected void createLaunchInBackgroundComponent(Composite parent)
Creates the controls needed to edit the launch in background attribute of an external tool- Parameters:
parent- the composite to create the controls in
-
initializeFrom
public void initializeFrom(ILaunchConfiguration configuration)
Description 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
-
updateLaunchInBackground
protected void updateLaunchInBackground(ILaunchConfiguration configuration)
Updates the launch on background check button- Parameters:
configuration- the local launch configuration
-
isLaunchInBackground
public static boolean isLaunchInBackground(ILaunchConfiguration configuration)
Returns whether the given configuration should be launched in the background.- Parameters:
configuration- the configuration- Returns:
- whether the configuration is configured to launch in the background
-
getLaunchConfigurationManager
protected org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager getLaunchConfigurationManager()
Convenience accessor- Returns:
- the singleton
LaunchConfigurationManager
-
isValid
public boolean isValid(ILaunchConfiguration config)
Description copied from interface:ILaunchConfigurationTabReturns whether this tab is in a valid state in the context of the specified launch configuration.This information is typically used by the launch configuration dialog to decide when it is okay to launch.
- Specified by:
isValidin interfaceILaunchConfigurationTab- Overrides:
isValidin classAbstractLaunchConfigurationTab- Parameters:
config- launch configuration which provides context for validating this tab. This value must not benull.- Returns:
- whether this tab is in a valid state
- See Also:
ILaunchConfigurationTab.isValid(ILaunchConfiguration)
-
setDefaults
public void setDefaults(ILaunchConfigurationWorkingCopy config)
Description 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:
config- launch configuration
-
performApply
public void performApply(ILaunchConfigurationWorkingCopy configuration)
Description copied from interface:ILaunchConfigurationTabCopies values from this tab into the given launch configuration.- Parameters:
configuration- launch configuration
-
getName
public String getName()
Description copied from interface:ILaunchConfigurationTabReturns the name of this tab.- Returns:
- the name of this tab
-
getId
public String getId()
Description 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 classAbstractLaunchConfigurationTab- Returns:
- tab id or
null - Since:
- 3.3
-
canSave
public boolean canSave()
Description copied from interface:ILaunchConfigurationTabReturns whether this tab is in a state that allows the launch configuration whose values this tab is showing to be saved. This differs fromisValid()in thatcanSave()determines if this tab prevents the current launch configuration from being saved, whereasisValid()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.
- Specified by:
canSavein interfaceILaunchConfigurationTab- Overrides:
canSavein classAbstractLaunchConfigurationTab- Returns:
- whether this tab is in a state that allows the current launch configuration to be saved
- See Also:
ILaunchConfigurationTab.canSave()
-
getImage
public Image getImage()
Description copied from interface:ILaunchConfigurationTabReturns the image for this tab, ornullif none- Specified by:
getImagein interfaceILaunchConfigurationTab- Overrides:
getImagein classAbstractLaunchConfigurationTab- Returns:
- the image for this tab, or
nullif none - See Also:
ILaunchConfigurationTab.getImage()
-
activated
public void activated(ILaunchConfigurationWorkingCopy workingCopy)
Description 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 interfaceILaunchConfigurationTab- Overrides:
activatedin classAbstractLaunchConfigurationTab- Parameters:
workingCopy- the launch configuration being edited- See Also:
ILaunchConfigurationTab.activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
-
deactivated
public void deactivated(ILaunchConfigurationWorkingCopy workingCopy)
Description 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 interfaceILaunchConfigurationTab- Overrides:
deactivatedin classAbstractLaunchConfigurationTab- Parameters:
workingCopy- the launch configuration being edited- See Also:
ILaunchConfigurationTab.deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
-
initializeAttributes
protected void initializeAttributes()
Description copied from class:AbstractLaunchConfigurationTabInitialize attributes labels.- Overrides:
initializeAttributesin classAbstractLaunchConfigurationTab- Since:
- 3.13
-
-