Java Doc for ActionUtils.java in  » IDE-Netbeans » library » org » apache » tools » ant » module » api » support » 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 Netbeans » library » org.apache.tools.ant.module.api.support 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tools.ant.module.api.support.ActionUtils

ActionUtils
final public class ActionUtils (Code)
Makes it easier to implement org.netbeans.spi.project.ActionProvider in a standard way by running targets in Ant scripts.
See Also:    ActionProvider
author:
   Jesse Glick




Method Summary
public static  StringantIncludesList(FileObject[] files, FileObject dir)
     Create an "includes" string such as is accepted by many Ant commands as well as filesets.
public static  StringantIncludesList(FileObject[] files, FileObject dir, boolean recursive)
     Create an "includes" string such as is accepted by many Ant commands as well as filesets.
public static  FileObject[]findSelectedFiles(Lookup context, FileObject dir, String suffix, boolean strict)
     Convenience method to find a file selection in a selection (context). All files must exist on disk (according to FileUtil.toFile ). If a constraining directory is supplied, they must also be contained in it. If a constraining file suffix is supplied, the base names of the files must end with that suffix. The return value is null if there are no matching files; or if the strict parameter is true and some of the files in the selection did not match the constraints (disk files, directory, and/or suffix).

Typically org.openide.loaders.DataNode s will form a node selection which will be placed in the context.

public static  FileObject[]regexpMapFiles(FileObject[] fromFiles, FileObject fromDir, Pattern fromRx, FileObject toDir, String toSubst, boolean strict)
     Map files of one kind in a source directory to files of another kind in a target directory.
public static  ExecutorTaskrunTarget(FileObject buildXml, String[] targetNames, Properties properties)
     Runs an Ant target (or a sequence of them).



Method Detail
antIncludesList
public static String antIncludesList(FileObject[] files, FileObject dir) throws IllegalArgumentException(Code)
Create an "includes" string such as is accepted by many Ant commands as well as filesets. / is always used as the separator in the relative paths.
Parameters:
  files - a list of files or folders to include, in the case of folderthe generated include contains recursively all files under the folder.
Parameters:
  dir - a directory in which all the files reside a comma-separated list of relative file paths suitable for use by Ant(the empty string in case there are no files)
throws:
  IllegalArgumentException - in case some file is not in the directory



antIncludesList
public static String antIncludesList(FileObject[] files, FileObject dir, boolean recursive) throws IllegalArgumentException(Code)
Create an "includes" string such as is accepted by many Ant commands as well as filesets. / is always used as the separator in the relative paths.
Parameters:
  files - a list of files or folders to include, in the case of folderthe generated include contains recursively all files under the folder.
Parameters:
  dir - a directory in which all the files reside
Parameters:
  recursive - if true the include list for directory is recursive a comma-separated list of relative file paths suitable for use by Ant(the empty string in case there are no files)
throws:
  IllegalArgumentException - in case some file is not in the directory
since:
   org.apache.tools.ant.module/3 3.16



findSelectedFiles
public static FileObject[] findSelectedFiles(Lookup context, FileObject dir, String suffix, boolean strict)(Code)
Convenience method to find a file selection in a selection (context). All files must exist on disk (according to FileUtil.toFile ). If a constraining directory is supplied, they must also be contained in it. If a constraining file suffix is supplied, the base names of the files must end with that suffix. The return value is null if there are no matching files; or if the strict parameter is true and some of the files in the selection did not match the constraints (disk files, directory, and/or suffix).

Typically org.openide.loaders.DataNode s will form a node selection which will be placed in the context. This method does not directly look for nodes in the selection; but generally the lookups of the nodes in a node selection are spliced into the context as well, so the DataObject s should be available. A corollary of not checking nodes directly is that any nodes in the context which do not correspond to files at all (i.e. do not have DataObject as a cookie) are ignored, even with the strict parameter on; and that multiple nodes in the context with the same associated file are treated as a single entry.


Parameters:
  context - a selection as provided to e.g. ActionProvider.isActionEnabled(...)
Parameters:
  dir - a constraining parent directory, or null to not check for a parent directory
Parameters:
  suffix - a file suffix (e.g. .java) to constrain files by,or null to not check suffixes
Parameters:
  strict - if true, all files in the selection have to be accepted a nonempty selection of disk files, or null
See Also:    ActionProvider.isActionEnabled(...)



regexpMapFiles
public static FileObject[] regexpMapFiles(FileObject[] fromFiles, FileObject fromDir, Pattern fromRx, FileObject toDir, String toSubst, boolean strict) throws IllegalArgumentException(Code)
Map files of one kind in a source directory to files of another kind in a target directory. You may use regular expressions to remap file names in the process. Only files which actually exist in the target directory will be returned. (If you expect the target files to be created by Ant you do not need this method, since Ant's mappers suffice.) The file paths considered by the regular expression (if supplied) always use / as the separator.

Typical usage to map a set of Java source files to corresponding tests: regexpMapFiles(files, srcDir, Pattern.compile("/([^/]+)\\.java"), testSrcDir, "/\\1Test.java", true)


Parameters:
  fromFiles - a list of source files to start with (may be empty)
Parameters:
  fromDir - a directory in which all the source files reside
Parameters:
  fromRx - a regular expression to match against the source files(or null to keep the same relative file names); only onematch (somewhere in the path) is checked for; failure to matchprevents the file from being included
Parameters:
  toDir - a target directory that results will reside in
Parameters:
  toSubst - replacement text for fromRx (may include regexp references),or must be null if fromRx was null
Parameters:
  strict - true to return null in case some starting files did not match any target file a list of corresponding target files (may be empty), or null if in strict modeand there was at least one source file which did not match a target file
throws:
  IllegalArgumentException - in case some source file is not in the source directory



runTarget
public static ExecutorTask runTarget(FileObject buildXml, String[] targetNames, Properties properties) throws IOException, IllegalArgumentException(Code)
Runs an Ant target (or a sequence of them).
Parameters:
  buildXml - an Ant build script
Parameters:
  targetNames - one or more targets to run; or null for the default target
Parameters:
  properties - any Ant properties to define, or null a task tracking the progress of Ant
throws:
  IOException - if there was a problem starting Ant
throws:
  IllegalArgumentException - if you did not provide any targets



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.