net.sf.ant4eclipse.ant.task.launch
Class AbstractLaunchTask

java.lang.Object
  extended by Task
      extended by net.sf.ant4eclipse.ant.task.launch.AbstractLaunchTask
Direct Known Subclasses:
LaunchJUnitTask, LaunchPropertyTask, LaunchTask

public abstract class AbstractLaunchTask
extends Task

Base class for all Tasks working with an eclipse workspace.


Constructor Summary
AbstractLaunchTask()
           
 
Method Summary
 java.io.File getLaunchFile()
          Returns the launch file.
 EclipseProject getLaunchProject()
          Returns the project that shall be launched.
 Workspace getWorkspace()
          Returns the Workspace instance associated with this task.
 boolean isLaunchConfigurationSet()
          Returns true if the launch configuration file has been set.
 boolean isWorkspaceSet()
          Returns true if the Workspace has been set.
protected  AbstractLaunchConfiguration readLaunchConfiguration()
          Reads the launch configuration that has been provided by the user.
protected  void readLaunchProject(AbstractLaunchConfiguration config)
          Sets the Eclipse project according to the supplied launch configuration.
 void requireWorkspaceSet()
           
 void setInitialiseWorkspace(boolean enable)
          Enables/disables the initial workspace initialisation.
 void setLaunchFile(java.io.File launchConfiguration)
          Changes the current launch configuration file.
 void setWorkspace(java.io.File workspace)
           
protected abstract  java.lang.Class[] validTypes()
          Returns a list of classes which are valid launch configuration types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLaunchTask

public AbstractLaunchTask()
Method Detail

getWorkspace

public Workspace getWorkspace()
Returns the Workspace instance associated with this task.

Returns:
The Workspace instance associated with this task.

isWorkspaceSet

public boolean isWorkspaceSet()
Returns true if the Workspace has been set.

Returns:
true <=> The Workspace has been set.

requireWorkspaceSet

public void requireWorkspaceSet()

setWorkspace

public void setWorkspace(java.io.File workspace)
Parameters:
workspace -

setInitialiseWorkspace

public void setInitialiseWorkspace(boolean enable)
Enables/disables the initial workspace initialisation.

Parameters:
enable - true <=> Enables the pseudo workspace.

getLaunchProject

public EclipseProject getLaunchProject()
Returns the project that shall be launched.

Returns:
The project that shall be launched.

getLaunchFile

public java.io.File getLaunchFile()
Returns the launch file.

Returns:
The launch file.

setLaunchFile

public void setLaunchFile(java.io.File launchConfiguration)
Changes the current launch configuration file.

Parameters:
launchConfiguration - The new launch configuration file.

isLaunchConfigurationSet

public boolean isLaunchConfigurationSet()
Returns true if the launch configuration file has been set.

Returns:
true <=> The launch configuration file has been set.

readLaunchProject

protected void readLaunchProject(AbstractLaunchConfiguration config)
Sets the Eclipse project according to the supplied launch configuration.

Parameters:
config - The launch configuration that provides access to the Eclipse project.

validTypes

protected abstract java.lang.Class[] validTypes()
Returns a list of classes which are valid launch configuration types.

Returns:
A list of classes which are valid launch configuration types. Not null.

readLaunchConfiguration

protected AbstractLaunchConfiguration readLaunchConfiguration()
Reads the launch configuration that has been provided by the user. If such a configuration isn't available or the configuration could not be loaded this function throws a BuildException.

Returns:
An instance of AbstractLaunchConfiguration. Not null.