DefaultBuildDriver Class
- public abstract class DefaultBuildDriver
extends Object
implements IBuildDriver
Default implementation of a project build driver.
-
Hierarchy
-
Object
DefaultBuildDriver
-
All Implemented Interfaces
-
IBuildDriver
, IProjectDriver
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_beahomeString
protected static final String
_beahomeString
_beahomeUri
protected static final URI
_beahomeUri
_platformhomeString
protected static final String
_platformhomeString
_platformhomeUri
protected static final URI
_platformhomeUri
_project
protected IProject
_project
_tempDirString
protected static final String
_tempDirString
_tempDirUri
protected static final URI
_tempDirUri
_userHomeString
protected static final String
_userHomeString
_userHomeUri
protected static final URI
_userHomeUri
APP_LD_STRING
public static String
APP_LD_STRING
APP_LOCALDIR
public static Pattern
APP_LOCALDIR
BEAHOME_LD_STRING
public static String
BEAHOME_LD_STRING
BEAHOME_LOCALDIR
public static Pattern
BEAHOME_LOCALDIR
CLASS_PATH
public static Pattern
CLASS_PATH
DEST_PATH
public static Pattern
DEST_PATH
DIR
public static Pattern
DIR
EMPTY_STRING_ARRAY
protected static final String
EMPTY_STRING_ARRAY
FILESET_STRING
public static String
FILESET_STRING
IDEPROJECT
public static Pattern
IDEPROJECT
JAR_PATH
public static Pattern
JAR_PATH
OUTPUT_DIRECTORY
public static Pattern
OUTPUT_DIRECTORY
OUTPUT_FILENAME
public static Pattern
OUTPUT_FILENAME
PLATFORMHOME_LD_STRING
public static String
PLATFORMHOME_LD_STRING
PLATFORMHOME_LOCALDIR
public static Pattern
PLATFORMHOME_LOCALDIR
PROJECT
public static Pattern
PROJECT
PROJECT_LD_STRING
public static String
PROJECT_LD_STRING
PROJECT_LOCALDIR
public static Pattern
PROJECT_LOCALDIR
SRC_FILESETS
public static Pattern
SRC_FILESETS
SRC_PATH
public static Pattern
SRC_PATH
TEMPDIR_STRING
public static String
TEMPDIR_STRING
USER_HOME_STRING
public static String
USER_HOME_STRING
DefaultBuildDriver
public DefaultBuildDriver(IProject
project)
activate() Method
public void activate()
Description copied from IProjectDriver.activate()
Called when the IProject this driver was added to has been activated.
Project drivers should not assume the project is open in the IDE until
this method is called.
File system and application listeners used by the driver should be added in this method.
deactivate() Method
public void deactivate()
Description copied from IProjectDriver.deactivate()
Called when the IProject this driver was added to has been deactivated.
File system and application listeners used by the driver should be removed in this method.
expandClassPath(String) Method
public String
expandClassPath(String
source)
Substitutes a project classpath string which uses the local app/project/platform directory properties.
Parameters
-
source
- ant script containing class path to be expanded.
Returns
- ant script with class path expanded.
expandLocalDirs(String) Method
public String
expandLocalDirs(String
source)
Substitues local directory settings for standard ant build properties.
Parameters
-
source
- ant script with local directory values to be expanded.
Returns
- ant script with local directory property values expanded.
getAntClassPath() Method
public String
[] getAntClassPath()
Description copied from IBuildDriver.getAntClassPath()
Returns the list of jars that should be put on the system classpath
of the ant thread executing this driver's ant script.
Jar's containing custom ant task implementations should be included in this list.
Returns
- Array of jar paths
getApplicationClassPath(String[]) Method
public String
[] getApplicationClassPath(String
[] cpApplication)
Description copied from IBuildDriver.getApplicationClassPath(String[])
Returns the application-level build classpath.
A build driver that puts its build output in the application libraries
or modules folder should remove those jars from the application
classpath.
Parameters
-
cpApplication
- The current application-level classpath array. Includes all
application Library and Module jars, and APP-INF/classes if it exists.
Returns
- application classpath, potentially modifed
getBuildPropertyPanel() Method
public IProjectPropertyPanel
getBuildPropertyPanel()
Description copied from IBuildDriver.getBuildPropertyPanel()
Returns a panel for editing build properties managed by this driver.
The panel will get and set properties on the IProject referenced by the
driver. Components in the panel will be disabled if the user has chosen
to use an external ant script.
If this driver does not need to display build properties,
this method will return null.
Returns
- IPropertyPanel, null if this driver does not display build properties.
getPathsPropertyPanel() Method
public IProjectPropertyPanel
getPathsPropertyPanel()
Description copied from IBuildDriver.getPathsPropertyPanel()
Returns a panel for editing paths used by this driver,
typically classpath and source path. If this driver does not
support configurable path settings, this method will return null.
Returns
- IProjectPropertyPanel, null if this driver does not support paths properties.
getProjectClassPath() Method
public String
[] getProjectClassPath()
Description copied from IBuildDriver.getProjectClassPath()
Returns a list of any project level libraries or directories that should
be included in the build classpath.
Returns
- project-level classpath array.
getServerClassPath(String[]) Method
public String
[] getServerClassPath(String
[] cpServer)
Description copied from IBuildDriver.getServerClassPath(String[])
Returns the server-level build classpath for the project.
Typically, the driver will not modify the current default server classpath.
Parameters
-
cpServer
- Server classpath array.
Returns
- server classpath array to use for the project.
getSourcePath() Method
protected String
[] getSourcePath()
Returns the source path array for this project type.
Returns
- array of source path strings
prepareForReplace(StringBuffer) Method
public String
prepareForReplace(StringBuffer
buffer)
Escapes strings before use in regex.replace() and appendReplacement() calls.
Parameters
-
buffer
- StringBuffer to check for characters that need escaping.
Returns
- String with escaped characters.
prepareForReplace(String) Method
public String
prepareForReplace(String
path)
Escapes strings before use in regex.replace() and appendReplacement() calls.
Parameters
-
path
- String to check for characters that need escaping.
Returns
- String with escaped characters.
relativizeAntPath(URI) Method
public String
relativizeAntPath(URI
uri)
Relative paths are relative to either project, application, beahome, temp or user dir.
If none can be found, then the full path is returned. The file separator is always forward-slash.
Parameters
-
uri
- URI to relativize.
Returns
- String which uses project/app/platform/etc. directory properties.
setSourcePath(String[]) Method
protected void setSourcePath(String
[] sourcepathNew)
Sets IProject.PROP_SourcePath after first checking that there is
in fact a change in the path list.
Parameters
-
sourcepathNew
- Array of source path strings.