This section describes the declarative syntax used by rules that define commands.<h2>Syntax</h2>
<pre>
<i>commands-rule:</i>
<i>command-tag</i>
<i>command-tag</i> <i>commands-rule</i>
</pre>
<h2><command> tag</h2>
Defines a new command. All standard command attributes are supported (see
<q ref="core.env:KitCommands!COMMAND_DEF">COMMAND_DEF</q> for details).
<pre>
<i>command-tag</i>:
<command <i>command-attributes=""</i> />
</pre>
<h2>Example</h2>
<pre>
<extend rule="defineCommands">
<constraint>model isa gml2:Model</constraint>
<comments>Custom workspace commands</comments>
<command id="FILE_PRINT" signal="BOARD->print" text="Print" icon="URL[<code>skin:icons.print.gif]"</code> category="STANDARD"/>
<command id="FILE_SAVE" signal="$ENV->saveModel" text="Save" icon="URL[<code>skin:icons.save.gif]"</code> key="Alt+S" category="STANDARD">
<disable>
var model = $ENV.model;
return !model || !model.isEditable() || !model.dirty;
</disable>
</command>
</extend>
</pre>(c) SAP AG 2003-2006. All rights reserved.