Stand-alone external tools
For the ultimate in external tool flexibility, create a 'stand-alone' external tool launch configuration. This is
similar to the project builder launch configurations discussed in the last section, except that it need have nothing
to do with project building, and you can explicitly run it whenever you choose. Suppose you wanted to have a way to
quickly see the contents of a .jar
file in your workspace using the jar utility.
- Select some
.jar
file in your workspace.
- Select Run > External Tools > Open External Tools Dialog... from the workbench toolbar.
- Select Program in the tree, then click New.
- Name the launch configuration
jar inspector
.
- Use the first Browse File System... button to locate the jar executable.
- In the Arguments field, type
-tvf
and a space, then click Variables....
- In the Select Variable dialog, you will see a number of variables you can pass as arguments to the program
specified in Location. Select resource_loc and click OK.
- When this buildfile is run, the absolute path of the resource selected in the workbench will be passed to the
jar utility in the position specified.
- Click Run.
- Notice that the buildfile sends the jar utility output to the Console view.
- Select a different
.jar
file in your workspace.
- Click the External Tools button in the toolbar. Notice the contents of this jar are sent to the Console view as well.
Now you have a quick and easy way to see the output of the jar utility for any
.jar
file in your
workspace.
This example has only scratched the surface of what you can do with external tools. The important things to
remember are that you can create an external tool for anything you can run on your system, and that you can pass
arguments to the external tool related to the current workbench selection. In many cases, this allows you to loosely
integrate tools that do not have corresponding Eclipse plug-ins.
Creating Ant buildfiles
Editing Ant buildfiles
Saving & Reusing Ant options
Running Ant buildfiles
Creating a project builder Ant buildfile
Ant buildfiles as project builders
Executing project builders
External tools
Non-Ant project builders