C# 클래스 Microsoft.R.Editor.SmartIndent.SmartIndenter

Provides block and smart indentation in R code
상속: ISmartIndent
파일 보기 프로젝트 열기: Microsoft/RTVS 1 사용 예제들

공개 메소드들

메소드 설명
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