Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

Add a new command

  • Last UpdatedJul 23, 2024
  • 2 minute read

Using IDE extensibility infrastructure, IDE extensions can introduce new commands to the command set provided by the IDE. Predefined IDE commands and all new commands introduced by all of its extensions make the global pool of commands. The global command pool is available to the IDE itself and to all of the extensions for command updates and handling.

To add a new command into IDE global command pool, extension should provide command definition in its manifest resource. Remember, view extensions can introduce new commands and act as a command extension too. Following is an example extract from the sample manifest, emphasizing on how to add a new command.

<Snapins>

<Snapin TypeId="907162B9-F0AE-40d0-92C9-79E3DAB04D43" Priority="550">

<Resources>

<Command Id="cmdTestCheckin">

<Name>Test Check-in</Name>

<IdleUpdate>true</IdleUpdate>

<Private>false</Private>

<ContextSensitive>true</ContextSensitive>

<Description>Checks-in the object</Description>

</Command>

</Resources>

</Snapin>

</Snapins>

  • Resources tag is where all command and all IDE user interface elements are defined.

  • Command tag provides command definition. The "Id" attribute is the command identifier. Using this Id the IDE and all IDE extensions recognize this command. The command identifier must be unique amongst all commands.

  • Name tag is reserved for future use when we support command UI customization.

  • IdleUpdate tag dictates whether the command needs idle updates. Valid values are true and false with false being default.

  • Private tag indicates whether the command can be overridden by other extensions. Valid values are true and false with false being default.

  • Description tag provides status bar prompt when the command is selected.

  • ContextSensitive dictates whether the command needs to be updated whenever selection in the active view changes. Valid values are true and false with false being default.

In addition to providing command definitions in the form of manifest, if it is interested in handling commands, it must register its command target with the IDE command framework, update command UI vectors and process the commands upon invocation. Please see “Handling Commands” section for detailed information.

TitleResults for “How to create a CRG?”Also Available in