Command Table (.vsct) File for a Data View

The command table (.vsct) file provides custom commands on the data view context menus.

The context menu commands must be defined inside a special set of base menu groups provided in the vsshlids.h and stdidcmd.h files.

This file should be written when a provider wants to specify custom commands for data view nodes. If this file is provided, the data provider must also implement the IVsDataViewCommandProvider support entity to handle the commands.

A data view is essentially a tree view, which means it contains various object nodes representing data objects, and static nodes representing client-defined nodes, as opposed to objects enumerated in the data source. Any set of these nodes may be selected by the user, and there must be a data view context menu that represents each possible combination of nodes. For each of these context menus, there is an extensible menu group into which a provider can add its own custom commands.

The following sections describe these menu groups. They are defined in guidVSData unless otherwise specified.

IDG_DV_CONNECTION

Displayed in a context menu when the connection node is selected, in the same group as the New Query command.

IDG_DV_OBJECT_NODE

Displayed in a context menu when a single object node is selected, for example, a table node called "authors."

IDG_DV_STATIC_NODE

Displayed in a context menu when a single static node is selected, for example, a node called "Tables."

IDG_DV_HOMOGENEOUS_OBJECT_NODES

Displayed in a context menu when multiple object nodes of the same type are selected, for example, table nodes "authors" and "publishers".

IDG_DV_HETEROGENEOUS_OBJECT_NODES

Displayed in a context menu when multiple object nodes of different types are selected, for example, the table node "authors" and the view node "titleview".

IDG_DV_STATIC_NODES

Displayed in a context menu when multiple static nodes are selected, for example a node called "Tables" and a node called "Views".

IDG_DV_HETEROGENEOUS_NODES

Displayed in a context menu when multiple nodes of any kind are selected, for example, a node called "Views" and a table node "authors".

IDG_DV_GLOBAL1

Displayed in the global Data menu and is available for all nodes.

IDG_DV_GLOBAL2

Displayed in the global Data menu and is available for a small set of nodes.

IDG_DV_GLOBAL2

Displayed in the global Data menu and is available for only specific nodes.

See Also

Concepts

DDEX Data View Support