Next: Defining new Modes, Previous: Defining new Target Models, Up: Customizing build Targets and Models
Targets are defined in a target
node which has three attributes:
name
category
category
begins and ends with an underscore, the menu for the
Target is placed in the toplevel Build menu.
messages_category
model
<icon>
<in-toolbar>
False
. A boolean indicating whether the
Target should have an associated icon in the Toolbar.
<in-menu>
True
. A boolean indicating whether the
Target should have an associated entry in the Build menu.
<in-contextual-menus-for-projects>
False
. A boolean indicating whether the
Target should have an associated entry in the contextual menu for projects.
<in-contextual-menus-for-files>
False
. A boolean indicating whether the
Target should have an associated entry in the contextual menu for files.
<read-only>
False
. A boolean indicating whether the
Target can be removed by the user.
<target-type>
compute_build_targets
hook. If set to main
, a new subtarget
will be create for each Main source defined in the project.
<launch-mode>
MANUALLY
. Indicates how the Target should be
launched. Possible values are MANUALLY
, MANUALLY_WITH_DIALOG
,
MANUALLY_WITH_NO_DIALOG
, and ON_FILE_SAVE
.
<server>
Build_Server
. Indicates the server used for
launching Target. See Remote operations.
<command-line>
<arg>
nodes, each containing an argument of the
default command line for this Target, starting with the executable.
<?xml version="1.0" ?> <my_target> <target model="gprclean" category="C_lean" name="Clean _All"> <in-toolbar>TRUE</in-toolbar> <icon>gps-clean</icon> <launch-mode>MANUALLY_WITH_DIALOG</launch-mode> <read-only>TRUE</read-only> <command-line> <arg>%gprclean</arg> <arg>-r</arg> <arg>%eL</arg> <arg>-P%PP</arg> <arg>%X</arg> </command-line> </target> </my_target>