# User-defined Tools

## Introduction

Often, you'll find the inbuilt functionality provided by Anjuta to be insufficient. In these cases, you might be tempted to either add the feature yourself to the Anjuta codebase or submit a feature request to implement the feature. However, both approaches are likely to be slow and problematic, especially if your tool is a specialized one. In these circumstances, it is advisable to use the Anjuta tools framework instead.

Anjuta provides a powerful framework for defining user-defined tools for extending it's functionality. Tools have access to almost all features of the IDE through the use of variables. You can add tools under any menu item, specify input, output and error redirection within the GUI framework and supply command line parameters to the tool.

## Tools Examples

Simply put, a tool is any external command that you want to use from within the GUI framework of Anjuta. As a simply example, say, you want to use Doxygen to build your project documentation. But you don't want to resort to the command line every time you want to fire the command 'doxygen' to update your project documentation. Further, you want single-click access to the files and lines specified in the warning and error messages of Doxygen, just as you do with the C compiler.

### Defining Doxygen as an user-defined tool

Adding support for Doxygen

The above figure shows how you can use the tool editor to specify Doxygen as a project level tool. Here is another example which shows how you can use the excellent A2PS tool as an alternative to Anjuta's inbuilt printing support.

### Using A2PS for Printing

Using A2PS for Printing

The above screenshot also shows the use of variables. You can use numerous variables to define command-line parameters as well as standard input to the tool. A complete list of variables is available for your reference with the tool editor. To see this list, press the 'Help' button while in the tool editor.

The tool editor shown in the above screenshots can be accessed from the 'Settings' menu of the IDE. When invoked, it shows a list of currently defined user tools. Initially, the tool list will be empty, but this will change as you add new tools using the tool editor. The tool editor supports adding, removing and editing tools.

### The tool editor

The tool editor