C# Класс Microsoft.R.Editor.Document.REditorDocument

Main editor document for the R language
Наследование: IREditorDocument
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
OnTextDocumentDisposed ( object sender, TextDocumentEventArgs e ) : void

Описание методов

BeginMassiveChange() публичный Метод

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
Результат void

Close() публичный Метод

Closes the document
public Close ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

EndMassiveChange() публичный Метод

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
Результат bool

FindInProjectedBuffers() публичный статический Метод

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
Результат IREditorDocument

FindRBuffer() публичный статический Метод

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
Результат ITextBuffer

FromTextBuffer() публичный статический Метод

Retrieves document instance from text buffer
public static FromTextBuffer ( ITextBuffer textBuffer ) : IREditorDocument
textBuffer ITextBuffer
Результат IREditorDocument

MapCaretPositionFromView() публичный статический Метод

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
Результат SnapshotPoint?

MapPointFromView() публичный статический Метод

Maps given point from view buffer to R editor buffer
public static MapPointFromView ( ITextView textView, SnapshotPoint point ) : SnapshotPoint?
textView ITextView
point SnapshotPoint
Результат SnapshotPoint?

REditorDocument() публичный Метод

public REditorDocument ( ITextBuffer textBuffer, ICoreShell shell ) : System
textBuffer ITextBuffer
shell ICoreShell
Результат System

TryFromTextBuffer() публичный статический Метод

Retrieves document instance from text buffer
public static TryFromTextBuffer ( ITextBuffer textBuffer ) : IREditorDocument
textBuffer ITextBuffer
Результат IREditorDocument