C# Class Microsoft.R.Editor.Formatting.FormatOperations

Show file Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
FormatCurrentScope ( ITextView textView, ITextBuffer textBuffer, IEditorShell editorShell, bool indentCaret ) : void
FormatCurrentStatement ( ITextView textView, ITextBuffer textBuffer, IEditorShell editorShell, bool limitAtCaret = false, int caretOffset ) : void

Formats statement that the caret is at

FormatNode ( ITextView textView, ITextBuffer textBuffer, IEditorShell editorShell, IAstNode node, int limit = -1 ) : void

Formats specific AST node

FormatViewLine ( ITextView textView, ITextBuffer textBuffer, int offset, IEditorShell editorShell ) : void

Formats line the caret is currently at

GetIndentDefiningNode ( AstRoot ast, int position ) : IAstNode
UndoableFormatRange ( ITextView textView, ITextBuffer textBuffer, ITextRange formatRange, IEditorShell editorShell, bool exactRange = false ) : void

Private Methods

Method Description
IndentCaretInNewScope ( ITextView textView, IScope scope, SnapshotPoint caretBufferPoint, Microsoft.R.Core.Formatting.RFormatOptions options ) : void

Method Details

FormatCurrentScope() public static method

public static FormatCurrentScope ( ITextView textView, ITextBuffer textBuffer, IEditorShell editorShell, bool indentCaret ) : void
textView ITextView
textBuffer ITextBuffer
editorShell IEditorShell
indentCaret bool
return void

FormatCurrentStatement() public static method

Formats statement that the caret is at
public static FormatCurrentStatement ( ITextView textView, ITextBuffer textBuffer, IEditorShell editorShell, bool limitAtCaret = false, int caretOffset ) : void
textView ITextView
textBuffer ITextBuffer
editorShell IEditorShell
limitAtCaret bool
caretOffset int
return void

FormatNode() public static method

Formats specific AST node
public static FormatNode ( ITextView textView, ITextBuffer textBuffer, IEditorShell editorShell, IAstNode node, int limit = -1 ) : void
textView ITextView
textBuffer ITextBuffer
editorShell IEditorShell
node IAstNode
limit int
return void

FormatViewLine() public static method

Formats line the caret is currently at
public static FormatViewLine ( ITextView textView, ITextBuffer textBuffer, int offset, IEditorShell editorShell ) : void
textView ITextView
textBuffer ITextBuffer
offset int
editorShell IEditorShell
return void

GetIndentDefiningNode() public static method

public static GetIndentDefiningNode ( AstRoot ast, int position ) : IAstNode
ast Microsoft.R.Core.AST.AstRoot
position int
return IAstNode

UndoableFormatRange() public static method

public static UndoableFormatRange ( ITextView textView, ITextBuffer textBuffer, ITextRange formatRange, IEditorShell editorShell, bool exactRange = false ) : void
textView ITextView
textBuffer ITextBuffer
formatRange ITextRange
editorShell IEditorShell
exactRange bool
return void