Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.debug.ui
Class WorkingDirectoryBlock

java.lang.Object
  extended by 

org.eclipse.debug.ui.AbstractLaunchConfigurationTab
      extended by 
org.eclipse.debug.ui.WorkingDirectoryBlock
All Implemented Interfaces:
ILaunchConfigurationTab

public abstract class WorkingDirectoryBlock
extends AbstractLaunchConfigurationTab

A control for setting the working directory associated with a launch configuration.

Since:
3.5

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class org.eclipse.debug.ui. AbstractLaunchConfigurationTab
activated, canSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createVerticalSpacer, deactivated, dispose, getControl, getErrorMessage, getId, getImage, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, isDirty, launched, setAttribute, setControl, setDirty, setErrorMessage, setLaunchConfigurationDialog, setMessage, updateLaunchConfigurationDialog
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkingDirectoryBlock

protected WorkingDirectoryBlock(
String workingDirectoryAttribteName)
Creates a new WorkingDirectoryBlock for setting a working directory.

Parameters:
workingDirectoryAttribteName - the name of the launch configuration attribute to set the working directory's location, cannot be null

WorkingDirectoryBlock

protected WorkingDirectoryBlock(
String workingDirectoryAttribteName,
                                
String helpContextId)
Creates a new WorkingDirectoryBlock for setting a working directory.

Parameters:
workingDirectoryAttribteName - the name of the launch configuration attribute to set the working directory's location, cannot be null
helpContextId - the help context id to use to hook onto the help system
Method Detail

createControl

public final 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

getContainer

protected 
IContainer getContainer()
Returns the selected workspace container,or null


setDefaultWorkingDir

protected void setDefaultWorkingDir()
Sets the default working directory.


getProject

protected abstract 
IProject getProject(
ILaunchConfiguration configuration)
                                throws 
CoreException
Returns the project associated with the specified launch configuration or null if none.

Parameters:
configuration - the launch configuration that has been set to this working directory block
Returns:
the project specified by the launch configuration, or null if nothing has been set
Throws:
CoreException - if an error occurred while retrieving the project from the launch configuration

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
Parameters:
config - launch configuration which provides context for validating this tab. This value must not be null.
Returns:
whether this tab is in a valid state
See Also:
ILaunchConfigurationTab.isValid(ILaunchConfiguration)

setDefaults

public void setDefaults(
ILaunchConfigurationWorkingCopy config)
Sets the default working directory to be used by the launch configuration. The default implementation has no default working directory.

Parameters:
config - launch configuration
See Also:
ILaunchConfigurationTab.setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)

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

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

getName

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

Returns:
the name of this tab

log

protected void log(
CoreException e)
Logs exceptions that have been caught by this working directory block. Subclasses should reimplement if they wish to monitor such exceptions. Default implementation does nothing.

Parameters:
e - the exception to log

getWorkingDirectoryText

protected final 
String getWorkingDirectoryText()
Retrieves the path from the text box that has been selected.

Returns:
the working directory the user wishes to use

setDefaultWorkingDirectoryText

protected final void setDefaultWorkingDirectoryText(
String dir)
Sets the text of the default working directory.

Parameters:
dir - the directory to set the widget to

setOtherWorkingDirectoryText

protected final void setOtherWorkingDirectoryText(
String dir)
Sets the directory of the other working directory to be used.

Parameters:
dir - the directory to set the widget to

setLaunchConfiguration

protected void setLaunchConfiguration(
ILaunchConfiguration config)
Sets the launch configuration to be used by this working directory block.


getLaunchConfiguration

protected 
ILaunchConfiguration getLaunchConfiguration()
Returns the launch configuration that this working directory block is using.

Returns:
this working directory block's launch configuration

setEnabled

public final void setEnabled(boolean enabled)
Allows this entire block to be enabled/disabled

Parameters:
enabled - whether to enable it or not

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire