C# 클래스 Microsoft.R.Editor.Validation.TreeValidator

Main R validator: performs syntax check, produces results that then sent to the task list and tagger that creates squiggles. Works asynchronously except the final part that pushes actual task items to the IDE. Additional validators can be added via MEF exports. Validator listens to tree updated events and schedules validation passes for next idle slot. Next idle validation thread starts and performas its work. Validator also listens to changes in settings which may turn validation on or off.
파일 보기 프로젝트 열기: Microsoft/RTVS 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AdviseToIdle void
ClearResultsForNode void
OnIdle void
OnNodesRemoved void
OnSettingsChanged void
OnTreeClose void
OnTreeUpdateCompleted void
QueueTreeForValidation void
StartValidation void
StartValidationNextIdle void
StopValidation void
UnadviseFromIdle void

공개 메소드들

메소드 설명
EnsureFromTextBuffer ( ITextBuffer textBuffer, IEditorTree editorTree, ICoreShell shell ) : TreeValidator

Retrieves (or creates) the validator (syntax checker) for the document that is associated with the text buffer

IsSyntaxCheckEnabled ( ITextBuffer textBuffer ) : bool
TreeValidator ( IEditorTree editorTree, ICoreShell shell ) : System

비공개 메소드들

메소드 설명
AdviseToIdle ( ) : void
ClearResultsForNode ( IAstNode node ) : void
OnIdle ( object sender, EventArgs e ) : void
OnNodesRemoved ( object sender, TreeNodesRemovedEventArgs e ) : void

Listens to 'nodes removed' event which fires when user deletes text that generated AST nodes or pastes over new content. This allows validator to remove related errors from the task list quickly so they don't linger until the next validation pass.

OnSettingsChanged ( object sender, EventArgs e ) : void
OnTreeClose ( object sender, EventArgs e ) : void
OnTreeUpdateCompleted ( object sender, TreeUpdatedEventArgs e ) : void
QueueTreeForValidation ( ) : void
StartValidation ( ) : void
StartValidationNextIdle ( ) : void
StopValidation ( ) : void
UnadviseFromIdle ( ) : void

메소드 상세

EnsureFromTextBuffer() 공개 정적인 메소드

Retrieves (or creates) the validator (syntax checker) for the document that is associated with the text buffer
public static EnsureFromTextBuffer ( ITextBuffer textBuffer, IEditorTree editorTree, ICoreShell shell ) : TreeValidator
textBuffer ITextBuffer Text buffer
editorTree IEditorTree
shell ICoreShell
리턴 TreeValidator

IsSyntaxCheckEnabled() 공개 정적인 메소드

public static IsSyntaxCheckEnabled ( ITextBuffer textBuffer ) : bool
textBuffer ITextBuffer
리턴 bool

TreeValidator() 공개 메소드

public TreeValidator ( IEditorTree editorTree, ICoreShell shell ) : System
editorTree IEditorTree
shell ICoreShell
리턴 System