public final class AntBuildExtender extends Object
ProjectManager.saveProject(org.netbeans.api.project.Project)
to persist the changes and
regenerate the main build scriptModifier and Type | Class and Description |
---|---|
class |
AntBuildExtender.Extension
Describes and allows to manipulate the build script extension and it's links to the main build script
of the project.
|
Modifier and Type | Field and Description |
---|---|
static String |
ANT_CUSTOMTASKS_LIBS_PROPNAME |
Modifier and Type | Method and Description |
---|---|
AntBuildExtender.Extension |
addExtension(String id,
FileObject extensionXml)
Adds a new build script extension.
|
void |
addLibrary(Library library)
Copies global library to the shared library folder of the project if the
project is sharable and adds library name to the list of libraries needed
to run Ant script.
|
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.
|
void |
removeLibrary(Library library)
Removes library name from the list of libraries needed to run Ant script
|
public static final String ANT_CUSTOMTASKS_LIBS_PROPNAME
public List<String> getExtensibleTargets()
public AntBuildExtender.Extension addExtension(String id, FileObject extensionXml)
id
- identification of the extensionextensionXml
- fileobject referencing the build script for the extension,
needs to be located in nbproject directory or below.public void removeExtension(String id)
id
- identification of the extensionpublic AntBuildExtender.Extension getExtension(String id)
id
- identification tokenpublic void addLibrary(Library library) throws IOException
library
- global library to be copied to shared library folder of the projectIOException
- exception thrown when properties cannot be loaded or savedpublic void removeLibrary(Library library) throws IOException
library
- either global or shared library to be removed from list of
libraries needed for running Ant script; cannot be nullIOException
- exception thrown when properties cannot be loaded or saved