IVsUIHierarchy Interface

Definition

Redirects commands you invoke to the appropriate hierarchy window instead of the standard command handler.

public interface class IVsUIHierarchy : Microsoft::VisualStudio::Shell::Interop::IVsHierarchy
public interface class IVsUIHierarchy : Microsoft::VisualStudio::Shell::Interop::IVsHierarchy
__interface IVsUIHierarchy : Microsoft::VisualStudio::Shell::Interop::IVsHierarchy
[System.Runtime.InteropServices.Guid("E82609EA-5169-47F4-91D0-6957272CBE9F")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsUIHierarchy : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
[System.Runtime.InteropServices.Guid("E82609EA-5169-47F4-91D0-6957272CBE9F")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsUIHierarchy : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
[<System.Runtime.InteropServices.Guid("E82609EA-5169-47F4-91D0-6957272CBE9F")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsUIHierarchy = interface
    interface IVsHierarchy
[<System.Runtime.InteropServices.Guid("E82609EA-5169-47F4-91D0-6957272CBE9F")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsUIHierarchy = interface
    interface IVsHierarchy
Public Interface IVsUIHierarchy
Implements IVsHierarchy
Derived
Attributes
Implements

Remarks

When the hierarchy window has focus, any commands that you implement are sent to the hierarchy window instead of to the standard command-handling interface, IOleCommandTarget, which does not support hierarchies. IVsUIHierarchy is similar to IOleCommandTarget in terms of functionality, but also provides information about the item that is currently selected in the hierarchy, based on the value of VSITEMID.

Commands that you want to use from outside of the hierarchy window, such as adding a project item, should not be handled by the IVsUIHierarchy methods. Only use the IVsUIHierarchy interface to handle the following types of commands:

  • Commands that require the UI Hierarchy window to have focus.

  • Commands that act on a specific item within the hierarchy. (If ItemID equals VSITEMID_SELECTION, the command is applied to the selected item or items.)

Handle all other commands related to the active hierarchy with the IOleCommandTarget interface.

Tool tips in a UI hierarchy window are reserved to show the full caption of the node if the caption is being clipped by the current view (i.e. the window is too narrow to show the full caption). You can not provide custom tool tips for UI hierarchy windows.

Notes to Implementers

Implemented by VSPackage writers to handle commands such as Cut, Copy, Paste, Delete, and Rename sent to the hierarchy window.

Methods

AdviseHierarchyEvents(IVsHierarchyEvents, UInt32)

Allows clients to hook up for event notifications without making the hierarchy implement IConnectionPointContainer.

Close()

Closes and cleans up a hierarchy once the environment determines that it is no longer used.

ExecCommand(UInt32, Guid, UInt32, UInt32, IntPtr, IntPtr)

Executes a command on a specific item within a UI hierarchy window, or on the hierarchy itself.

GetCanonicalName(UInt32, String)

Used for workspace persistence, for example, for remembering window positions.

GetGuidProperty(UInt32, Int32, Guid)

Identifies the "type" of a particular node.

GetNestedHierarchy(UInt32, Guid, IntPtr, UInt32)

Makes it possible for a node of a given hierarchy to be a shortcut to the middle of another hierarchy.

GetProperty(UInt32, Int32, Object)

Gets properties of a given node or of the hierarchy.

GetSite(IServiceProvider)

Gets the service provider from which to access the services.

ParseCanonicalName(String, UInt32)

Returns the identifier of the hierarchy item, given its canonical name.

QueryClose(Int32)

Determines whether the given hierarchy can be closed.

QueryStatusCommand(UInt32, Guid, UInt32, OLECMD[], IntPtr)

Queries the object for the command status.

SetGuidProperty(UInt32, Int32, Guid)

Sets properties whose values are GUIDs.

SetProperty(UInt32, Int32, Object)

Sets properties of a specific node or of the hierarchy.

SetSite(IServiceProvider)

Sets the service provider from which to access the services.

UnadviseHierarchyEvents(UInt32)

Disables client notification of hierarchy events without requiring that the hierarchy implement IConnectionPointContainer.

Unused0()

Unused. Return E_NOTIMPL.

Unused1()

Unused. Return E_NOTIMPL.

Unused2()

Unused. Return E_NOTIMPL.

Unused3()

Unused. Return E_NOTIMPL.

Unused4()

Unused. Return E_NOTIMPL.

Extension Methods

IsCapabilityMatch(IVsHierarchy, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

EnumImportingProjects(IVsHierarchy)

Enumerates all the projects that are importing shared assets owned by the given Shared Project hierarchy.

EnumOwningProjectsOfSharedAssets(IVsHierarchy)

Enumerates all the Shared Projects that own and manage the shared assets being imported by the given project.

GetActiveProjectContext(IVsHierarchy)

Gets the active project context.

GetSharedItemsImportFullPaths(IVsHierarchy)

Gets the full paths of the shared ".projitems" files imported by the given project.

IsProjectImportingSharedAssets(IVsHierarchy)

Is the given project importing shared assets?

IsSharedAssetsProject(IVsHierarchy)

Is the given project a Shared Project?

SetActiveProjectContext(IVsHierarchy, IVsHierarchy)

Sets the active project context.

Applies to