org.radrails.rails.internal.ui.editors.rhtml
Class TagHandler

java.lang.Object
  extended byorg.radrails.rails.internal.ui.editors.rhtml.TagHandler
Direct Known Subclasses:
AttributeNameTagHandler, AttributeValueTagHandler, EndTagHandler, StartTagHandler

public abstract class TagHandler
extends java.lang.Object

Custom rule for tokenizing HTML tags. Subclasses will handle specific parts of the tag.

Author:
mkent

Constructor Summary
TagHandler(TagHandler successor)
          Constructor.
 
Method Summary
abstract  org.eclipse.jface.text.rules.IToken evaluate(org.eclipse.jface.text.rules.ICharacterScanner scanner)
          Evaluate the characters provided by the scanner.
 TagHandler getNextHandler()
           
 TagHandler getPredecessor()
           
 void setNextHandler(TagHandler handler)
          Set the next handler.
 void setPredecessor(TagHandler predecessor)
          Set the previous handler.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagHandler

public TagHandler(TagHandler successor)
Constructor.

Parameters:
successor - the next tag handler
Method Detail

setNextHandler

public void setNextHandler(TagHandler handler)
Set the next handler.

Parameters:
handler - the next handler

getNextHandler

public TagHandler getNextHandler()
Returns:
the next handler

setPredecessor

public void setPredecessor(TagHandler predecessor)
Set the previous handler.

Parameters:
predecessor - the previous handler

getPredecessor

public TagHandler getPredecessor()
Returns:
the previous handler

evaluate

public abstract org.eclipse.jface.text.rules.IToken evaluate(org.eclipse.jface.text.rules.ICharacterScanner scanner)
Evaluate the characters provided by the scanner.

Parameters:
scanner - the scanner to read from
Returns:
a token identifying the characters read from the scanner