LanguageService.GetCodeWindowManager Method

Instantiates a CodeWindowManager class.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'Declaration
Public Function GetCodeWindowManager ( _
    codeWindow As IVsCodeWindow, _
    <OutAttribute> ByRef mgr As IVsCodeWindowManager _
) As Integer
'Usage
Dim instance As LanguageService 
Dim codeWindow As IVsCodeWindow 
Dim mgr As IVsCodeWindowManager 
Dim returnValue As Integer 

returnValue = instance.GetCodeWindowManager(codeWindow, _
    mgr)
public int GetCodeWindowManager(
    IVsCodeWindow codeWindow,
    out IVsCodeWindowManager mgr
)
public:
virtual int GetCodeWindowManager(
    IVsCodeWindow^ codeWindow, 
    [OutAttribute] IVsCodeWindowManager^% mgr
) sealed
public final function GetCodeWindowManager(
    codeWindow : IVsCodeWindow, 
    mgr : IVsCodeWindowManager
) : int

Parameters

Return Value

Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow, IVsCodeWindowManager%)

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 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.

.NET Framework Security

See Also

Reference

LanguageService Class

LanguageService Members

Microsoft.VisualStudio.Package Namespace