org.eclipse.xtext.ui.editor.model
Class DocumentTokenSource.TokenAdapter

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.model.DocumentTokenSource.TokenAdapter
All Implemented Interfaces:
org.eclipse.jface.text.IRegion, ILexerTokenRegion
Enclosing class:
DocumentTokenSource

public static class DocumentTokenSource.TokenAdapter
extends java.lang.Object
implements ILexerTokenRegion

Author:
Sven Efftinge - Initial contribution and API

Constructor Summary
DocumentTokenSource.TokenAdapter(DocumentTokenSource.TokenInfo token, int offset)
           
 
Method Summary
 int getLength()
          Returns the length of the region.
 int getLexerTokenType()
           
 int getOffset()
          Returns the offset of the region.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentTokenSource.TokenAdapter

public DocumentTokenSource.TokenAdapter(DocumentTokenSource.TokenInfo token,
                                        int offset)
Method Detail

getLength

public int getLength()
Description copied from interface: org.eclipse.jface.text.IRegion
Returns the length of the region.

Specified by:
getLength in interface org.eclipse.jface.text.IRegion
Returns:
the length of the region

getOffset

public int getOffset()
Description copied from interface: org.eclipse.jface.text.IRegion
Returns the offset of the region.

Specified by:
getOffset in interface org.eclipse.jface.text.IRegion
Returns:
the offset of the region

getLexerTokenType

public int getLexerTokenType()
Specified by:
getLexerTokenType in interface ILexerTokenRegion