Export (0) Print
Expand All

CodeWindowManager Class

Wraps an IVsCodeWindow object for use in a language service.

This class is not CLS-compliant.  

Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService (in microsoft.visualstudio.package.languageservice.dll)

[CLSCompliantAttribute(false)] 
[ComVisibleAttribute(true)] 
public class CodeWindowManager : IVsCodeWindowManager
/** @attribute CLSCompliantAttribute(false) */ 
/** @attribute ComVisibleAttribute(true) */ 
public class CodeWindowManager implements IVsCodeWindowManager
CLSCompliantAttribute(false) 
ComVisibleAttribute(true) 
public class CodeWindowManager implements IVsCodeWindowManager

This class provides a default implementation of the VSIP interface, IVsCodeWindowManager and manages the LanguageService, Source, ViewFilter, and DocumentProperties objects associated with the given IVsCodeWindow.

This class calls CreateViewFilter on your LanguageService for each new IVsTextView created by Visual Studio and installs the resulting filter into the command chain. You do not have to override CreateViewFilter, since a default view filter will be created.

If your LanguageService returns an object from CreateDocumentProperties then you will have properties in the Properties window associated with your source files.

This class also provides support for optional drop-down combo boxes (also known as drop-down bars), as represented by the IVsDropdownBar interface, for listing types and members by installing the TypeAndMemberDropdownBars object returned from your CreateDropDownHelper method. If you do not implement CreateDropDownHelper, no drop down-bars are established.

Notes to Implementers If you need to add any user interface (UI) features to the view window, you can derive a class from the CodeWindowManager class and override the methods AddAdornments and RemoveAdornments; just be sure to call the base class versions of those methods in your implementations. Otherwise, the base class handles all normal chores associated with a language service.

Notes to Callers The LanguageService class maintains a list of CodeWindowManagers, one instance for each text view or open source file. The only methods called by Visual Studio are AddAdornments and RemoveAdornments (these are called directly) and CodeWindowManager.OnSetFocus and CodeWindowManager.OnKillFocus (these are called indirectly through the ViewFilter class in its implementation of the IVsTextViewEvents interface).

System.Object
  Microsoft.VisualStudio.Package.CodeWindowManager

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

Community Additions

ADD
Show:
© 2014 Microsoft