To start up Ant's Nest first change to the 'antsnest' directory on your command prompt/x-term. Then execute the command 'ant -f antsnestbuild.xml' and the program should start after a few seconds.
You can change the look of the application by selecting a theme from the 'Change Theme' list, under the 'View' menu.
The 'open' and 'save' options you would expect to see are available on the 'file' menu and toolbar. You can also create a new project from here and perform 'undo' and 'redo' actions. You can open multiple files at once, switching between them using the 'Open Files' list under the 'View' menu.
Ant's Nest is a pluggable application in the sense that other developers can create 'levels'. A level is a specialist view that allows an Ant build file to be edited. The application comes with two default levels. To change the level you are working in, select your desired one from the drop-down list.
The first default level displays a tree view of the build file on the left, and the actual build file XML on the right.
This always shows a 'Project' as the root of the tree, and this cannot be deleted. To delete any other node in the tree, select it then press the 'Del' key. To add a new type of node (e.g. a target) to an existing one (e.g. a project), right-click the existing node and select the new type of node from the popup menu. For 'task' nodes the menu will also contain the nested elements accepted by the task. The popup menu also contains options regarding expanding and collapsing nodes. To move a node so it is a child of another node, drag and drop it onto its new parent node. To place it in an exact position, hold the 'Ctrl' key down as you make the drop. To see the attributes of a node click on the node and the attribute list will fill up. To edit an attribute, first select it in the list, then edit it in the text field. Once satisfied push 'Enter' and the attribute will be changed. To move an attribute to another position, drag and drop it. To edit comments and CDATA sections, double-click them to bring up a more appropriate editor. When a node in the tree is copied, it is converted its equivelant XML and sent to the system clipboard. When a paste is performed, the data in the clipboard is converted from XML into a node, and added as a child to the currently selected node. Finally, if you double-click a task node then its documentation will open up in a seperate window.
This displays the XML that will be saved. Here you can manually add to and edit the build file to fine tune it. However, please note that the XML is formatted and beautified and will delete any bits of text that do not make sense in an Ant build file. The changes made here are only noted if you click the 'Commit/Refresh' button at the top of the text area. Normal copying and pasting usage applies. An auto-complete function is also available by pressing 'F1' whilst in the angled-brackets of any Ant entity.
The second default level is similar to the first, except it provides an information panel on the right now.
Each tab in this panel contains a specific category of Ant tasks. By double-clicking on a task in the list, its documentation will appear in the documentation window. From here you can get a better understanding of the task, e.g. what the attributes mean. To add this task to the project, simply drag and drop it from the task list onto its new parent node in the build tree.
This level will run the Ant build file. On the left is a list of the project's targets. To run one, first select it then click 'Execute' on the main panel. To run the default target, select the project name, then 'Execute'. The build progress is output to the main panel.
Ant's Nest is capable of creating and executing Ant Beans. These are Java Beans that are equivelant to an Ant target.
The 'Ant Bean Editor' level is capable of creating and editing Ant Beans. As each target in a build file must have a name and an optional description, these can be entered here. By double-clicking the 'Task Names' label a dialog will appear to allow you to select the name of the task or type that make up the target. These names MUST be in the order they appear in the target and must be XPath addresses.
A target must have attributes so these are what's configured next. Some attributes you will want to preset yourself (like a 'java' task must fork), others you will want the user to set (such as the location of their java class files). Click the relevant label on the left hand panel then edit the bean parameter on the right hand side. A parameter MUST have a question for ID purposes. For user-configured parameters this is the question they will be asked when the bean is executed. By double-clicking the 'Answers' label, you can also provide potential answers to that question. Finally the attributes that are to be set to whatever the value of the parameter is must be specified. You can do this by double-clicking the 'Attribute Paths' label and selecting the XPath addresses of the relevant task attributes. Once editing of the parameter is complete, click 'Add' to add it to the bean.
Once the bean has been set up, it can be saved by clicking 'Save'.
To execute an Ant Bean in any level, select the option from the 'Tools' menu. Then select the saved bean and it will begin running, asking you questions about the information it needs to know. Once all the questions have been answered, the bean will be converted into a target and appended to the end of the currently open build file.
Ant's Nest can scan user-written tasks and add them to the Ant Task-Extension Model, so they can be used like any other task. To do this, select the option from the 'Tools' menu. You must then enter the fully qualified classname of the task you wish to add. This task must have been marked up with annotations from package 'antsnest.annotation' for it to be integrated into Ant's Nest.