org.fife.ui.rsyntaxtextarea.parser
Class TaskTagParser

java.lang.Object
  extended by org.fife.ui.rsyntaxtextarea.parser.AbstractParser
      extended by org.fife.ui.rsyntaxtextarea.parser.TaskTagParser
All Implemented Interfaces:
Parser

public class TaskTagParser
extends AbstractParser

Parser that identifies "task tags," such as "TODO", "FIXME", etc. in source code comments.

Version:
1.0
Author:
Robert Futrell

Nested Class Summary
static class TaskTagParser.TaskNotice
          A parser notice that signifies a task.
 
Constructor Summary
TaskTagParser()
           
 
Method Summary
 ParseResult parse(RSyntaxDocument doc, java.lang.String style)
          Parses input from the specified document.
 void setTaskPattern(java.lang.String pattern)
          Sets the pattern of task identifiers, for example, "TODO|FIXME".
 
Methods inherited from class org.fife.ui.rsyntaxtextarea.parser.AbstractParser
getHyperlinkListener, getImageBase, setHyperlinkListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskTagParser

public TaskTagParser()
Method Detail

parse

public ParseResult parse(RSyntaxDocument doc,
                         java.lang.String style)
Description copied from interface: Parser
Parses input from the specified document.

Parameters:
doc - The document to parse. This document is in a read lock, so it cannot be modified while parsing is occurring.
style - The language being rendered, such as SyntaxConstants.SYNTAX_STYLE_JAVA.
Returns:
An object describing the section of the document parsed and the results. This is guaranteed to be non-null.

setTaskPattern

public void setTaskPattern(java.lang.String pattern)
                    throws java.util.regex.PatternSyntaxException
Sets the pattern of task identifiers, for example, "TODO|FIXME".

Parameters:
pattern - The pattern. A value of null effectively disables task parsing.
Throws:
java.util.regex.PatternSyntaxException - If pattern is an invalid regular expression.