public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab
| Modifier | Constructor and Description |
|---|---|
protected |
WorkingDirectoryBlock(String workingDirectoryAttribteName)
Creates a new WorkingDirectoryBlock for setting a working directory.
|
protected |
WorkingDirectoryBlock(String workingDirectoryAttribteName,
String helpContextId)
Creates a new WorkingDirectoryBlock for setting a working directory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createControl(Composite parent)
Creates the top level control for this launch configuration
tab under the given parent composite.
|
protected IContainer |
getContainer()
Returns the selected workspace container or
null |
protected ILaunchConfiguration |
getLaunchConfiguration()
Returns the launch configuration that this working directory block is using.
|
String |
getName()
Returns the name of this tab.
|
protected abstract IProject |
getProject(ILaunchConfiguration configuration)
Returns the project associated with the specified launch configuration or
null if none. |
protected String |
getWorkingDirectoryText()
Retrieves the path from the text box that has been selected.
|
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.
|
protected void |
log(CoreException e)
Logs exceptions that have been caught by this working directory block.
|
void |
performApply(ILaunchConfigurationWorkingCopy configuration)
Copies values from this tab into the given
launch configuration.
|
void |
setDefaults(ILaunchConfigurationWorkingCopy config)
Sets the default working directory to be used by the launch configuration.
|
protected void |
setDefaultWorkingDir()
Sets the default working directory.
|
protected void |
setDefaultWorkingDirectoryText(String dir)
Sets the text of the default working directory.
|
void |
setEnabled(boolean enabled)
Allows this entire block to be enabled/disabled
|
protected void |
setLaunchConfiguration(ILaunchConfiguration config)
Sets the launch configuration to be used by this working directory block.
|
protected void |
setOtherWorkingDirectoryText(String dir)
Sets the directory of the other working directory to be used.
|
activated, canSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createUpdateJob, createVerticalSpacer, deactivated, dispose, getControl, getErrorMessage, getHelpContextId, getId, getImage, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, getUpdateJobDelay, getWarningMessage, isDirty, launched, scheduleUpdateJob, setAttribute, setControl, setDirty, setErrorMessage, setHelpContextId, setLaunchConfigurationDialog, setMessage, setWarningMessage, updateLaunchConfigurationDialogprotected WorkingDirectoryBlock(String workingDirectoryAttribteName)
workingDirectoryAttribteName - the name of the launch configuration attribute to set the working directory's location, cannot be nullprotected WorkingDirectoryBlock(String workingDirectoryAttribteName, String helpContextId)
workingDirectoryAttribteName - the name of the launch configuration attribute to set the working directory's location, cannot be nullhelpContextId - the help context id to use to hook onto the help systempublic final void createControl(Composite parent)
ILaunchConfigurationTabsetLaunchConfigurationDialog
is called.
Implementors are responsible for ensuring that
the created control can be accessed via getControl
parent - the parent compositeprotected IContainer getContainer()
nullnullprotected void setDefaultWorkingDir()
protected abstract IProject getProject(ILaunchConfiguration configuration) throws CoreException
null if none.configuration - the launch configuration that has been set to this working directory blockCoreException - if an error occurred while retrieving the project from the launch configurationpublic boolean isValid(ILaunchConfiguration config)
ILaunchConfigurationTabThis information is typically used by the launch configuration dialog to decide when it is okay to launch.
isValid in interface ILaunchConfigurationTabisValid in class AbstractLaunchConfigurationTabconfig - launch configuration which provides context for validating this tab.
This value must not be null.ILaunchConfigurationTab.isValid(ILaunchConfiguration)public void setDefaults(ILaunchConfigurationWorkingCopy config)
config - launch configurationILaunchConfigurationTab.setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)public void initializeFrom(ILaunchConfiguration configuration)
ILaunchConfigurationTabconfiguration - launch configurationpublic void performApply(ILaunchConfigurationWorkingCopy configuration)
ILaunchConfigurationTabconfiguration - launch configurationpublic String getName()
ILaunchConfigurationTabprotected void log(CoreException e)
e - the exception to logprotected final String getWorkingDirectoryText()
protected final void setDefaultWorkingDirectoryText(String dir)
dir - the directory to set the widget toprotected final void setOtherWorkingDirectoryText(String dir)
dir - the directory to set the widget toprotected void setLaunchConfiguration(ILaunchConfiguration config)
config - set the backing launch configuration for this blockprotected ILaunchConfiguration getLaunchConfiguration()
public final void setEnabled(boolean enabled)
enabled - whether to enable it or not
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.