Partilhar via


LanguageService.GetCodeWindowManager Method

Definition

Instantiates a CodeWindowManager class.

public:
 virtual int GetCodeWindowManager(Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindow ^ codeWindow, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindowManager ^ % mgr);
public:
 int GetCodeWindowManager(Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindow ^ codeWindow, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindowManager ^ &  mgr);
int GetCodeWindowManager(Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindow const & codeWindow, [Runtime::InteropServices::Out] Microsoft::VisualStudio::TextManager::Interop::IVsCodeWindowManager const & & mgr);
public int GetCodeWindowManager (Microsoft.VisualStudio.TextManager.Interop.IVsCodeWindow codeWindow, out Microsoft.VisualStudio.TextManager.Interop.IVsCodeWindowManager mgr);
abstract member GetCodeWindowManager : Microsoft.VisualStudio.TextManager.Interop.IVsCodeWindow * IVsCodeWindowManager -> int
override this.GetCodeWindowManager : Microsoft.VisualStudio.TextManager.Interop.IVsCodeWindow * IVsCodeWindowManager -> int
Public Function GetCodeWindowManager (codeWindow As IVsCodeWindow, ByRef mgr As IVsCodeWindowManager) As Integer

Parameters

codeWindow
IVsCodeWindow

[in] The IVsCodeWindow with which to associate a new CodeWindowManager object.

mgr
IVsCodeWindowManager

[out] The new CodeWindowManager object.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Implements

Remarks

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 Microsoft.VisualStudio.Package.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.

Applies to