Setting up Commands for Selected Files


To get file-specific commands (such as Compile File, Run File, and Debug File) to work in the IDE, you need to do the following:

  • Add a target to your Ant script for the command, making sure that all necessary path elements for the command are defined, either in the build script or in a .properties file that is called by the script. In NetBeans IDE 5.0, you can have the IDE generate a target for the Compile File command, but you have to write the others from scratch.

  • Map the target to the IDE through the project's project.xml file, and include a context element to provide the IDE a way of passing the currently selected files to the Ant script. If the IDE generates the target for you, it performs this step for you as well.

  • Define any properties that are needed in the project's project.xml file, either in the project.xml file or in a properties file that is referenced from the project.xml file.

See the next few topics for examples of how to set up the commands.



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