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

Show file Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
FormatRange ( ITextView textView, ITextBuffer textBuffer, ITextRange formatRange, Microsoft.R.Core.Formatting.RFormatOptions options, IEditorShell editorShell ) : bool
FormatRangeExact ( ITextView textView, ITextBuffer textBuffer, ITextRange formatRange, Microsoft.R.Core.Formatting.RFormatOptions options, IEditorShell editorShell ) : bool

Private Methods

Method Description
CanFormatRange ( ITextView textView, ITextBuffer textBuffer, ITextRange formatRange, IEditorShell editorShell ) : bool
FindStartOfExpression ( ITextBuffer textBuffer, int position ) : int

Given position in the buffer tries to detemine start of the expression.

IndentLines ( ITextView textView, ITextBuffer textBuffer, ITextRange range, AstRoot ast, Microsoft.R.Core.Formatting.RFormatOptions options, int originalIndentSizeInSpaces ) : void

Appends indentation to each line so formatted text appears properly indented inside the host document (script block in HTML page).

UpdateAst ( ITextBuffer textBuffer ) : AstRoot

Method Details

FormatRange() public static method

public static FormatRange ( ITextView textView, ITextBuffer textBuffer, ITextRange formatRange, Microsoft.R.Core.Formatting.RFormatOptions options, IEditorShell editorShell ) : bool
textView ITextView
textBuffer ITextBuffer
formatRange ITextRange
options Microsoft.R.Core.Formatting.RFormatOptions
editorShell IEditorShell
return bool

FormatRangeExact() public static method

public static FormatRangeExact ( ITextView textView, ITextBuffer textBuffer, ITextRange formatRange, Microsoft.R.Core.Formatting.RFormatOptions options, IEditorShell editorShell ) : bool
textView ITextView
textBuffer ITextBuffer
formatRange ITextRange
options Microsoft.R.Core.Formatting.RFormatOptions
editorShell IEditorShell
return bool