Table of Contents

Method SmartFormat

Namespace
Alternet.Syntax.Parsers.Roslyn.CodeCompletion
Assembly
Alternet.Syntax.Parsers.Roslyn.v9.dll

SmartFormat(ref Point, ref Point, bool, int, bool, ITextUndoList)

Formats block of text according to the parser rules.

public virtual bool SmartFormat(ref Point start, ref Point end, bool useSpaces, int spacesInTab, bool extended, ITextUndoList operations)

Parameters

start Point

Start position of the block

end Point

End position of the block

useSpaces bool

Indicates whether indentation string should contain spaces or tabs

spacesInTab int

Specifies number of spaces in tab

extended bool

Specifies if whole syntax block containing start and end point should be formatted

operations ITextUndoList

List of changes.

Returns

bool

True if succeed; otherwise false.

SmartFormat(ref Point, bool, int, ITextUndoList)

Formats block of text according to the parser rules.

public virtual bool SmartFormat(ref Point position, bool useSpaces, int spacesInTab, ITextUndoList operations)

Parameters

position Point

Position of the text.

useSpaces bool

Indicates whether indentation string should contain spaces or tabs.

spacesInTab int

Specifies number of spaces in tab.

operations ITextUndoList

List of the text changes.

Returns

bool

True if succeed; otherwise false.

SmartFormat(Document, SyntaxTree, ref SourceText, TextSpan, bool, int)

protected virtual IEnumerable<TextChange> SmartFormat(Document document, SyntaxTree tree, ref SourceText text, TextSpan span, bool useSpaces, int spacesInTab)

Parameters

document Document
tree SyntaxTree
text SourceText
span TextSpan
useSpaces bool
spacesInTab int

Returns

IEnumerable<TextChange>