站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

AntBuildExtender (Ant-Based Project Support) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.project.ant/1 1.16

org.netbeans.api.project.ant
Class AntBuildExtender

java.lang.Object
  extended by org.netbeans.api.project.ant.AntBuildExtender

public final class AntBuildExtender
extends Object

Allows extending the project's build script with 3rd party additions. Check the Project's lookup to see if the feature is supported by a given Ant project type. Typical usage:

Please note that it's easy to break the build script functionality and any script extensions shall be done with care. A few rules to follow:

Since:
org.netbeans.modules.project.ant 1.16

Nested Class Summary
 class AntBuildExtender.Extension
          Describes and allows to manipulate the build script extension and it's links to the main build script of the project.
 
Method Summary
 AntBuildExtender.Extension addExtension(String id, FileObject extensionXml)
          Adds a new build script extension.
 List<String> getExtensibleTargets()
          Get a list of target names in the main build script that are allowed to be extended by adding the "depends" attribute definition to them.
 AntBuildExtender.Extension getExtension(String id)
          Get an extension by the id.
 void removeExtension(String id)
          Remove an existing build script extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getExtensibleTargets

public List<String> getExtensibleTargets()
Get a list of target names in the main build script that are allowed to be extended by adding the "depends" attribute definition to them.

Returns:
list of target names

addExtension

public AntBuildExtender.Extension addExtension(String id,
                                               FileObject extensionXml)
Adds a new build script extension.

Parameters:
id - identification of the extension
extensionXml - fileobject referencing the build script for the extension, needs to be located in nbproject directory or below.
Returns:
the newly created extension.

removeExtension

public void removeExtension(String id)
Remove an existing build script extension. Make sure to remove the extension's script file before/after removing the extension.

Parameters:
id - identification of the extension

getExtension

public AntBuildExtender.Extension getExtension(String id)
Get an extension by the id.

Parameters:
id - identification token
Returns:
Extention with the given id or null if not found.

org.netbeans.modules.project.ant/1 1.16

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.