Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.gjt.sp.jedit.syntax
Class DefaultTokenHandler  view DefaultTokenHandler download DefaultTokenHandler.java

java.lang.Object
  extended byorg.gjt.sp.jedit.syntax.DefaultTokenHandler
All Implemented Interfaces:
TokenHandler
Direct Known Subclasses:
DisplayTokenHandler

public class DefaultTokenHandler
extends java.lang.Object
implements TokenHandler

Builds a linked list of tokens without any additional processing.

Since:
jEdit 4.1pre1
Version:
$Id: DefaultTokenHandler.java,v 1.17 2003/10/26 19:43:57 spestov Exp $

Field Summary
protected  Token firstToken
           
protected  Token lastToken
           
protected  org.gjt.sp.jedit.syntax.TokenMarker.LineContext lineContext
           
 
Constructor Summary
DefaultTokenHandler()
           
 
Method Summary
protected  void addToken(Token token, org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)
           
protected  Token createToken(byte id, int offset, int length, org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)
           
 org.gjt.sp.jedit.syntax.TokenMarker.LineContext getLineContext()
          The token handler can compare this object with the object previously given for this line to see if the token type at the end of the line has changed (meaning subsequent lines might need to be retokenized).
protected  ParserRuleSet getParserRuleSet(org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)
           
 Token getTokens()
          Returns the first syntax token.
 void handleToken(javax.swing.text.Segment seg, byte id, int offset, int length, org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)
          Called by the token marker when a syntax token has been parsed.
 void init()
          Clears the list of tokens.
 void setLineContext(org.gjt.sp.jedit.syntax.TokenMarker.LineContext lineContext)
          The token handler can compare this object with the object previously given for this line to see if the token type at the end of the line has changed (meaning subsequent lines might need to be retokenized).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstToken

protected Token firstToken

lastToken

protected Token lastToken

lineContext

protected org.gjt.sp.jedit.syntax.TokenMarker.LineContext lineContext
Constructor Detail

DefaultTokenHandler

public DefaultTokenHandler()
Method Detail

init

public void init()
Clears the list of tokens.


getTokens

public Token getTokens()
Returns the first syntax token.

Since:
jEdit 4.1pre1

handleToken

public void handleToken(javax.swing.text.Segment seg,
                        byte id,
                        int offset,
                        int length,
                        org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)
Called by the token marker when a syntax token has been parsed.

Specified by:
handleToken in interface TokenHandler
Since:
jEdit 4.2pre3

getLineContext

public org.gjt.sp.jedit.syntax.TokenMarker.LineContext getLineContext()
The token handler can compare this object with the object previously given for this line to see if the token type at the end of the line has changed (meaning subsequent lines might need to be retokenized).

Since:
jEdit 4.2pre6

setLineContext

public void setLineContext(org.gjt.sp.jedit.syntax.TokenMarker.LineContext lineContext)
The token handler can compare this object with the object previously given for this line to see if the token type at the end of the line has changed (meaning subsequent lines might need to be retokenized).

Specified by:
setLineContext in interface TokenHandler
Since:
jEdit 4.2pre6

getParserRuleSet

protected ParserRuleSet getParserRuleSet(org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)

createToken

protected Token createToken(byte id,
                            int offset,
                            int length,
                            org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)

addToken

protected void addToken(Token token,
                        org.gjt.sp.jedit.syntax.TokenMarker.LineContext context)