TreeIndentContext class
Objects of this type provide context information and helper methods to indentation functions registered on syntax nodes.
- Inheritance
-
- Object
- IndentContext
- TreeIndentContext
Properties
- baseIndent → int
-
Get the indentation at the reference line for
this.node, which is the line on which it starts, unless there is a node that is not a parent of this node covering the start of that line.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- node → SyntaxNode
-
The syntax tree node to which the indentation strategy applies.
no setter
- pos → int
-
The position at which indentation is being computed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- simulatedBreak → int?
-
Returns the
simulateBreakfor this context, if any.no setterinherited - state → EditorState
-
The editor state.
finalinherited
- textAfter → String
-
Get the text directly after
this.pos, either the entire line or the next 100 characters, whichever is shorter.no setter - unit → int
-
The indent unit (number of columns per indentation level).
finalinherited
Methods
-
baseIndentFor(
SyntaxNode node) → int - Get the indentation for the reference line of the given node (see baseIndent).
-
column(
int pos, [int bias = 1]) → int -
Find the column for the given position.
inherited
-
continueIndent(
) → int? - Continue looking for indentations in the node's parent nodes, and return the result of that.
-
countColumnStr(
String line, [int? pos]) → int -
Find the column position (taking tabs into account) of the given
position in the given string.
inherited
-
lineAt(
int pos, [int bias = 1]) → ({int from, String text}) -
Get a description of the line at the given position, taking
simulateBreakinto account.inherited -
lineIndent(
int pos, [int bias = 1]) → int -
Find the indentation column of the line at the given point.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
textAfterPos(
int pos, [int bias = 1]) → String -
Get the text directly after
pos, either the entire line or the next 100 characters, whichever is shorter.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited