EditorExtensibility Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Framework object exposing methods for getting and interacting with ITextViewSnapshots and ITextDocumentSnapshots and performing document edits and other state changes.
public sealed class EditorExtensibility : Microsoft.VisualStudio.Extensibility.ExtensibilityPoint
type EditorExtensibility = class
inherit ExtensibilityPoint
Public NotInheritable Class EditorExtensibility
Inherits ExtensibilityPoint
- Inheritance
-
EditorExtensibility
Remarks
You can get an instance of EditorExtensibility by calling Editor(VisualStudioExtensibility) within an ExtensionPart or Command.
Constructors
EditorExtensibility(VisualStudioExtensibility, IEditorHostService) |
Initializes a new instance of the EditorExtensibility class. |
Methods
EditAsync(Action<IEditBatch>, CancellationToken) |
Initiates an edit request in the host Visual Studio process, enabling the extension to atomically request one or more ITextDocumentSnapshot edits, caret position changes, or other state changes. |
GetActiveTextViewAsync(IClientContext, CancellationToken) |
Gets the currently focused ITextViewSnapshot in the host Visual Studio process. |
SubscribeToOptionChangesAsync<T>(ITextDocumentSnapshot, TextDocumentOption<T>, CancellationToken, Func<T,Task>) |
Registers to listen for option changes in the scope of a text document. |
SubscribeToOptionChangesAsync<T>(ITextViewSnapshot, TextViewOption<T>, CancellationToken, Func<T,Task>) |
Registers to listen for option changes in the scope of a text view. |