| java.lang.Object org.eclipse.pde.internal.build.ant.AntScript
AntScript | public class AntScript implements IAntScript(Code) | | Class for producing Ant scripts. Contains convenience methods for creating the
XML elements required for Ant scripts. See the Ant
website for more details on Ant scripts and the particular Ant tasks.
|
Method Summary | |
public void | close() Close the output stream. | public static String | getEscaped(String s) | public void | print(String message) Print the given string to the Ant script. | public void | print(ITask task) Print the given task to the Ant script. | public void | printAntCallTask(String target, boolean inheritAll, Map params) Print an antcall task to the script. | public void | printAntTask(String antfile, String dir, String target, String outputParam, String inheritAll, Map properties) Print an ant task to this script. | public void | printAntTask(String antfile, String dir, String target, String outputParam, String inheritAll, Map properties, Map references) Print an ant task to this script. | protected void | printArg(String line) Print an arg element to the Ant file. | public void | printAttribute(String name, String value, boolean mandatory) Add the given name/value attribute pair to the script. | public void | printAvailableTask(String property, String file) Print the available Ant task to this script. | public void | printAvailableTask(String property, String file, String value) Print the available Ant task to this script. | public void | printBrandTask(String root, String icons, String name, String os) Print a brand task to the Ant script. | public void | printChmod(String dir, String rights, String files) | public void | printComment(String comment) Print the given comment to the Ant script. | public void | printConditionIsSet(String property, String value, String testProperty) | public void | printConvertPathTask(String toConvert, String propertyName, boolean isEclipseResource) Print a eclipse.convertTask task to the script. | public void | printCopyFileTask(String file, String toFile, boolean overwrite) Print a copy tak to the script. | public void | printCopyTask(String file, String todir, FileSet[] fileSets, boolean failOnError, boolean overwrite) Print a copy task to the script. | public void | printDeleteTask(String dir, String file, FileSet[] fileSets) Print a delete task to the Ant script. | public void | printDirName(String property, String file) Print a dirname task to the script. | public void | printEchoTask(String message) Print an echo task to the Ant script. | public void | printEndTag(String tag) Print an end tag in the Ant script for the given element name. | public void | printExecTask(String executable, String dir, List lineArgs, String os) Print an exec task to the Ant script. | public void | printGZip(String source, String destination) | public void | printGet(String source, String destination, String login, String password, boolean usetimestamp) | public void | printJarTask(String jarFile, String basedir, String manifestAttribute) Print a jar Ant task to this script. | public void | printJarTask(String jarFile, String basedir, String manifestAttribute, String filesetManifest) Print a jar Ant task to this script. | public void | printMkdirTask(String dir) Print a mkdir task to the Ant script. | public void | printMoveTask(String todir, FileSet[] fileSets, boolean failOnError) | protected void | printParam(String name, String value) Print a param tag to the Ant script. | public void | printPathStructure(String tag, String id, List paths) Print a path structure to the Ant Script.
The list of paths are printed using path.toString(), so paths
can be any Object. | public void | printProjectDeclaration(String name, String target, String basedir) Print a project tag to the Ant script. | public void | printProjectEnd() Print a project end tag to the Ant script. | public void | printProperty(String name, String value) Print a property tag to the Ant script. | public void | printPropertyRefid(String name, String ref) | protected void | printQuotes(String message) Print the given string to the Ant script within quotes. | public void | printRefreshLocalTask(String resource, String depth) Print a eclipse.refreshLocal task to the script. | public void | printStartTag(String tag) Print a start tag in the Ant script for the given element name. | public void | printString(String string) Print the given string to the Ant script. | public void | printSubantTask(String antfile, String target, String buildpath, String failOnError, String inheritAll, Map properties, Map references) | public void | printTab() Print the given number of tabs to the Ant script. | public void | printTabs() | public void | printTarTask(String zipfile, String basedir, boolean filesOnly, boolean update, FileSet[] fileSets) | public void | printTargetDeclaration(String name, String depends, String ifClause, String unlessClause, String description) Print a target tag to the Ant script. | public void | printTargetEnd() Print a closing target tag to the script. | public void | printTaskDef(String name, String classname) | public void | printZipTask(String zipfile, String basedir, boolean filesOnly, boolean update, FileSet[] fileSets) Print a zip task to this script. | public void | println(String message) Print the given string to the Ant script followed by a carriage-return. | public void | println() Print a carriage-return to the Ant script. |
indent | protected int indent(Code) | | |
close | public void close()(Code) | | Close the output stream.
|
print | public void print(String message)(Code) | | Print the given string to the Ant script.
Parameters: message - |
print | public void print(ITask task)(Code) | | Print the given task to the Ant script.
Parameters: task - the task to print |
printAntCallTask | public void printAntCallTask(String target, boolean inheritAll, Map params)(Code) | | Print an antcall task to the script. This calls Ant on the given
target which is located within the same build file.
Parameters: target - the target of the ant call Parameters: inheritAll - true if the parameters should be pass to thecalled target Parameters: params - table of parameters for the call |
printAntTask | public void printAntTask(String antfile, String dir, String target, String outputParam, String inheritAll, Map properties)(Code) | | Print an ant task to this script. This calls Ant on the specified
target contained in the specified Ant file with the given parameters.
Parameters: antfile - the name of the Ant file which contains the target to run Parameters: dir - the basedir for the target Parameters: target - the name of the target Parameters: outputParam - filename to write the output to Parameters: inheritAll - true if the parameters should be passed onto the ant target Parameters: properties - the table of properties |
printAntTask | public void printAntTask(String antfile, String dir, String target, String outputParam, String inheritAll, Map properties, Map references)(Code) | | Print an ant task to this script. This calls Ant on the specified
target contained in the specified Ant file with the given parameters.
Parameters: antfile - the name of the Ant file which contains the target to run Parameters: dir - the basedir for the target Parameters: target - the name of the target Parameters: outputParam - filename to write the output to Parameters: inheritAll - true if the parameters should be passed onto the ant target Parameters: properties - the table of properties Parameters: references - the table of references |
printArg | protected void printArg(String line)(Code) | | Print an arg element to the Ant file.
Parameters: line - |
printAttribute | public void printAttribute(String name, String value, boolean mandatory)(Code) | | Add the given name/value attribute pair to the script. Do not write the attribute
if the value is null unless a true is specified
indicating that it is mandatory.
Parameters: name - the name of the attribute Parameters: value - the value of the attribute or null Parameters: mandatory - true if the attribute should be printed evenif it is null |
printAvailableTask | public void printAvailableTask(String property, String file)(Code) | | Print the available Ant task to this script. This task sets a property
value if the given file exists at runtime.
Parameters: property - the property to set Parameters: file - the file to look for |
printAvailableTask | public void printAvailableTask(String property, String file, String value)(Code) | | Print the available Ant task to this script. This task sets a property
to the given value if the given file exists at runtime.
Parameters: property - the property to set Parameters: file - the file to look for |
printBrandTask | public void printBrandTask(String root, String icons, String name, String os)(Code) | | Print a brand task to the Ant script.
Parameters: root - the location of the launcher to brand. Parameters: icons - the list of icons to use in the branding Parameters: name - the name of the resultant launcher |
printComment | public void printComment(String comment)(Code) | | Print the given comment to the Ant script.
Parameters: comment - the comment to write out |
printConditionIsSet | public void printConditionIsSet(String property, String value, String testProperty)(Code) | | Print a Condition task with isset test to the script
Parameters: property - name of the property to set Parameters: value - value to set the property to Parameters: testProperty - name of the property for the isset test |
printConvertPathTask | public void printConvertPathTask(String toConvert, String propertyName, boolean isEclipseResource)(Code) | | Print a eclipse.convertTask task to the script. This task convert a file path to
an Eclipse resource or vice-versa.
Parameters: toConvert - the entry to convert Parameters: propertyName - the property where to store the result of the convertion Parameters: isEclipseResource - true if toConvert refers to an eclipse resource. |
printCopyFileTask | public void printCopyFileTask(String file, String toFile, boolean overwrite)(Code) | | Print a copy tak to the script. The source file is specified by
the file parameter. The destination file is specified by the
toFile parameter.
Parameters: file - the source file Parameters: toFile - the destination file |
printCopyTask | public void printCopyTask(String file, String todir, FileSet[] fileSets, boolean failOnError, boolean overwrite)(Code) | | Print a copy task to the script. The source file is specified
by the file parameter. The destination directory is specified by
the todir parameter.
Parameters: file - the source file Parameters: todir - the destination directory Parameters: fileSets - the inclusion/exclusion rules to use when copying Parameters: overwrite - TODO |
printDeleteTask | public void printDeleteTask(String dir, String file, FileSet[] fileSets)(Code) | | Print a delete task to the Ant script. At least one of dir
or file is required unless some fileSets are
present.
Parameters: dir - the name of the directory to delete Parameters: file - the name of the file to delete Parameters: fileSets - the specification for the files to delete |
printDirName | public void printDirName(String property, String file)(Code) | | Print a dirname task to the script.
Parameters: property - Parameters: file - |
printEchoTask | public void printEchoTask(String message)(Code) | | Print an echo task to the Ant script.
Parameters: message - the message to echo to the output |
printEndTag | public void printEndTag(String tag)(Code) | | Print an end tag in the Ant script for the given element name.
Parameters: tag - the name of the element |
printExecTask | public void printExecTask(String executable, String dir, List lineArgs, String os)(Code) | | Print an exec task to the Ant script.
Parameters: executable - the program to execute Parameters: dir - the working directory for the executable Parameters: lineArgs - the arguments for the executable |
printJarTask | public void printJarTask(String jarFile, String basedir, String manifestAttribute)(Code) | | Print a jar Ant task to this script. This jars together a group of
files into a single file.
Parameters: jarFile - the destination file name Parameters: basedir - the base directory Parameters: manifestAttribute - the manifest file to use |
printJarTask | public void printJarTask(String jarFile, String basedir, String manifestAttribute, String filesetManifest)(Code) | | Print a jar Ant task to this script. This jars together a group of
files into a single file.
Parameters: jarFile - the destination file name Parameters: basedir - the base directory Parameters: manifestAttribute - the manifest file to use Parameters: filesetManifest - behavior when a Manifest is found in a zipfileset orzipgroupfileset file is found. Valid values are "skip", "merge", and"mergewithoutmain". "merge" will merge all of the manifests together,and merge this into any other specified manifests. "mergewithoutmain"merges everything but the Main section of the manifests. Default valueis "skip". |
printMkdirTask | public void printMkdirTask(String dir)(Code) | | Print a mkdir task to the Ant script.
Parameters: dir - the name of the directory to create. |
printMoveTask | public void printMoveTask(String todir, FileSet[] fileSets, boolean failOnError)(Code) | | |
printParam | protected void printParam(String name, String value)(Code) | | Print a param tag to the Ant script.
Parameters: name - the parameter name Parameters: value - the parameter value |
printPathStructure | public void printPathStructure(String tag, String id, List paths)(Code) | | Print a path structure to the Ant Script.
The list of paths are printed using path.toString(), so paths
can be any Object. Commonly String or ClasspathComputer3_0.ClasspathElement
Parameters: tag - - tag for the structure, normally path or classpath Parameters: id - - id for this structure Parameters: paths - - list of paths. Paths are printed using path.toString() |
printProjectDeclaration | public void printProjectDeclaration(String name, String target, String basedir)(Code) | | Print a project tag to the Ant script.
Parameters: name - the name of the project Parameters: target - the name of default target Parameters: basedir - the base directory for all the project's path calculations |
printProjectEnd | public void printProjectEnd()(Code) | | Print a project end tag to the Ant script.
|
printProperty | public void printProperty(String name, String value)(Code) | | Print a property tag to the Ant script.
Parameters: name - the property name Parameters: value - the property value |
printQuotes | protected void printQuotes(String message)(Code) | | Print the given string to the Ant script within quotes.
Parameters: message - the string to print |
printRefreshLocalTask | public void printRefreshLocalTask(String resource, String depth)(Code) | | Print a eclipse.refreshLocal task to the script. This task refreshes
the specified resource in the workspace, to the specified depth.
Parameters: resource - the resource to refresh Parameters: depth - one of IResource.DEPTH_ZERO ,IResource.DEPTH_ONE , or IResource.DEPTH_INFINITY |
printStartTag | public void printStartTag(String tag)(Code) | | Print a start tag in the Ant script for the given element name.
Parameters: tag - the name of the element |
printString | public void printString(String string)(Code) | | Print the given string to the Ant script.
Parameters: string - the string to write to the file |
printTab | public void printTab()(Code) | | Print the given number of tabs to the Ant script.
|
printTabs | public void printTabs()(Code) | | |
printTarTask | public void printTarTask(String zipfile, String basedir, boolean filesOnly, boolean update, FileSet[] fileSets)(Code) | | |
printTargetDeclaration | public void printTargetDeclaration(String name, String depends, String ifClause, String unlessClause, String description)(Code) | | Print a target tag to the Ant script.
Parameters: name - the name of the target Parameters: depends - a comma separated list of required targets Parameters: ifClause - the name of the property that this target depends on Parameters: unlessClause - the name of the property that this target cannot have Parameters: description - a user-readable description of this target |
printTargetEnd | public void printTargetEnd()(Code) | | Print a closing target tag to the script. Indent the specified
number of tabs.
|
printZipTask | public void printZipTask(String zipfile, String basedir, boolean filesOnly, boolean update, FileSet[] fileSets)(Code) | | Print a zip task to this script.
Parameters: zipfile - the destination file name Parameters: basedir - the source directory to start the zip Parameters: filesOnly - true if the resulting zip file should contain only files and not directories Parameters: update - ndicates whether to update or overwrite the destination file if it already exists Parameters: fileSets - the inclusion/exclusion rules to use when zipping |
println | public void println(String message)(Code) | | Print the given string to the Ant script followed by a carriage-return.
Parameters: message - the string to print |
println | public void println()(Code) | | Print a carriage-return to the Ant script.
|
|
|