Eclipse Platform
2.0

org.eclipse.debug.ui
Class CommonTab

java.lang.Object
  |
  +--org.eclipse.debug.ui.AbstractLaunchConfigurationTab
        |
        +--org.eclipse.debug.ui.CommonTab
All Implemented Interfaces:
ILaunchConfigurationTab

public class CommonTab
extends AbstractLaunchConfigurationTab

Common launch configuration tab to specify the location a launch configuration is stored, whether it should appear in the favorites list, and perspective switching for an associated launch.

Clients may instantiate this class. This class is not intended to be subclassed.

Since:
2.0

Constructor Summary
CommonTab()
           
 
Method Summary
 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.
 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 setDefaults(ILaunchConfigurationWorkingCopy config)
          Initializes the given launch configuration with default values for this tab.
 
Methods inherited from class org.eclipse.debug.ui.AbstractLaunchConfigurationTab
createPushButton, createRadioButton, createVerticalSpacer, dispose, getControl, getErrorMessage, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, launched, setControl, setErrorMessage, setLaunchConfigurationDialog, setMessage, updateLaunchConfigurationDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonTab

public CommonTab()
Method Detail

createControl

public void createControl(Composite parent)
Description copied from interface: ILaunchConfigurationTab
Creates the top level control for this launch configuration tab under the given parent composite. This method is called once on tab creation, after setLaunchConfigurationDialog is called.

Implementors are responsible for ensuring that the created control can be accessed via getControl

Parameters:
parent - the parent composite
See Also:
ILaunchConfigurationTab.createControl(Composite)

initializeFrom

public void initializeFrom(ILaunchConfiguration configuration)
Description copied from interface: ILaunchConfigurationTab
Initializes 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
See Also:
ILaunchConfigurationTab.initializeFrom(ILaunchConfiguration)

isValid

public boolean isValid(ILaunchConfiguration config)
Description copied from interface: ILaunchConfigurationTab
Returns 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:
isValid in interface ILaunchConfigurationTab
Overrides:
isValid in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.isValid(ILaunchConfiguration)

setDefaults

public void setDefaults(ILaunchConfigurationWorkingCopy config)
Description copied from interface: ILaunchConfigurationTab
Initializes 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, to support single-click launching.

Parameters:
config - launch configuration
See Also:
ILaunchConfigurationTab.setDefaults(ILaunchConfigurationWorkingCopy)

performApply

public void performApply(ILaunchConfigurationWorkingCopy configuration)
Description copied from interface: ILaunchConfigurationTab
Copies values from this tab into the given launch configuration.

Parameters:
configuration - launch configuration
See Also:
ILaunchConfigurationTab.performApply(ILaunchConfigurationWorkingCopy)

getName

public String getName()
Description copied from interface: ILaunchConfigurationTab
Returns the name of this tab.

Returns:
the name of this tab
See Also:
ILaunchConfigurationTab.getName()

canSave

public boolean canSave()
Description copied from interface: ILaunchConfigurationTab
Returns whether this tab is in a state that allows the launch configuration whose values this tab is showing to be saved. This differs from 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.

Specified by:
canSave in interface ILaunchConfigurationTab
Overrides:
canSave in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.canSave()

getImage

public Image getImage()
Description copied from interface: ILaunchConfigurationTab
Returns the image for this tab, or null if none

Specified by:
getImage in interface ILaunchConfigurationTab
Overrides:
getImage in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.getImage()

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.