C# Class Microsoft.R.Editor.Tree.TextChangeProcessor

Class that handles processing of changes happened in the text buffer.
Show file Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
FullParse ( Microsoft.R.Editor.Tree.EditorTreeChangeCollection changes, ITextProvider newSnapshot ) : void

Invokes full parse pass. Called from a background tree updating task.

ProcessChange ( TextChange textChange, Microsoft.R.Editor.Tree.EditorTreeChangeCollection treeChanges ) : void

Processes a single text change incrementally. Enqueues resulting tree changes in the supplied queue. Does not modify the tree. Changes are to be sent to the main thread and applied from there. Caller is responsible for the tree read lock acquisition.

TextChangeProcessor ( EditorTree editorTree, AstRoot astRoot, Func cancelCallback = null ) : System

Private Methods

Method Description
IsCancellationRequested ( ) : bool
OnTokenNodeChange ( TokenNode node, int start, int oldLength, int newLength ) : IAstNode

Reflects change inside string or comment by shrinking or expanding token node.

Method Details

FullParse() public method

Invokes full parse pass. Called from a background tree updating task.
public FullParse ( Microsoft.R.Editor.Tree.EditorTreeChangeCollection changes, ITextProvider newSnapshot ) : void
changes Microsoft.R.Editor.Tree.EditorTreeChangeCollection
newSnapshot ITextProvider
return void

ProcessChange() public method

Processes a single text change incrementally. Enqueues resulting tree changes in the supplied queue. Does not modify the tree. Changes are to be sent to the main thread and applied from there. Caller is responsible for the tree read lock acquisition.
public ProcessChange ( TextChange textChange, Microsoft.R.Editor.Tree.EditorTreeChangeCollection treeChanges ) : void
textChange TextChange
treeChanges Microsoft.R.Editor.Tree.EditorTreeChangeCollection Collection of tree changes to apply /// from the main thread
return void

TextChangeProcessor() public method

public TextChangeProcessor ( EditorTree editorTree, AstRoot astRoot, Func cancelCallback = null ) : System
editorTree EditorTree
astRoot Microsoft.R.Core.AST.AstRoot
cancelCallback Func
return System