Interface SyntaxHighlighter
-
- All Known Implementing Classes:
ApexSyntaxHighlighter
,AvailableSyntaxHighlighters
,JavaSyntaxHighlighter
,LexerBasedHighlighter
,ModelicaSyntaxHighlighter
,ScalaSyntaxHighlighter
,SimpleRegexSyntaxHighlighter
,XmlSyntaxHighlighter
,XPathSyntaxHighlighter
public interface SyntaxHighlighter
Language-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<Collection<String>>
computeHighlighting(String text)
Computes the syntax highlighting on the given text.String
getLanguageTerseName()
Gets the terse name of the language this highlighter cares for.
-
-
-
Method Detail
-
getLanguageTerseName
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<Collection<String>> computeHighlighting(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
-
-