Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.project.ant/1 1.12.22
PREV NEXT | FRAMES NO FRAMES

# NetBeans Ant Project API

AntProjectAPI

See:
Description

Ant Project API
org.netbeans.api.project.ant | Ways of getting information about Ant-based projects useful from other projects.
org.netbeans.spi.project.ant | Pluggable implementations of inter-project Ant dependencies.
org.netbeans.spi.project.support.ant | Principal package for implementing typical Ant-based projects.
org.netbeans.spi.project.support.ant.ui | Package containing classes supporting development of UI for Ant-based projects.

AntProjectAPI

Mostly an SPI for creating project types centered around the Ant build tool. Permits Ant-based project types to be registered and supplies various support implementations to help satisfy the contract of `Project` and various optional interfaces.

### What is New (see all changes)?

- Aug 28 '05 Semantic changes in the ReferenceHelper behavior

  The ReferenceHelper was changed to support better sharability of projects. The collocated references are stored both into the project properties (as relative) and private properties (as absolute)

- Jul 11 '05 Basic Support SPI for Project Delete/Copy/Rename/Move

  Added `AntProjectHelper.notifyDeleted()`. Added `ReferenceHelper.fixReferences`.

- Jan 16 '05 Support SPI for creating/storing Swing models for simple Ant properties

  Introduced new class `StoreGroup` which is capable of creating Swing models for simple Ant project properties and storing modified values back into properties.

- Jan 13 '05 AntArtifact enhancements

  Several enhancements of `AntArtifact` were implemented:

  1. execution of an artifact's target can be customized by properties
  2. an artifact can produce several build outputs
  3. an Ant script path is not persisted as a URI, but as a string possibly containing Ant properties

  `ReferenceHelper` was simplified as part of the implementation.

- Jan 11 '05 Make ReferenceHelper.createForeignFileReference produce relative links based on properties

  `ReferenceHelper` should reuse external project folders as base directories for references it creates where appropriate. The new API allows addition or removal of these base folders.

### Use Cases

Mostly an SPI for use by project type providers to create the project type. Also includes a small API/SPI for other projects to find what Ant build steps are necessary to create a certain build product, for use in inter-project dependencies.

Ant project support faq:

##### How to use support for storing project properties?

Q: I'm creating a customizer (properties dialog) for my project type. I wan't to use the support for simple data types. What do I need to do?

You basicaly need to do two things. First create the representation of the project properties which can be used in the GUI. Second at some time convert the objects back to the ANT properties form and store them into the project.

- Creating the object representation.
  1. Create new instance of StoreGroup for each group of properties you want to store later e.g. project and prvate. Sometimes it might be useful to create temporary source group which will only be used for creating the models without being used for storing. E.g. for properties which need special handling.
  2. Call the factory methods e.g. createBooleanButtonModel, createStringDocument, etc. which will create the swing models for you.
  3. Use the models in your Swing controls by calling setModel() or setDocument()
- Storing the models back to the proprties of project.
  1. Get the EditableProperties you want to store the model in e.g. private or project properties
  2. Call the store method on given SourceGroup with the EditableProperties as parameter
  3. Manually store models which need some special handling.

### Exported Interfaces

This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...

##### Group of java interfaces

Interface Name | In/Out | Stability | Specified in What Document?
AntProjectAPI | Exported | Official | Mostly an SPI for creating project types centered around the Ant build tool. Permits Ant-based project types to be registered and supplies various support implementations to help satisfy the contract of `Project` and various optional interfaces.

##### Group of property interfaces

Interface Name | In/Out | Stability | Specified in What Document?
netbeans.do.not.check.xalan | Exported | Private | The "netbeans.do.not.check.xalan" property switches off the startup check for buggy Xalan. See issue #70130 for more information.

### Implementation Details

##### Where are the sources for the module?

The sources for the module are in NetBeans CVS in ant/project directory.

##### What do other modules need to do to declare a dependency on this one?

       OpenIDE-Module-Module-Dependencies: org.netbeans.modules.project.ant/1 > 1.12.22

Read more about the implementation in the answers to architecture questions.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.project.ant/1 1.12.22
PREV NEXT | FRAMES NO FRAMES

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.