public abstract class SimpleRegexSyntaxHighlighter extends java.lang.Object implements SyntaxHighlighter
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SimpleRegexSyntaxHighlighter.RegexHighlightGrammar
Describes the tokens of the language that should be colored with a regular expression.
|
protected static class |
SimpleRegexSyntaxHighlighter.RegexHighlightGrammarBuilder
Builds a highlight grammar in a concise way.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleRegexSyntaxHighlighter(java.lang.String languageName,
SimpleRegexSyntaxHighlighter.RegexHighlightGrammar grammar)
Creates a highlighter given a name for the language and a "regex grammar".
|
| Modifier and Type | Method and Description |
|---|---|
org.fxmisc.richtext.model.StyleSpans<java.util.Collection<java.lang.String>> |
computeHighlighting(java.lang.String text)
Computes the syntax highlighting on the given text.
|
java.lang.String |
getLanguageTerseName()
Gets the terse name of the language this highlighter cares for.
|
protected static SimpleRegexSyntaxHighlighter.RegexHighlightGrammarBuilder |
grammarBuilder(java.util.Collection<java.lang.String> cssClass,
java.lang.String pattern)
Gets a builder to make a grammar to build a highlighter.
|
protected SimpleRegexSyntaxHighlighter(java.lang.String languageName,
SimpleRegexSyntaxHighlighter.RegexHighlightGrammar grammar)
languageName - The language namegrammar - The grammarpublic org.fxmisc.richtext.model.StyleSpans<java.util.Collection<java.lang.String>> computeHighlighting(java.lang.String text)
SyntaxHighlightercomputeHighlighting in interface SyntaxHighlightertext - The textpublic final java.lang.String getLanguageTerseName()
SyntaxHighlightergetLanguageTerseName in interface SyntaxHighlighterprotected static SimpleRegexSyntaxHighlighter.RegexHighlightGrammarBuilder grammarBuilder(java.util.Collection<java.lang.String> cssClass, java.lang.String pattern)
cssClass - The css class of the first patternpattern - The first patternCopyright © 2002–2017 PMD. All rights reserved.