org.fife.ui.rsyntaxtextarea
Class AbstractTokenMaker

java.lang.Object
  extended by org.fife.ui.rsyntaxtextarea.TokenMakerBase
      extended by org.fife.ui.rsyntaxtextarea.AbstractTokenMaker
All Implemented Interfaces:
TokenMaker
Direct Known Subclasses:
UnixShellTokenMaker, WindowsBatchTokenMaker

public abstract class AbstractTokenMaker
extends TokenMakerBase

An abstract implementation of the TokenMaker interface. It should be overridden for every language for which you want to provide syntax highlighting.

See Also:
Token

Field Summary
protected  TokenMap wordsToHighlight
          Hash table of words to highlight and what token type they are.
 
Fields inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerBase
currentToken, firstToken, previousToken
 
Constructor Summary
AbstractTokenMaker()
          Constructor.
 
Method Summary
abstract  TokenMap getWordsToHighlight()
          Returns the words to highlight for this programming language.
 void removeLastToken()
          Removes the token last added from the linked list of tokens.
 
Methods inherited from class org.fife.ui.rsyntaxtextarea.TokenMakerBase
addNullToken, addToken, addToken, addToken, createOccurrenceMarker, getClosestStandardTokenTypeForInternalType, getCurlyBracesDenoteCodeBlocks, getInsertBreakAction, getLanguageIndex, getLastTokenTypeOnLine, getLineCommentStartAndEnd, getMarkOccurrencesOfTokenType, getOccurrenceMarker, getShouldIndentNextLineAfter, isIdentifierChar, isMarkupLanguage, resetTokenList, setLanguageIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fife.ui.rsyntaxtextarea.TokenMaker
getTokenList
 

Field Detail

wordsToHighlight

protected TokenMap wordsToHighlight
Hash table of words to highlight and what token type they are. The keys are the words to highlight, and their values are the token types, for example, Token.RESERVED_WORD or Token.FUNCTION.

Constructor Detail

AbstractTokenMaker

public AbstractTokenMaker()
Constructor.

Method Detail

getWordsToHighlight

public abstract TokenMap getWordsToHighlight()
Returns the words to highlight for this programming language.

Returns:
A TokenMap containing the words to highlight for this programming language.

removeLastToken

public void removeLastToken()
Removes the token last added from the linked list of tokens. The programmer should never have to call this directly; it can be called by subclasses of TokenMaker if necessary.