Share via


VsShellUtilities Class

Provides static helper methods to use with the Visual Studio shell.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Shell.VsShellUtilities

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public NotInheritable Class VsShellUtilities
public static class VsShellUtilities
public ref class VsShellUtilities abstract sealed
[<AbstractClass>]
[<Sealed>]
type VsShellUtilities =  class end
public final class VsShellUtilities

The VsShellUtilities type exposes the following members.

Properties

  Name Description
Public propertyStatic member ShellIsInitialized Determines whether the shell is initialized. The shell is initialized after the main window is visible and all services are available.
Public propertyStatic member ShellIsShuttingDown Determines whether the shell is shutting down. If the shell is shutting down, either the shell service won't be available at all or it will be both initialized and zombie. On startup the shell is zombie until it is initialized.
Public propertyStatic member ShellIsZombie Determines whether the shell is in a zombie state. The shell is in zombie state at startup until it is initialized and while shutting down.

Top

Methods

  Name Description
Public methodStatic member ApplyListViewThemeStyles Modifies a Windows Forms ListView control to use the new Explorer style theme.
Public methodStatic member ApplyTreeViewThemeStyles(TreeView) Modifies a Windows Forms TreeView control to use the new Explorer style theme. Hot tracking is enabled by default.
Public methodStatic member ApplyTreeViewThemeStyles(TreeView, Boolean) Modifies a Windows Forms TreeView control to use the new Explorer style theme.
Public methodStatic member EmptyTaskList Empties the task list.
Public methodStatic member GetCfgProvider Gets the configuration provider object for a given project.
Public methodStatic member GetDebugMode Gets the current debug mode of the shell, for example, design mode, running mode, or break mode.
Public methodStatic member GetEnvironmentFont Retrieve the host's environment font as a Font.
Public methodStatic member GetErrorListItems Gets the items in the error list.
Public methodStatic member GetHierarchy Gets the hierarchy node that is specified by the project GUID.
Public methodStatic member GetMiscellaneousProject(IServiceProvider) Gets the miscellaneous project from the current solution.
Public methodStatic member GetMiscellaneousProject(IServiceProvider, Boolean) Returns the miscellaneous project in a solution.
Public methodStatic member GetOutputWindowPane Gets the output window pane that is specified by the GUID.
Public methodStatic member GetPackageExtensionPoint<TExtensionPoint, TInterface> Creates an instance of an extension point from the given package. This is analagous to finding an "Export" of a given type (T) with instance metadata given by the GUID of the instance.
Public methodStatic member GetProject Returns a project for the specified document.
Public methodStatic member GetProvisionalViewingStatus(String)
Public methodStatic member GetProvisionalViewingStatus(IVsHierarchy, UInt32)
Public methodStatic member GetRDTDocumentInfo Gets an IVsPersistDocData interface and a document cookie from the running document table for the specified document.
Public methodStatic member GetRunningDocumentContents Gets the text of the specified file, if it exists in the running document table.
Public methodStatic member GetTaskItems Obsolete. Gets a list of tasks.
Public methodStatic member GetTaskItems2 Obsolete. Gets a list of all task items.
Public methodStatic member GetTaskItems3 Gets a list of all tasks items.
Public methodStatic member GetTextView Gets the text view in the specified window frame.
Public methodStatic member GetUIHierarchyWindow Gets a window for the given GUID.
Public methodStatic member GetWindowObject Gets the window that exists in the specified window frame.
Public methodStatic member IsDocumentOpen Determines whether the specified document is open.
Public methodStatic member IsInAutomationFunction Determines whether the extensibility object is currently executing an automation operation.
Public methodStatic member IsSolutionBuilding Determines whether the build manager is busy.
Public methodStatic member IsVisualStudioInDesignMode Determines whether Visual Studio is in design mode (as opposed to run mode or debug mode).
Public methodStatic member LaunchDebugger Starts the debugger.
Public methodStatic member LookupPackageString Finds the package string
Public methodStatic member OpenAsMiscellaneousFile Opens the specified miscellaneous file in the specified editor.
Public methodStatic member OpenBrowser(String) Open the user's default browser on the given URL. The default browser is set in the Browse With UI. The internal browser is not used if the shell is in a modal state.
Public methodStatic member OpenBrowser(String, UInt32) Open the user's default browser on the given URL. The default browser is set in the Browse With UI. The internal browser is not used if the shell is in a modal state.
Public methodStatic member OpenDocument(IServiceProvider, String) Opens the specified document.
Public methodStatic member OpenDocument(IServiceProvider, String, Guid, IVsUIHierarchy%, UInt32%, IVsWindowFrame%) Opens the specified document in the specified view.
Public methodStatic member OpenDocument(IServiceProvider, String, Guid, IVsUIHierarchy%, UInt32%, IVsWindowFrame%, IVsTextView%) Opens the specified document in the specified logical view.
Public methodStatic member OpenDocumentWithSpecificEditor(IServiceProvider, String, Guid, Guid) Opens the specified document by using the specified editor.
Public methodStatic member OpenDocumentWithSpecificEditor(IServiceProvider, String, Guid, Guid, IVsUIHierarchy%, UInt32%, IVsWindowFrame%) Opens the specified document by using the specified editor.
Public methodStatic member OpenSystemBrowser Open the system default browser on the given URL.
Public methodStatic member PromptYesNo Displays a message box that contains the specified title and prompts the user to respond (yes or no) to the specified message.
Public methodStatic member RenameDocument Renames the specified document.
Public methodStatic member SaveFileIfDirty(IVsTextView) If the file is dirty, saves it in the specified text view.
Public methodStatic member SaveFileIfDirty(IServiceProvider, String) Saves the specified file if it is dirty.
Public methodStatic member SetOleCmdText Sets the actual text in an OLECMDTEXT marshaled structure. Used in typical command routing code (implementations of IOleCommandTarget)
Public methodStatic member ShowMessageBox Displays a message box with the specified message.
Public methodStatic member TryGetPackageExtensionPoint<TExtensionPoint, TInterface> Creates an instance of an extension point from the given package. This is analagous to finding an "Export" of a given type (T) with the instance metadata given by the "instance" Guid.
Public methodStatic member TryOpenDocument Tries to open a document using the appropriate project.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace