Java Reference
In-Depth Information
Macros are delimited on either side by dollar signs. For example, in figure 5.13,
the
homeFolder
property is being set to the same directory where the
IDEA
project
file is stored, via the macro
$ProjectFileDir$
. A full list of macros is available
through the
Build File Properties
dialog.
To use a macro as a property value, follow these steps:
On the
Properties
tab, click the
Add
button to create a new system prop-
erty or select an existing one from the list.
1
Select the
Va l u e
column.
2
If you know the name of the macro, you can type it here; or, click the plus
icon to browse the available macros, as shown in figure 5.14. Use the pre-
view window to see how the macro will be evaluated at runtime. Note that
some macros are for use in other parts of
IDEA
and are unavailable for
use as system properties. These off-limits properties show up empty in
the preview window.
3
Figure 5.14
Macros make it easy to create
portable Ant build files.