LanguageService::GetCodeWindowManager Method (IVsCodeWindow^, IVsCodeWindowManager^)
Instantiates a CodeWindowManager class.
Assembly: Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)
public: virtual int GetCodeWindowManager( IVsCodeWindow^ codeWindow, [OutAttribute] IVsCodeWindowManager^% mgr ) sealed
Parameters
- codeWindow
-
Type:
Microsoft.VisualStudio.TextManager.Interop::IVsCodeWindow^
[in] The IVsCodeWindow with which to associate a new CodeWindowManager object.
- mgr
-
Type:
Microsoft.VisualStudio.TextManager.Interop::IVsCodeWindowManager^
[out] The new CodeWindowManager object.
Visual Studio calls this method to provide an opportunity for your language service to associate itself with a particular code window. If you need to add other elements to the code window besides a Navigation bar (which is already handled by the CodeWindowManager class), then you must derive a class from the CodeWindowManager class and return an instance of your class from this method. Your derived class must call the base constructor for CodeWindowManager.
The base method always returns a new CodeWindowManager object. This base method instantiates a Source object (with a call to CreateSource) that is in turn supplied with a new Colorizer object (from a call to Source::GetColorizer). When the Source object is constructed, it calls CreateExpansionProvider to obtain a new ExpansionProvider object that in turn calls CreateExpansionFunction to obtain an ExpansionFunction object. The CodeWindowManager constructor calls CreateDocumentProperties to obtain a new DocumentProperties object.