public class HTMLSyntaxHighlighter
extends java.lang.Object
The main method is process(String, Node)
.
NOTE: There should be a more elegant and stable way to achieve this, e.g. by creating a specialized LogicPrinter. However, this is a very involved job to do since all kinds of changes would have to performed to other classes, for instance to maintain a correct position table in the sequent view.
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
DYNAMIC_LOGIC_KEYWORDS_PATTERN |
static java.lang.String |
JAVA_KEYWORDS_REGEX |
static java.util.regex.Pattern |
PROP_LOGIC_KEYWORDS_PATTERN |
Constructor and Description |
---|
HTMLSyntaxHighlighter(javax.swing.text.html.HTMLDocument document)
Creates a new
HTMLSyntaxHighlighter for this HTMLDocument. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
concat(java.lang.String... strings)
Concatenates the given Strings using a
StringBuilder . |
java.lang.String |
process(java.lang.String plainTextString,
Node displayedNode)
Computes a String for the given plain text where HTML elements have been
escaped and syntax highlighting has been added.
|
public static final java.util.regex.Pattern PROP_LOGIC_KEYWORDS_PATTERN
public static final java.util.regex.Pattern DYNAMIC_LOGIC_KEYWORDS_PATTERN
public static final java.lang.String JAVA_KEYWORDS_REGEX
public HTMLSyntaxHighlighter(javax.swing.text.html.HTMLDocument document)
HTMLSyntaxHighlighter
for this HTMLDocument.document
- The HTMLDocument
of the parent JEditorPane
.
Used to add CSS rules.public java.lang.String process(java.lang.String plainTextString, Node displayedNode)
plainTextString
- The String to add syntax highlighting to.displayedNode
- The node the sequent of which should be augmented with syntax
highlighting.public static java.lang.String concat(java.lang.String... strings)
StringBuilder
.strings
- Strings to concatenate.Copyright © 2003-2019 The KeY-Project.