org.eclipse.xtext.xtend2.ui.highlighting
Class RichStringAwareTokenScanner

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.syntaxcoloring.AbstractTokenScanner
      extended by org.eclipse.xtext.ui.editor.syntaxcoloring.TokenScanner
          extended by 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

Nested Class Summary
protected  class RichStringAwareTokenScanner.RichTextToken
           
 
Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.syntaxcoloring.TokenScanner
TokenScanner.RangedReentrantIterator
 
Constructor Summary
RichStringAwareTokenScanner()
           
 
Method Summary
protected  RichStringAwareTokenScanner.RichTextToken createRichTextToken(java.lang.String id, ILexerTokenRegion token)
           
 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.
 void setTokenDefProvider(ITokenDefProvider tokenDefProvider)
           
 
Methods inherited from class org.eclipse.xtext.ui.editor.syntaxcoloring.TokenScanner
createToken, getCurrentToken, getIterator, getTokenIdMapper, getTokens, setCurrentToken, setTokenIdMapper
 
Methods inherited from class org.eclipse.xtext.ui.editor.syntaxcoloring.AbstractTokenScanner
getAttribute, getTextAttributeProvider, setTextAttributeProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RichStringAwareTokenScanner

public RichStringAwareTokenScanner()
Method Detail

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 scan
offset - the offset of the document range to scan
length - 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