Java Doc for AntScript.java in  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » internal » build » ant » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » Eclipse plug in development » org.eclipse.pde.internal.build.ant 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.


Field Summary
final protected  StringXML_PROLOG
    
protected  intindent
    
protected  OutputStreamout
    
protected  PrintWriteroutput
    

Constructor Summary
public  AntScript(OutputStream out)
     Constructor for the class.

Method Summary
public  voidclose()
     Close the output stream.
public static  StringgetEscaped(String s)
    
public  voidprint(String message)
     Print the given string to the Ant script.
public  voidprint(ITask task)
     Print the given task to the Ant script.
public  voidprintAntCallTask(String target, boolean inheritAll, Map params)
     Print an antcall task to the script.
public  voidprintAntTask(String antfile, String dir, String target, String outputParam, String inheritAll, Map properties)
     Print an ant task to this script.
public  voidprintAntTask(String antfile, String dir, String target, String outputParam, String inheritAll, Map properties, Map references)
     Print an ant task to this script.
protected  voidprintArg(String line)
     Print an arg element to the Ant file.
public  voidprintAttribute(String name, String value, boolean mandatory)
     Add the given name/value attribute pair to the script.
public  voidprintAvailableTask(String property, String file)
     Print the available Ant task to this script.
public  voidprintAvailableTask(String property, String file, String value)
     Print the available Ant task to this script.
public  voidprintBrandTask(String root, String icons, String name, String os)
     Print a brand task to the Ant script.
public  voidprintChmod(String dir, String rights, String files)
    
public  voidprintComment(String comment)
     Print the given comment to the Ant script.
public  voidprintConditionIsSet(String property, String value, String testProperty)
    
public  voidprintConvertPathTask(String toConvert, String propertyName, boolean isEclipseResource)
     Print a eclipse.convertTask task to the script.
public  voidprintCopyFileTask(String file, String toFile, boolean overwrite)
     Print a copy tak to the script.
public  voidprintCopyTask(String file, String todir, FileSet[] fileSets, boolean failOnError, boolean overwrite)
     Print a copy task to the script.
public  voidprintDeleteTask(String dir, String file, FileSet[] fileSets)
     Print a delete task to the Ant script.
public  voidprintDirName(String property, String file)
     Print a dirname task to the script.
public  voidprintEchoTask(String message)
     Print an echo task to the Ant script.
public  voidprintEndTag(String tag)
     Print an end tag in the Ant script for the given element name.
public  voidprintExecTask(String executable, String dir, List lineArgs, String os)
     Print an exec task to the Ant script.
public  voidprintGZip(String source, String destination)
    
public  voidprintGet(String source, String destination, String login, String password, boolean usetimestamp)
    
public  voidprintJarTask(String jarFile, String basedir, String manifestAttribute)
     Print a jar Ant task to this script.
public  voidprintJarTask(String jarFile, String basedir, String manifestAttribute, String filesetManifest)
     Print a jar Ant task to this script.
public  voidprintMkdirTask(String dir)
     Print a mkdir task to the Ant script.
public  voidprintMoveTask(String todir, FileSet[] fileSets, boolean failOnError)
    
protected  voidprintParam(String name, String value)
     Print a param tag to the Ant script.
public  voidprintPathStructure(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  voidprintProjectDeclaration(String name, String target, String basedir)
     Print a project tag to the Ant script.
public  voidprintProjectEnd()
     Print a project end tag to the Ant script.
public  voidprintProperty(String name, String value)
     Print a property tag to the Ant script.
public  voidprintPropertyRefid(String name, String ref)
    
protected  voidprintQuotes(String message)
     Print the given string to the Ant script within quotes.
public  voidprintRefreshLocalTask(String resource, String depth)
     Print a eclipse.refreshLocal task to the script.
public  voidprintStartTag(String tag)
     Print a start tag in the Ant script for the given element name.
public  voidprintString(String string)
     Print the given string to the Ant script.
public  voidprintSubantTask(String antfile, String target, String buildpath, String failOnError, String inheritAll, Map properties, Map references)
    
public  voidprintTab()
     Print the given number of tabs to the Ant script.
public  voidprintTabs()
    
public  voidprintTarTask(String zipfile, String basedir, boolean filesOnly, boolean update, FileSet[] fileSets)
    
public  voidprintTargetDeclaration(String name, String depends, String ifClause, String unlessClause, String description)
     Print a target tag to the Ant script.
public  voidprintTargetEnd()
     Print a closing target tag to the script.
public  voidprintTaskDef(String name, String classname)
    
public  voidprintZipTask(String zipfile, String basedir, boolean filesOnly, boolean update, FileSet[] fileSets)
     Print a zip task to this script.
public  voidprintln(String message)
     Print the given string to the Ant script followed by a carriage-return.
public  voidprintln()
     Print a carriage-return to the Ant script.

Field Detail
XML_PROLOG
final protected String XML_PROLOG(Code)



indent
protected int indent(Code)



out
protected OutputStream out(Code)



output
protected PrintWriter output(Code)




Constructor Detail
AntScript
public AntScript(OutputStream out) throws IOException(Code)
Constructor for the class.
Parameters:
  out - the output stream to write the script to
throws:
  IOException -




Method Detail
close
public void close()(Code)
Close the output stream.



getEscaped
public static String getEscaped(String s)(Code)



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



printChmod
public void printChmod(String dir, String rights, String files)(Code)



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



printGZip
public void printGZip(String source, String destination)(Code)



printGet
public void printGet(String source, String destination, String login, String password, boolean usetimestamp)(Code)



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



printPropertyRefid
public void printPropertyRefid(String name, String ref)(Code)



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



printSubantTask
public void printSubantTask(String antfile, String target, String buildpath, String failOnError, String inheritAll, Map properties, Map references)(Code)



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.



printTaskDef
public void printTaskDef(String name, String classname)(Code)



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.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.