Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IVsTextBufferCoordinator Interface

Provides mapping services between two buffers.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

[InterfaceTypeAttribute()]
[GuidAttribute("84465401-2886-4CE0-AF50-C0560226ED40")]
public interface IVsTextBufferCoordinator

Some files can contain blocks of code from more than one language, for example, an ASP.NET file can contain code blocks from VBScript or JScript. These types of files are handled by displaying the file in a primary buffer and putting each of the code blocks into a secondary buffer. The secondary buffer can then be handed to a language service for formatting and display without regard to how the code block is contained in the primary file.

In order for this two buffer system to work, a way must be made available to map positions from one buffer to the other and that is where the text buffer coordinator, as represented by the IVsTextBufferCoordinator interface comes in. This interface manages two buffers in terms of a list of spans describing the locations associated with a particular code block.

Notes to Implementers:

Visual Studio implements this interface.

Notes to Callers:

An instance of this interface can be obtained by calling the CoCreateInstance function with the GUID of the VsTextBufferCoordinatorClass type as the CLSID.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft