C# Class Microsoft.R.Editor.Document.REditorDocument

Main editor document for the R language
Inheritance: IREditorDocument
Afficher le fichier Open project: Microsoft/RTVS Class Usage Examples

Méthodes publiques

Méthode Description
BeginMassiveChange ( ) : void

Tells document that massive change to text buffer is about to commence. Document will then stop tracking text buffer changes, will suspend R parser anc classifier and remove all projections. AST is no longer valid after this call.

Close ( ) : void

Closes the document

Dispose ( ) : void
EndMassiveChange ( ) : bool

Tells document that massive change to text buffer is complete. Document will perform full parse, resume tracking of text buffer changes and classification (colorization).

FindInProjectedBuffers ( ITextBuffer viewBuffer ) : IREditorDocument

Given text view locates R document in underlying text buffer graph. In REPL window there may be multiple R text buffers but usually only last one (the one active at the > prompt) has attached R document. Other R buffers represent previously typed commands. They still have colorizer attached but no active R documents.

FindRBuffer ( ITextBuffer viewBuffer ) : ITextBuffer

Locates first R buffer in the projection buffer graph. Note that in REPL this may not be the active buffer. In REPL used FindInProjectedBuffers.

FromTextBuffer ( ITextBuffer textBuffer ) : IREditorDocument

Retrieves document instance from text buffer

MapCaretPositionFromView ( ITextView textView ) : SnapshotPoint?

Maps caret position in text view to position in the projected R editor text buffer. R text buffer can be projected into view in REPL window case or in case when R is embedded in another language file such as in SQL file.

MapPointFromView ( ITextView textView, SnapshotPoint point ) : SnapshotPoint?

Maps given point from view buffer to R editor buffer

REditorDocument ( ITextBuffer textBuffer, ICoreShell shell ) : System
TryFromTextBuffer ( ITextBuffer textBuffer ) : IREditorDocument

Retrieves document instance from text buffer

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
OnTextDocumentDisposed ( object sender, TextDocumentEventArgs e ) : void

Method Details

BeginMassiveChange() public méthode

Tells document that massive change to text buffer is about to commence. Document will then stop tracking text buffer changes, will suspend R parser anc classifier and remove all projections. AST is no longer valid after this call.
public BeginMassiveChange ( ) : void
Résultat void

Close() public méthode

Closes the document
public Close ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

EndMassiveChange() public méthode

Tells document that massive change to text buffer is complete. Document will perform full parse, resume tracking of text buffer changes and classification (colorization).
public EndMassiveChange ( ) : bool
Résultat bool

FindInProjectedBuffers() public static méthode

Given text view locates R document in underlying text buffer graph. In REPL window there may be multiple R text buffers but usually only last one (the one active at the > prompt) has attached R document. Other R buffers represent previously typed commands. They still have colorizer attached but no active R documents.
public static FindInProjectedBuffers ( ITextBuffer viewBuffer ) : IREditorDocument
viewBuffer ITextBuffer
Résultat IREditorDocument

FindRBuffer() public static méthode

Locates first R buffer in the projection buffer graph. Note that in REPL this may not be the active buffer. In REPL used FindInProjectedBuffers.
public static FindRBuffer ( ITextBuffer viewBuffer ) : ITextBuffer
viewBuffer ITextBuffer
Résultat ITextBuffer

FromTextBuffer() public static méthode

Retrieves document instance from text buffer
public static FromTextBuffer ( ITextBuffer textBuffer ) : IREditorDocument
textBuffer ITextBuffer
Résultat IREditorDocument

MapCaretPositionFromView() public static méthode

Maps caret position in text view to position in the projected R editor text buffer. R text buffer can be projected into view in REPL window case or in case when R is embedded in another language file such as in SQL file.
public static MapCaretPositionFromView ( ITextView textView ) : SnapshotPoint?
textView ITextView
Résultat SnapshotPoint?

MapPointFromView() public static méthode

Maps given point from view buffer to R editor buffer
public static MapPointFromView ( ITextView textView, SnapshotPoint point ) : SnapshotPoint?
textView ITextView
point SnapshotPoint
Résultat SnapshotPoint?

REditorDocument() public méthode

public REditorDocument ( ITextBuffer textBuffer, ICoreShell shell ) : System
textBuffer ITextBuffer
shell ICoreShell
Résultat System

TryFromTextBuffer() public static méthode

Retrieves document instance from text buffer
public static TryFromTextBuffer ( ITextBuffer textBuffer ) : IREditorDocument
textBuffer ITextBuffer
Résultat IREditorDocument