C# Класс Microsoft.R.Editor.TextViewExtensions

Показать файл Открыть проект

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

Метод Описание
GetIdentifierUnderCaret ( this textView, Span &span ) : string

Extracts identifier sequence at the caret location. Fetches parts of 'abc$def' rather than tne entire expression. If there is selection, returns complete selected item as is.

GetItemAtPosition ( ITextSnapshotLine line, int position, bool>.Func tokenTypeCheck, Span &span ) : string
GetItemBeforeCaret ( this textView, Span &span, bool>.Func tokenTypeCheck = null ) : string

Extracts identifier or a keyword before caret. Typically used when inserting expansions (aka code snippets) at the caret location.

GetVariableNameBeforeCaret ( this textView ) : string

Extracts complete variable name under the caret. In '`abc`$`def` returns the complete expression rather than its parts. Typically used to get data for completion of variable members as in when user typed 'abc$def$' Since method does not perform semantic analysis, it does not guaratee syntactically correct expression, it may return 'a$$b'.

MapDownToR ( this textView, SnapshotSpan span ) : NormalizedSnapshotSpanCollection
MapDownToR ( this textView, SnapshotPoint position ) : SnapshotPoint?

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

Метод Описание
IsVariableNameToken ( string lineText, RToken token ) : bool

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

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

Extracts identifier sequence at the caret location. Fetches parts of 'abc$def' rather than tne entire expression. If there is selection, returns complete selected item as is.
public static GetIdentifierUnderCaret ( this textView, Span &span ) : string
textView this
span Span
Результат string

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

public static GetItemAtPosition ( ITextSnapshotLine line, int position, bool>.Func tokenTypeCheck, Span &span ) : string
line ITextSnapshotLine
position int
tokenTypeCheck bool>.Func
span Span
Результат string

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

Extracts identifier or a keyword before caret. Typically used when inserting expansions (aka code snippets) at the caret location.
public static GetItemBeforeCaret ( this textView, Span &span, bool>.Func tokenTypeCheck = null ) : string
textView this
span Span
tokenTypeCheck bool>.Func
Результат string

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

Extracts complete variable name under the caret. In '`abc`$`def` returns the complete expression rather than its parts. Typically used to get data for completion of variable members as in when user typed 'abc$def$' Since method does not perform semantic analysis, it does not guaratee syntactically correct expression, it may return 'a$$b'.
public static GetVariableNameBeforeCaret ( this textView ) : string
textView this
Результат string

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

public static MapDownToR ( this textView, SnapshotSpan span ) : NormalizedSnapshotSpanCollection
textView this
span SnapshotSpan
Результат NormalizedSnapshotSpanCollection

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

public static MapDownToR ( this textView, SnapshotPoint position ) : SnapshotPoint?
textView this
position SnapshotPoint
Результат SnapshotPoint?