C# 클래스 Microsoft.R.Editor.Tree.TreeUpdateTask

Asynchronous text change processing task
상속: Microsoft.Languages.Editor.Tasks.CancellableTask
파일 보기 프로젝트 열기: Microsoft/RTVS 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ApplyBackgroundProcessingResults void
ApplyTreeChanges List
ClearChanges void
DeleteAndShiftElements bool
EnsureProcessingComplete void
OnIdle void
OnTextChanges void
ProcessChange void
ProcessComplexChange void
ProcessPendingTextBufferChanges void
ProcessPendingTextBufferChanges void
ProcessSimpleChange void
ProcessTextChanges void
Resume void
Suspend void
TakeThreadOwnership void
UpdateTreeTextSnapshot void

공개 메소드들

메소드 설명
TreeUpdateTask ( EditorTree editorTree, ICoreShell shell ) : System

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
ApplyBackgroundProcessingResults ( ) : void

Applies queued changes to the tree. Must only be called in a main thread context.

ApplyTreeChanges ( Microsoft.R.Editor.Tree.EditorTreeChangeCollection changesToApply ) : List
ClearChanges ( ) : void
DeleteAndShiftElements ( TextChangeContext context ) : bool
EnsureProcessingComplete ( ) : void

Makes sure all pending changes are processed and applied to the tree

OnIdle ( object sender, EventArgs e ) : void

Idle time event handler. Kicks background parsing if there are pending changes

OnTextChanges ( IReadOnlyCollection textChanges ) : void

Text buffer change event handler. Performs analysis of the change. If change is trivial, such as change in whitespace (excluding line breaks that in R may be sensistive), simply applies the changes by shifting tree elements. If some elements get deleted or otherwise damaged, removes them from the tree right away. Non-trivial changes are queued for background parsing which starts on next on idle. Methond must be called on a main thread only, typically from an event handler that receives text buffer change events.

ProcessChange ( TextChangeContext context ) : void
ProcessComplexChange ( TextChangeContext context ) : void

Handles non-trivial changes like changes that delete elements, change identifier names, introducing new braces: changes that cannot be handled without background parse.

ProcessPendingTextBufferChanges ( ITextProvider newTextProvider, bool async ) : void

Processes text buffer changed accumulated so far. Typically called on idle.

ProcessPendingTextBufferChanges ( bool async ) : void
ProcessSimpleChange ( TextChangeContext context ) : void

Handles simple (safe) changes.

ProcessTextChanges ( TextChange changeToProcess, bool async, Func isCancelledCallback ) : void

Main asyncronous task body

Resume ( ) : void

Resumes tree updates. If changes were made to the text buffer since suspend, full parse is performed.

Suspend ( ) : void

Suspend tree updates. Typically called before massive changes to the document.

TakeThreadOwnership ( ) : void
UpdateTreeTextSnapshot ( ) : void

메소드 상세

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

TreeUpdateTask() 공개 메소드

public TreeUpdateTask ( EditorTree editorTree, ICoreShell shell ) : System
editorTree EditorTree
shell ICoreShell
리턴 System