org.eclipse.xtext.ui.editor.syntaxcoloring
Class DefaultTokenScanner
java.lang.Object
org.eclipse.xtext.ui.editor.syntaxcoloring.AbstractTokenScanner
org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultTokenScanner
- All Implemented Interfaces:
- org.eclipse.jface.text.rules.ITokenScanner
public class DefaultTokenScanner
- extends AbstractTokenScanner
- Author:
- Sebastian Zarnekow - Initial contribution and API
Method Summary |
int |
getTokenLength()
Returns the length of the last token read by this scanner. |
int |
getTokenOffset()
Returns the offset of the last token read by this scanner. |
org.eclipse.jface.text.rules.IToken |
nextToken()
Returns the next token in the document. |
void |
setRange(org.eclipse.jface.text.IDocument document,
int offset,
int length)
Configures the scanner by providing access to the document range that should
be scanned. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultTokenScanner
public DefaultTokenScanner()
getTokenLength
public int getTokenLength()
- Description copied from interface:
org.eclipse.jface.text.rules.ITokenScanner
- Returns the length of the last token read by this scanner.
- Returns:
- the length of the last token read by this scanner
getTokenOffset
public int getTokenOffset()
- Description copied from interface:
org.eclipse.jface.text.rules.ITokenScanner
- Returns the offset of the last token read by this scanner.
- Returns:
- the offset of the last token read by this scanner
nextToken
public org.eclipse.jface.text.rules.IToken nextToken()
- Description copied from interface:
org.eclipse.jface.text.rules.ITokenScanner
- Returns the next token in the document.
- Returns:
- the next token in the document
setRange
public void setRange(org.eclipse.jface.text.IDocument document,
int offset,
int length)
- Description copied from interface:
org.eclipse.jface.text.rules.ITokenScanner
- Configures the scanner by providing access to the document range that should
be scanned.
- Parameters:
document
- the document to scanoffset
- the offset of the document range to scanlength
- the length of the document range to scan