Properties and Methods Extended by Project Subtypes

A project subtype has a lot of power to influence the behavior of the project because it is constructed as an aggregator of a base project. This section summarizes some of the features that can be enhanced or modified by project subtypes.

Features Gained by Aggregation

The following table summarizes many of the methods that aggregation enables project subtypes to override in base projects.

Methods Overridden by Aggregation Project Subtype
From IVsHierarchy:

GetProperty

SetProperty

GetGuidProperty

SetGuidProperty
Enables a project subtype to

- Change caption and icon of project node.
- Completely override project Browse object.
- Control whether project can be renamed.
- Control sort order.
- Control user context for dynamic help.
From IVsProject:

GetItemContext
Enables a project subtype to control what contextual services are provided to designers and editors.
From IOleCommandTarget:

QueryStatus

Exec

QueryStatusCommand

ExecCommand
Enables a project subtype to

- Participate in the command routing for project commands.
- Add, remove, or disable both project ambient commands and Solution Explorer active commands.
IVsFilterAddProjectItemDlg2 Enables the project subtype to filter what the user sees in the Add New Item dialog box.
IVsSingleFileGeneratorFactory Enables a project subtype to

- Determine the default generator given a file extension.
- Map a human readable generator name to a COM object.

Properties Used by Project Subtypes

The environment and base project system can use the properties from __VSSPROPID and __VSSPROPID2 enumerations detailed in the following table to enable a project subtype to control various features of the project system.

VSHPROPID property Project Subtype
AddItemTemplatesGuid Allows a project subtype to control the contents of the Add Item dialog box. The project subtype can provide a new specification of template directories, add new kinds of items, remove existing items, and reorganize a subset of the items in the base project's Add Item dialog box.
PropertyPagesCLSIDList Allows a project subtype to add or remove configuration-independent property pages.
CfgPropertyPagesCLSIDList Allows a project subtype to add or remove configuration-dependent property pages.
ExtObjectCATID Allows a project subtype to provide an Automation Extender for the project or project item objects by knowing the Extender CATID. For example, a project subtype can provide a custom Project.Extender("<subtype>") object.
BrowseObjectCATID Allows a project subtype to provide an Automation Extender for the Browse object by knowing the Extender CATID. For example, a project subtype can add extra properties to the Properties collection.
CfgBrowseObjectCATID Allows a project subtype to provide an Automation Extender for the project configuration browse object. For example, a project subtype can add extra properties to the Properties collection.
CfgExtObjectCATID Allows a project subtype to provide an Automation Extender for the configuration object.
DefaultPlatformName Allows a project subtype to determine the platform name for the project's configuration objects.

The base project provides a default implementation of the above properties. The base project gets these by calling QueryInterface for IVsHierarchy on the outermost project subtype, thus allowing the project subtype to override the implementation of the properties.

See also