C# Класс Microsoft.R.Editor.SmartIndent.SmartIndenter

Provides block and smart indentation in R code
Наследование: ISmartIndent
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Attach ( ITextView textView ) : SmartIndenter
Dispose ( ) : void
GetBlockIndent ( ITextSnapshotLine line ) : int
GetDesiredIndentation ( ITextSnapshotLine line ) : int?
GetDesiredIndentation ( ITextSnapshotLine line, IndentStyle indentStyle ) : int?
GetSmartIndent ( ITextSnapshotLine line, AstRoot ast = null, int originalIndentSizeInSpaces = -1, bool formatting = false ) : int

Determines level of indentation in the line from AST and surrounding context. Called when user hits ENTER and editor needs to know level of indentation in the new line as well as when code is being auto-formatted and range formatter needs to know how to indent freshly formatted lines of code.

InnerIndentSizeFromLine ( ITextSnapshotLine line, Microsoft.R.Core.Formatting.RFormatOptions options ) : int
InnerIndentSizeFromNode ( ITextBuffer textBuffer, IAstNode node, Microsoft.R.Core.Formatting.RFormatOptions options ) : int
OuterIndentSizeFromLine ( ITextSnapshotLine line, Microsoft.R.Core.Formatting.RFormatOptions options ) : int
OuterIndentSizeFromNode ( ITextBuffer textBuffer, IAstNode node, Microsoft.R.Core.Formatting.RFormatOptions options ) : int

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

Метод Описание
GetFirstArgumentIndent ( ITextSnapshot snapshot, IFunction fc ) : int
SmartIndenter ( ITextView textView ) : System

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

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

public static Attach ( ITextView textView ) : SmartIndenter
textView ITextView
Результат SmartIndenter

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

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

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

public static GetBlockIndent ( ITextSnapshotLine line ) : int
line ITextSnapshotLine
Результат int

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

public GetDesiredIndentation ( ITextSnapshotLine line ) : int?
line ITextSnapshotLine
Результат int?

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

public GetDesiredIndentation ( ITextSnapshotLine line, IndentStyle indentStyle ) : int?
line ITextSnapshotLine
indentStyle IndentStyle
Результат int?

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

Determines level of indentation in the line from AST and surrounding context. Called when user hits ENTER and editor needs to know level of indentation in the new line as well as when code is being auto-formatted and range formatter needs to know how to indent freshly formatted lines of code.
public static GetSmartIndent ( ITextSnapshotLine line, AstRoot ast = null, int originalIndentSizeInSpaces = -1, bool formatting = false ) : int
line ITextSnapshotLine Line to find the indent for
ast Microsoft.R.Core.AST.AstRoot Optional AST
originalIndentSizeInSpaces int
formatting bool /// Indicates if current call is from formatter or /// from the core editor for indentation when user typed Enter. ///
Результат int

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

public static InnerIndentSizeFromLine ( ITextSnapshotLine line, Microsoft.R.Core.Formatting.RFormatOptions options ) : int
line ITextSnapshotLine
options Microsoft.R.Core.Formatting.RFormatOptions
Результат int

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

public static InnerIndentSizeFromNode ( ITextBuffer textBuffer, IAstNode node, Microsoft.R.Core.Formatting.RFormatOptions options ) : int
textBuffer ITextBuffer
node IAstNode
options Microsoft.R.Core.Formatting.RFormatOptions
Результат int

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

public static OuterIndentSizeFromLine ( ITextSnapshotLine line, Microsoft.R.Core.Formatting.RFormatOptions options ) : int
line ITextSnapshotLine
options Microsoft.R.Core.Formatting.RFormatOptions
Результат int

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

public static OuterIndentSizeFromNode ( ITextBuffer textBuffer, IAstNode node, Microsoft.R.Core.Formatting.RFormatOptions options ) : int
textBuffer ITextBuffer
node IAstNode
options Microsoft.R.Core.Formatting.RFormatOptions
Результат int