org.eclipse.xtext.xtend2.ui.highlighting
Class RichStringAwareTokenScanner
java.lang.Object
org.eclipse.xtext.ui.editor.syntaxcoloring.AbstractTokenScanner
org.eclipse.xtext.ui.editor.syntaxcoloring.TokenScanner
org.eclipse.xtext.xtend2.ui.highlighting.RichStringAwareTokenScanner
- All Implemented Interfaces:
- org.eclipse.jface.text.rules.ITokenScanner
public class RichStringAwareTokenScanner
- extends TokenScanner
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RichStringAwareTokenScanner
public RichStringAwareTokenScanner()
createRichTextToken
protected RichStringAwareTokenScanner.RichTextToken createRichTextToken(java.lang.String id,
ILexerTokenRegion token)
setTokenDefProvider
@Inject
public void setTokenDefProvider(ITokenDefProvider tokenDefProvider)
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.
- Specified by:
setRange
in interface org.eclipse.jface.text.rules.ITokenScanner
- Overrides:
setRange
in class TokenScanner
- Parameters:
document
- the document to scanoffset
- the offset of the document range to scanlength
- the length of the document range to scan
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.
- Specified by:
nextToken
in interface org.eclipse.jface.text.rules.ITokenScanner
- Overrides:
nextToken
in class TokenScanner
- Returns:
- the next token in the document
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.
- Specified by:
getTokenLength
in interface org.eclipse.jface.text.rules.ITokenScanner
- Overrides:
getTokenLength
in class TokenScanner
- 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.
- Specified by:
getTokenOffset
in interface org.eclipse.jface.text.rules.ITokenScanner
- Overrides:
getTokenOffset
in class TokenScanner
- Returns:
- the offset of the last token read by this scanner