Completing Ant Expressions


The IDE has a "completion" feature to reduce the number of keystrokes needed when editing an Ant script. When you use the completion feature, the Source Editor gives you a choice of how to complete the current word with a popup dialog box.

Activate the completion feature by typing the first few characters of an element or attribute and then pressing Ctrl-spacebar.

If there is only one possible completion, the missing characters from the word are filled in. (For attributes, =" is generated as well.)

If there are multiple possible matches, you can choose a completion by scrolling through the list and then pressing the Enter key once the correct word is selected. Keep typing to narrow the number of selections in the list.

The order of the selection list is generally smart, meaning that elements or attributes that are commonly used in the given context are put at the top.

For example, you can enter the following target

<target name="default" depends="dist,javadoc"     description="Build whole project."/>


by doing the following:

1.

Typing <t

2.

Pressing Ctrl-spacebar and then Enter to select target

3.

Pressing the spacebar

4.

Pressing Ctrl-spacebar and then Enter to select name, as shown in Figure 3-8 (name=" is inserted into the script)

Figure 3-8. Code Completion dialog box for an Ant script


5.

Typing default"

6.

Pressing Ctrl-spacebar and then Enter to select depends (depends=" is inserted into the script)

7.

Typing dist,javadoc"

8.

Pressing Ctrl-spacebar and then Enter to select description (description=" is inserted into the script)

9.

Typing Build whole project."/>



NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net