Models are defined in a target-model
node which has one attributes,
name
, which contains the name of the model, and which supports the
following sub-nodes:
<icon>
The stock name of the icon to associate by default with targets of this model.
<description>
A one-line description of what the Model supports
<server>
Optional, defaulting to Build_Server
. Indicates the server used for
launching Targets of this model. See Remote operations.
<is-run>
Optional, defaulting to False
. A boolean indicating whether this
target corresponds to the launching of an executable rather than a build.
Targets with such a model are launched through an interactive console in
GPS, and their output is not parsed for errors.
<uses-shell>
Optional, defaulting to False
. A boolean indicating whether Targets
of this model should be launched via the shell pointed to by the SHELL
environment variable.
<command-line>
Contains a number of <arg>
nodes, each containing an argument of the
default command line for this model, starting with the executable.
<switches command="executable_name">
The graphical description of the switches. (see Defining tool switches)
<?xml version="1.0" ?> <my_model> <target-model name="gprclean" category=""> <description>Clean compilation artefacts with gprclean</description> <command-line> <arg>gprclean</arg> <arg>-P%PP</arg> <arg>%X</arg> </command-line> <icon>gps-clean</icon> <switches command="%(tool_name)s" columns="1"> <check label="Clean recursively" switch="-r" tip="Clean all projects recursively" /> </switches> </target-model> </my_model>