Interface SyntaxHighlighter
-
- All Known Implementing Classes:
ApexSyntaxHighlighter,AvailableSyntaxHighlighters,JavaSyntaxHighlighter,LexerBasedHighlighter,ModelicaSyntaxHighlighter,ScalaSyntaxHighlighter,SimpleRegexSyntaxHighlighter,XmlSyntaxHighlighter,XPathSyntaxHighlighter
public interface SyntaxHighlighterLanguage-specific engine for syntax highlighting.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.StringgetLanguageTerseName()Gets the terse name of the language this highlighter cares for.
-
-
-
Method Detail
-
getLanguageTerseName
java.lang.String getLanguageTerseName()
Gets the terse name of the language this highlighter cares for. That's used as a css class for text regions.- Returns:
- The terse name of the language
-
computeHighlighting
org.fxmisc.richtext.model.StyleSpans<java.util.Collection<java.lang.String>> computeHighlighting(java.lang.String text)
Computes the syntax highlighting on the given text. The returned spans are exactly the length of the given text.- Parameters:
text- The text- Returns:
- The computed style spans
-
-