XUICETextFormatter
Implements XUICEFormatter
Description
A plain text formatter for the XUICodeEditor
.
Methods
Name | Parameters | Returns |
---|---|---|
AllowsLeadingWhitespace | Boolean |
|
IsCommentLine | line As XUICELine |
Boolean |
Name | String |
|
NearestDelimitersForCaretPos | caretPos As Integer |
XUICEDelimiter |
Parse | lines() As XUICELine |
|
SupportsDelimiterHighlighting | Boolean |
|
SupportsUnmatchedBlockHighlighting | Boolean |
|
TokenIsComment | token As XUICELineToken |
Boolean |
Tokenise | lines() As XUICELine , firstVisibleLineNumber As Integer , lastVisibleLineNumber As Integer |
|
TokeniseAll | lines() As XUICELine |
|
TokeniseLine | line As XUICELine |
|
TokenTypes | String() |
Constants
Name | Type |
---|---|
TOKEN_DEFAULT | String |
TOKEN_DEFAULT As String
The default
token (the only token generated by this formatter).
Method Descriptions
AllowsLeadingWhitespace() As Boolean
True if this formatter allows whitespace at the beginning of a line. If False, the editor will strip it when pasting and prevent it from being typed.
Part of the XUICEFormatter
interface.
IsCommentLine(line As XUICELine) As Boolean
True if this entire line is a comment.
There are no comment lines in the plain text formatter.
Name() As String
The name of this formatter.
NearestDelimitersForCaretPos(caretPos As Integer) As XUICEDelimiter
Returns the nearest delimiters at the given caretPos
.
Always returns Nil as this formatter doesn't support this feature.
Part of the XUICEFormatter
interface.
Parse(lines() As XUICELine)
Called periodically by the editor. An opportunity to parse the tokenised lines. Will always be called after the lines have been tokenised.
Part of the XUICEFormatter
interface.
SupportsDelimiterHighlighting() As Boolean
Whether this formatter supports highlighting the delimiters around the caret. Always returns False.
Part of the XUICEFormatter
interface.
SupportsUnmatchedBlockHighlighting() As Boolean
True if this formatter highlights unmatched blocks.
Part of the XUICEFormatter
interface.
TokenIsComment(token As XUICELineToken) As Boolean
True if token
is considered to be a comment.
Tokenise(lines() As XUICELine, firstVisibleLineNumber As Integer, lastVisibleLineNumber As Integer)
Tokenises a portion of lines
.
Note that we tokenise all lines, even though this method is passed the visible line numbers.
Part of the XUICEFormatter
interface.
TokeniseAll(lines() As XUICELine)
Tokenises an array of lines.
Part of the XUICEFormatter
interface.
TokeniseLine(line As XUICELine)
Tokenises a single line.
TokenTypes() As String()
Returns an array of all token types used by this formatter.