library

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 
License:
URL:
Description:
Package NameComment
abc.xyz
demo
foo.bar.baz
foo.bar.baz_unshared
foo.bar_invisible
foo_shared
gui.javahelp
gui.propertyeditors
gui.propertyeditors.data
gui.propertyeditors.utilities
gui.windowsystem
ims
org.apache.jmeter.module
org.apache.jmeter.module.actions
org.apache.jmeter.module.cookies
org.apache.jmeter.module.exceptions
org.apache.jmeter.module.integration
org.apache.jmeter.module.loadgenerator.spi.impl
org.apache.jmeter.module.nodes
org.apache.jmeter.module.wizards
org.apache.tools.ant.module
org.apache.tools.ant.module.api Examination and execution of Ant build scripts. Few modules outside of the Ant module suite will need to use this package.
org.apache.tools.ant.module.api.support Utilities for examining and running Ant scripts. {@link org.apache.tools.ant.module.api.support.ActionUtils} is primarily of interest to project type providers which need to run Ant targets to implement project actions. {@link org.apache.tools.ant.module.api.support.TargetLister} is not likely to be useful outside the Ant module suite.
org.apache.tools.ant.module.bridge
org.apache.tools.ant.module.bridge.impl
org.apache.tools.ant.module.loader
org.apache.tools.ant.module.nodes
org.apache.tools.ant.module.run
org.apache.tools.ant.module.spi Ways of influencing how Ant is run inside NetBeans.

{@link org.apache.tools.ant.module.spi.AutomaticExtraClasspathProvider} will be useful to modules which bundle libraries that may be needed for some optional tasks shipped with Ant.

{@link org.apache.tools.ant.module.spi.AntLogger}, together with the auxiliary interfaces {@link org.apache.tools.ant.module.spi.AntSession}, {@link org.apache.tools.ant.module.spi.AntEvent}, and {@link org.apache.tools.ant.module.spi.TaskStructure}, provides a powerful way of controlling the appearance of Ant process output.

Registering Tasks and Types

The Ant module provides a way for other modules to register custom Ant tasks and types that will automatically be available to any scripts running inside NetBeans.

  1. Do consider this facility for tasks which would only make sense running inside the NetBeans VM, typically making direct Java method calls to internal NetBeans objects.

  2. Do not consider this facility for tasks which would be useful in any context. You may bundle up such task JARs in ant/extra/*.jar in the NetBeans distribution and recommend users use them via <taskdef> with a <classpath>, as they would any other third-party task libraries.

Examples of likely tasks: opening the GUI-configured web browser on a URL, reloading a NetBeans test module, attaching the NetBeans debugger to a running application, etc. You could consider these things IDE scripting using Ant.

Registration is simple. (Assume for sake of illustration that the code name base of the host module is org.netbeans.modules.foo; in the following text, replace this package sequence with the actual code name base of your module, using whatever separator character is indicated.) Create a JAR file containing the task class(es), named org-netbeans-modules-foo.jar. Create an entry in that JAR org/netbeans/modules/foo/antlib.xml listing tasks (or types, macrodefs, etc.) you wish to define, in the standard Antlib format. For example:

<?xml version="1.0" encoding="UTF-8"?>
<antlib>
    <taskdef name="mytask1" classname="org.netbeans.modules.foo.MyTask1"/>
    <taskdef name="mytask2" classname="org.netbeans.modules.foo.MyTask2"/>
</antlib>

(Note that when using Ant 1.5, only <taskdef> and <typedef> elements are supported, and only using the name and classname attributes.)

Place the JAR file in the ant/nblib/ directory of the NetBeans distribution, i.e. bundle it in your NBM as netbeans/ant/nblib/org-netbeans-modules-foo.jar. NetBeans will automatically load your task/type definitions and make them available to build scripts.

The task classes will be loaded in a special class loader, not the one usually used for your module's classes. This loader will have access to:

  1. The JRE and JDK libraries.
  2. The installed copy of Ant, including any user-configured Ant classpath.
  3. Your module, including any extension JARs and anything your module can directly refer to, such as other modules it depends on.

Do not include copies of your task or type definitions in the module JAR. They must reside only in ant/nblib/*.jar.

Now whenever your module is enabled, Ant projects run inside NetBeans will have access to the definitions you provided. When running Ant 1.5, the definitions will be available with no namespace qualification, e.g.:

<project default="all">
    <target name="all">
        <mytask1 arg="val"/>
    </target>
</project>

When running Ant 1.6, the definitions will still be available with no namespace qualification. However it is recommended in 1.6 to namespace-qualify everything; so the antlib is loaded in the namespace you would expect, ensuring that there is no possibility of name clashes with unrelated tasks:

<project default="all"
         xmlns="antlib:org.apache.tools.ant"
         xmlns:foo="antlib:org.netbeans.modules.foo">
    <target name="all">
        <foo:mytask1 arg="val"/>
    </target>
</project>

Complete working example of task registration: ant/browsetask module

org.apache.tools.ant.module.wizards.shortcut
org.apache.tools.ant.module.xml
org.bar
org.fakepkg
org.foo
org.foo.impl
org.jruby.ast
org.jruby.lexer.yacc
org.jruby.libraries
org.jruby.parser
org.jruby.runtime
org.mozilla.javascript
org.mozilla.javascript.regexp
org.netbeans
org.netbeans.beaninfo
org.netbeans.beaninfo.editors
org.netbeans.core
org.netbeans.core.actions
org.netbeans.core.filesystems
org.netbeans.core.lookup
org.netbeans.core.modules
org.netbeans.core.projects
org.netbeans.core.ui
org.netbeans.core.validation
org.netbeans.core.xml
org.netbeans.insane.impl
org.netbeans.insane.live
org.netbeans.insane.model
org.netbeans.insane.scanner
org.netbeans.license
org.netbeans.nbexec
org.netbeans.perftest
org.netbeans.swing.dirchooser
org.netbeans.swing.plaf
org.netbeans.swing.plaf.aqua
org.netbeans.swing.plaf.gtk
org.netbeans.swing.plaf.metal
org.netbeans.swing.plaf.util
org.netbeans.swing.plaf.winclassic
org.netbeans.swing.plaf.winvista
org.netbeans.swing.plaf.winxp
org.netbeans.swing.popupswitcher
org.netbeans.swing.tabcontrol
org.netbeans.swing.tabcontrol.demo
org.netbeans.swing.tabcontrol.event
org.netbeans.swing.tabcontrol.plaf
org.netbeans.upgrade
org.netbeans.upgrade.launcher
org.netbeans.upgrade.systemoptions
org.netbeans.util
org.openide
org.openide.util
org.openidex.search
sampleproject
sfs_attr_test
test1
test2
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.