CrossStudio external-tool configuration files are structured using XML syntax for its simple construction and parsing.

Tool configuration files

The CrossStudio application will read the tool configuration file when it starts up. By default, CrossStudio will read the file $(StudioUserDir)/tools.xml.


All tools are wrapped in a tools element:



Inside the tools element are item elements that define each tool:

  <item name="logical name">


The item element requires an name attribute, which is an internal name for the tool, and has an optional wait element. When CrossStudio invokes the tool on a file or project, it uses the wait element to determine whether it should wait for the external tool to complete before continuing. If the wait attribute is not provided or is set to yes, CrossStudio will wait for external tool to complete.

The way that the tool is presented in CrossStudio is configured by elements inside the


The menu element defines the wording used inside menus. You can place a shortcut to the menu using an ampersand, which must be escaped using &amp in XML, before the shortcut letter. For instance:

<menu>&amp;PC-lint (Unit Check)</menu>

The optional text element defines the wording used in contexts other than menus, for instance when the tool appears as a tool button with a label. If text is not provided, the tool's textual appearance outside the menu is taken from the menu element (and is presented without an shortcut underline). For instance:

<text>PC-lint (Unit Check)</text>

The optional tip element defines the status tip, shown on the status line, when moving over the tool inside CrossStudio:

<tip>Run a PC-lint unit checkout on the selected file or folder</tip>

The optional key element defines the accelerator key, or key chord, to use to invoke the tool using the keyboard. You can construct the key sequence using modifiers Ctrl, Shift, and Alt, and can specify more than one key in a sequence (note: Windows and Linux only; OS X does not provide key chords). For instance:

<key>Ctrl+L, Ctrl+I</key>

The optional message element defines the text shown in the tool log in CrossStudio when running the tool. For example:


The optional match element defines which documents the tool will operator on. The match is performed using the file extension of the document. If the file extension of the document matches one of the wildcards provided, the tool will run on that document. If there is no match element, the tool will run on all documents. For instance:


The optional output element defines the name of the output file created by the tool. If this element is specified the the output file will be opened in the editor when the tool has finished execution. The macros $(InputPath) and $(InputBaseName) can be used to name the output file. For Instance:


The commands element defines the command line to run to invoke the tool. The command line is expanded using macros applicable to the file derived from the current build configuration and the project settings. Most importantly, the standard $(InputPath) macro expands to a full pathname for the target file.

Additional macros constructed by CrossStudio are:

For instance:

  &quot;$(LINTDIR)/lint-nt&quot; -i$(LINTDIR)/lnt &quot;$(LINTDIR)/lnt/co-gcc.lnt&quot;
  $(DEFINES) $(INCLUDES) -D__GNUC__ -u -b +macros -w2 -e537 +fie +ffn -width(0,4) -hF1
  &quot;-format=%f:%l:%C:s%t:s%m&quot; &quot;$(InputPath)&quot;

In this example we intend $(LINTDIR) to point to the directly where PC-lint is installed and for $(LINTDIR) to be defined as a CrossStudio global macro. You can set global macros using Project > Macros... or Tools > Options > Building > Global Macros.

Note that additional &quot entities are placed around pathnames in the commands section—this is to ensure that paths that contain spaces are correctly interpreted when the command is executed by CrossStudio.