Partager via


ModelingPackage Class

Definition

Important

This API is not CLS-compliant.

Toolbox related bits

public ref class ModelingPackage abstract : Microsoft::VisualStudio::Shell::Package, Microsoft::VisualStudio::Shell::Interop::IVsToolWindowFactory
public ref class ModelingPackage abstract : Microsoft::VisualStudio::Shell::Package, Microsoft::VisualStudio::Modeling::Shell::IToolWindowProvider, Microsoft::VisualStudio::Shell::Interop::IVsToolWindowFactory
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class ModelingPackage : Microsoft.VisualStudio.Shell.Package, Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class ModelingPackage : Microsoft.VisualStudio.Shell.Package, Microsoft.VisualStudio.Modeling.Shell.IToolWindowProvider, Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory
[<System.CLSCompliant(false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ModelingPackage = class
    inherit Package
    interface IVsToolWindowFactory
[<System.Runtime.InteropServices.ComVisible(true)>]
type ModelingPackage = class
    inherit Package
    interface IVsToolWindowFactory
    interface IToolWindowProvider
Public MustInherit Class ModelingPackage
Inherits Package
Implements IVsToolWindowFactory
Public MustInherit Class ModelingPackage
Inherits Package
Implements IToolWindowProvider, IVsToolWindowFactory
Inheritance
ModelingPackage
Attributes
Implements

Constructors

ModelingPackage()

Properties

ApplicationRegistryRoot

Gets the root registry key of the current Visual Studio registry hive.

(Inherited from Package)
Locator

Helper for locating model element references.

SetupMode
UserDataPath

Gets the path to user data storage for Visual Studio.

(Inherited from Package)
UserLocalDataPath

Returns the path to user data storage for Visual Studio. Typically this is %USERPROFILE%\Local Settings\Application Data
Visual Studio[ver] but this can change based on any alternate root that the shell was initialized with.

(Inherited from Package)
UserRegistryRoot

Returns the registry root for the current user. Typically this is HKCU\Software\Microsoft\VisualStudio[ver] but this can change based on any alternate root that the shell is initialized with. This key is read-write.

(Inherited from Package)
Zombied

Gets a value indicating whether the package in the process of shutdown.

(Inherited from Package)

Methods

AddOptionKey(String)

Adds a user option key name into the list of option keys.

(Inherited from Package)
AddOrReplaceToolboxItem(IToolboxService, ModelingToolboxItemBase)
Obsolete.

Add a toolbox item if it is not present. Will replace an existing toolbox item if the item is already present

AddToolboxItems(IEnumerable<ModelingToolboxItemBase>)

Add the passed collection of ModelingToolboxItemBase items into the Visual Studio toolbox.

AddToolWindow(Type)

We will provide basic tool window support for now, to see if things work. This should be done at the base Package level, in a similar fashion to proferred services.

CreateInstance(Guid, Guid, Type)

Create the specified COM object using Visual Studio's ILocalRegistry and cast it to the given managed type. If VS cannot create it, then fall back to Activator.CreateInstance. This allows managed classes to be registered in local to the particular VS version in HKLM\Software\Microsoft\VisualStudio\8.0\clsid.

(Inherited from Package)
CreateLocator()

Factory method to create a ModelElementLocator instance for this package.

CreateSettingsObserverAsync(Type, SettingsObserverArguments, CancellationToken)

Creates a settings observer object for the package. This method is called when unified settings are active, but only if the package has one or more ProvideSettingsObserverAttributes.

(Inherited from Package)
CreateTool(Guid)

Enables derived classes to provide an implementation if necessary.

(Inherited from Package)
CreateToolboxItems()

When overriden in a derived class, returns the list of dynamic/custom toolbox items provided by this package.

CreateToolWindow(Guid, Int32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
CreateToolWindow(Guid, UInt32)

Create the specified tool window.

CreateToolWindow(Type, Int32, Object)

Create a tool window of the specified type with the specified ID.

(Inherited from Package)
CreateToolWindow(Type, Int32, UInt32, Object, Guid)

Create a tool window of the specified type with the specified ID. This is the only method that should be calling IVsUiShell.CreateToolWindow()

(Inherited from Package)
CreateToolWindow(Type, Int32, UInt32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
CreateToolWindow(Type, Int32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
Dispose(Boolean)

Releases the resources used by the Package object.

(Inherited from Package)
FindToolWindow(Type, Int32, Boolean)

Gets the tool window corresponding to the specified type and ID.

(Inherited from Package)
FindWindowPane(Type, Int32, Boolean)

Gets the window pane corresponding to the specified type and ID, and if no window pane of that type exists creates one if told to do so.

(Inherited from Package)
GetAutomationObject(String)

Gets the automation object for the VSPackage.

(Inherited from Package)
GetDialogPage(Type)

Gets the requested dialog page.

(Inherited from Package)
GetOutputPane(Guid, String)

Gets the requested output window.

(Inherited from Package)
GetProviderLocale()

Returns the locale of the environment.

(Inherited from Package)
GetService(Type)

Gets type-based services from the VSPackage service container.

(Inherited from Package)
GetToolboxItemData(String, DataFormats+Format)

Gets the content of the data format for the specified toolbox item ID and data format.

(Inherited from Package)
GetToolboxItemDataAsync(String, DataFormats+Format) (Inherited from Package)
GetToolWindow(Type, Boolean)

Returns the tool window instance corresponding to the given type. We only support single-instance tool windows, so this will always be a 1-1 mapping.

GetToolWindow(Type)

Returns the tool window instance corresponding to the given type. We only support single-instance tool windows, so this will always be a 1-1 mapping.

Initialize()

Derived classes should override this method to do package-specific work such as registering editor factories

InstantiateToolWindow(Type, Object)

Construct a tool window of the specified type.

(Inherited from Package)
InstantiateToolWindow(Type) (Inherited from Package)
IsLocalService(Type)

Determines whether the specified service type can be retrieved without requiring an RPC transition to the UI thread.

(Inherited from Package)
OnLoadOptions(String, Stream)

Invoked by the package class when there are options to be read out of the solution file.

(Inherited from Package)
OnSaveOptions(String, Stream)

Invoked by the Package class when there are options to be saved to the solution file.

(Inherited from Package)
OnToolboxInitialized(Object, EventArgs)

Event handler for ToolboxInitialized event The dynamic/custom toolbox items will be re-registered.

OnToolboxUpgraded(Object, EventArgs)

Event handler for ToolboxUpgraded event The dynamic/custom toolbox items will be re-registered.

ParseToolboxResource(TextReader, Guid)

Parses an embedded text resource of appropriate format for information about which items should be added to the Toolbox.

(Inherited from Package)
ParseToolboxResource(TextReader, ResourceManager)

Parses an embedded text resource of appropriate format for information about which items should be added to the Toolbox.

(Inherited from Package)
QueryClose(Boolean)

Called to ask the package if the shell can be closed.

(Inherited from Package)
RegisterEditorFactory(IVsEditorFactory)

Registers an editor factory with Visual Studio.

(Inherited from Package)
RegisterProjectFactory(IVsProjectFactory)

Registers a project factory with Visual Studio.

(Inherited from Package)
SetupDynamicToolbox()

Adds the dynamic/custom toolbox items.

ShowOptionPage(Type)

Displays a specified tools options page.

(Inherited from Package)

Events

ToolboxInitialized

Event generated whenever Visual Studio initializes its Toolbox.

(Inherited from Package)
ToolboxUpgraded

Event generated whenever Visual Studio upgrades its Toolbox.

(Inherited from Package)

Explicit Interface Implementations

IOleCommandTarget.Exec(Guid, UInt32, UInt32, IntPtr, IntPtr)

Executes a specified command or displays help for a command.

(Inherited from Package)
IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr)

Queries the object for the status of one or more commands generated by user interface events.

(Inherited from Package)
IServiceContainer.AddService(Type, Object, Boolean)

Adds the given service to the VSPackage's service container.

(Inherited from Package)
IServiceContainer.AddService(Type, Object)

Adds the given service to the VSPackage's service container.

(Inherited from Package)
IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean)

Adds the given service to the service container by means of the specified ServiceCreatorCallback.

(Inherited from Package)
IServiceContainer.AddService(Type, ServiceCreatorCallback)

Adds the given service to the VSPackage's service container.

(Inherited from Package)
IServiceContainer.RemoveService(Type, Boolean)

Removes the given service type from the service container, and optionally promotes the removal of the service to parent service containers.

(Inherited from Package)
IServiceContainer.RemoveService(Type)

Removes the given service type from the service container.

(Inherited from Package)
IServiceProvider.GetService(Type)

Gets the service of the specified type.

(Inherited from Package)
IServiceProvider.QueryService(Guid, Guid, IntPtr)

Internal IServiceProvider implementation.

(Inherited from Package)
IVsAsyncUnifiedSettingsObserverFactory.CreateSettingsObserverAsync(Guid)

Instantiates Unified Settings observer identified by the given guid.

(Inherited from Package)
IVsPackage.Close()

Closes and disposes the package.

(Inherited from Package)
IVsPackage.GetAutomationObject(String, Object)

Gets an automation-friendly object for this package.

(Inherited from Package)
IVsPackage.GetPropertyPage(Guid, VSPROPSHEETPAGE[])

Proffers access to the Tools menu Options and the property pages of the Customize Toolbox dialog boxes.

(Inherited from Package)
IVsPackage.QueryClose(Int32)

Called to ask the VSPackage if the Visual Studio shell can be closed.

(Inherited from Package)
IVsPackage.ResetDefaults(UInt32)

Resets Toolbox defaults.

(Inherited from Package)
IVsPackage.SetSite(IServiceProvider)

Initializes the VSPackage in the Visual Studio environment.

(Inherited from Package)
IVsPersistSolutionOpts.LoadUserOptions(IVsSolutionPersistence, UInt32)

Loads user options for a given solution.

(Inherited from Package)
IVsPersistSolutionOpts.ReadUserOptions(IStream, String)

Reads user options for a given solution.

(Inherited from Package)
IVsPersistSolutionOpts.SaveUserOptions(IVsSolutionPersistence)

Saves user options for a given solution.

(Inherited from Package)
IVsPersistSolutionOpts.WriteUserOptions(IStream, String)

Writes user options for a given solution.

(Inherited from Package)
IVsToolboxItemProvider.GetItemContent(String, UInt16, IntPtr)

Gets an item.

(Inherited from Package)
IVsToolboxItemProvider2.GetItemContentAsync(String, UInt16) (Inherited from Package)
IVsToolWindowFactory.CreateToolWindow(Guid, UInt32)

Creates a tool window of the specified type with the specified ID.

(Inherited from Package)
IVsUserSettings.ExportSettings(String, IVsSettingsWriter)

This method implements the IVsUserSettings Interface used to manage profiles and import/export settings to XML files.

(Inherited from Package)
IVsUserSettings.ImportSettings(String, IVsSettingsReader, UInt32, Int32)

Retrieves a VSPackage's configuration using the Visual Studio settings mechanism when a user selects the import option of the Import/Export Settings feature on the IDE’s Tools menu. This method is part of the implementation of the IVsUserSettings interface used to manage profiles and import/export settings to XML files.

(Inherited from Package)
IVsUserSettingsMigration.MigrateSettings(IVsSettingsReader, IVsSettingsWriter, String)

Migrates settings from a previous version.

(Inherited from Package)
IVsUserSettingsQuery.NeedExport(String, Int32)

Determines whether settings have changed and should be re-exported.

(Inherited from Package)

Extension Methods

QueryService(IServiceProvider, Guid)

Gets a service exposed by a service provider based on its service GUID.

QueryService<TService>(IServiceProvider)

Gets a service exposed by a service provider based on its service type.

Applies to