다음을 통해 공유


Contributing to the Automation Model

The Visual Studio environment provides a programming interface known as the automation model, a set of powerful interfaces for customizing the environment. The automation model is the object model that enables end users to create add-ins, to create new wizards, and to use Visual Studio macros.

An add-in or any consumer of automation extends the Visual Studio environment in a way similar to creating a VSPackage. Both let you customize the experience of the end user of the environment, but VSPackages offer you control over the most basic functions of the environment. Sometimes you might use a VSPackage and the automation model together to provide a rich end-user experience.

In addition, it is appropriate for you, as a VSPackage developer, to contribute to the automation model; by doing this, you enable end users of your VSPackage to create add-ins, write macros and, generally provide a consistent user model experience when they use your VSPackage in Visual Studio.

To make the end-user experience consistent, you can follow a set of guidelines as you design your VSPackage so that the automation model for your VSPackage follows the ideas in Visual Studio.

In This Section

  • Automation Model Overview
    Defines the automation model as a related groups of objects that control major facets of the common environment. This set of objects is pictured in a diagram of the automation model.

  • Providing Automation for VSPackages
    Discusses the two main ways to provide automation for your VSPackage.

  • Exposing Project Objects
    Provides step-by-step instructions for creating VSPackage-specific objects.

  • Project Modeling
    Explains the standard project objects that are required to create automation for your new project type and illustrates the path that project automation follows. This topic also provides listings of declarations and implementation for classes.

  • Exposing Events in the Visual Studio SDK
    Provides step-by-step instructions for creating events for your automation model.

  • Automation Support for Options Pages
    Describes how to return an automation object for supporting properties of a VSPackage's custom Options dialog box on the Tool menu by extending the DTE.Properties object.

  • Providing Automation for Code
    Explains that creating an automation model for your code is not required. However, a link is provided in this topic that provides insightful information into code models.

  • How to: Provide Automation for Windows
    Explains that providing automation is a good idea whenever you want to make automation objects available on a window, and the environment does not already provide a ready-made automation object. Discusses automation for tool windows and document windows.

  • Using the Automation Model
    Provides two code examples that show how an automation consumer obtains the initial project automation objects. The first example uses a Visual Studio macro; the second uses C++ code.

  • Automation for Configuration and SelectedItem Objects
    Provides information about automation for Configuration Options and automation for Selected Items.

Reference

  • GetAutomationObject
    Provides a code sample that shows how a VSPackage participates in the DTE automation object model. Lists parameters, return values, and selected remarks.
  • Extending the Automation Model
    Discusses how the automation model and the VSPackage model represent a two-prong approach to extensibility in the Visual Studio environment.