Class AbstractParser
java.lang.Object
org.fife.ui.rsyntaxtextarea.parser.AbstractParser
- All Implemented Interfaces:
Parser
- Direct Known Subclasses:
TaskTagParser,XmlParser
A base class for
Parser implementations. Most Parsers
should be able to extend this class.- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether this parser is enabled.private ExtendedHyperlinkListenerListens for events fromFocusableTips generated from this parser's notices. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the listener for hyperlink events fromFocusableTips, ornullif none.Returnsnull.booleanReturns whether this parser is enabled.voidsetEnabled(boolean enabled) Toggles whether this parser is enabled.voidReturns the listener for this parser.
-
Field Details
-
enabled
private boolean enabledWhether this parser is enabled. If this isfalse, then this parser will not be run. -
linkListener
Listens for events fromFocusableTips generated from this parser's notices.
-
-
Constructor Details
-
AbstractParser
protected AbstractParser()Constructor.
-
-
Method Details
-
getHyperlinkListener
Description copied from interface:ParserReturns the listener for hyperlink events fromFocusableTips, ornullif none.- Specified by:
getHyperlinkListenerin interfaceParser- Returns:
- The listener.
-
getImageBase
Returnsnull. Parsers that wish to show images in their tool tips should override this method to return the image base URL.- Specified by:
getImageBasein interfaceParser- Returns:
nullalways.
-
isEnabled
public boolean isEnabled()Description copied from interface:ParserReturns whether this parser is enabled. If this returnsfalse, it will not be run. -
setEnabled
public void setEnabled(boolean enabled) Toggles whether this parser is enabled.- Parameters:
enabled- Whether this parser is enabled.- See Also:
-
setHyperlinkListener
Returns the listener for this parser.- Parameters:
listener- The new listener.- See Also:
-