C# Class Microsoft.Languages.Editor.Text.IncrementalTextChangeApplication

ファイルを表示 Open project: Microsoft/RTVS

Public Methods

Method Description
ApplyChange ( ITextBuffer textBuffer, int position, int length, string newText, string transactionName, ISelectionTracker selectionTracker, int maxMilliseconds ) : void
ApplyChangeByTokens ( ITextBuffer textBuffer, ITextProvider oldTextProvider, ITextProvider newTextProvider, IReadOnlyList oldTokens, IReadOnlyList newTokens, ITextRange formatRange, string transactionName, ISelectionTracker selectionTracker, IEditorShell editorShell, System.Action additionalAction = null ) : void

Incrementally applies whitespace change to the buffer having old and new tokens produced from the 'before formatting' and 'after formatting' versions of the same text.

Private Methods

Method Description
CreateSelectionUndo ( ISelectionTracker selectionTracker, IEditorShell editorShell, string transactionName ) : IDisposable

Method Details

ApplyChange() public static method

public static ApplyChange ( ITextBuffer textBuffer, int position, int length, string newText, string transactionName, ISelectionTracker selectionTracker, int maxMilliseconds ) : void
textBuffer ITextBuffer
position int
length int
newText string
transactionName string
selectionTracker ISelectionTracker
maxMilliseconds int
return void

ApplyChangeByTokens() public static method

Incrementally applies whitespace change to the buffer having old and new tokens produced from the 'before formatting' and 'after formatting' versions of the same text.
public static ApplyChangeByTokens ( ITextBuffer textBuffer, ITextProvider oldTextProvider, ITextProvider newTextProvider, IReadOnlyList oldTokens, IReadOnlyList newTokens, ITextRange formatRange, string transactionName, ISelectionTracker selectionTracker, IEditorShell editorShell, System.Action additionalAction = null ) : void
textBuffer ITextBuffer Text buffer to apply changes to
oldTextProvider ITextProvider
newTextProvider ITextProvider Text provider of the text fragment before formatting
oldTokens IReadOnlyList Tokens from the 'before' text fragment
newTokens IReadOnlyList Tokens from the 'after' text fragment
formatRange ITextRange Range that is being formatted in the text buffer
transactionName string Name of the undo transaction to open
selectionTracker ISelectionTracker Selection tracker object that will save, track /// Action to perform after changes are applies by undo unit is not yet closed.
editorShell IEditorShell
additionalAction System.Action
return void