public class SyntaxHighlighter extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SyntaxHighlighter.RuleSplitter |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COMMAND_INCLUDE |
protected static String |
COMMAND_THEME |
protected static String |
DEFAULT_LESSRC_FILE |
static String |
DEFAULT_NANORC_FILE |
static String |
REGEX_TOKEN_NAME |
static String |
TYPE_NANORCTHEME |
| Modifier and Type | Method and Description |
|---|---|
protected static SyntaxHighlighter |
build(List<Path> syntaxFiles,
String file,
String syntaxName) |
protected static SyntaxHighlighter |
build(List<Path> syntaxFiles,
String file,
String syntaxName,
boolean ignoreErrors) |
static SyntaxHighlighter |
build(Path nanorc,
String syntaxName)
Build SyntaxHighlighter
|
static SyntaxHighlighter |
build(String nanorcUrl)
Build SyntaxHighlighter
|
Path |
getCurrentTheme() |
org.jline.utils.AttributedString |
highlight(org.jline.utils.AttributedString attributedString) |
org.jline.utils.AttributedString |
highlight(org.jline.utils.AttributedStringBuilder asb) |
org.jline.utils.AttributedString |
highlight(String string) |
protected static void |
nanorcInclude(String parameter,
List<Path> syntaxFiles) |
protected static void |
nanorcTheme(String parameter,
List<Path> syntaxFiles) |
void |
refresh() |
SyntaxHighlighter |
reset() |
void |
setCurrentTheme(Path currentTheme) |
void |
setParser(org.jline.builtins.SyntaxHighlighter.Parser parser) |
public static final String REGEX_TOKEN_NAME
public static final String TYPE_NANORCTHEME
public static final String DEFAULT_NANORC_FILE
protected static final String DEFAULT_LESSRC_FILE
protected static final String COMMAND_INCLUDE
protected static final String COMMAND_THEME
protected static SyntaxHighlighter build(List<Path> syntaxFiles, String file, String syntaxName)
protected static SyntaxHighlighter build(List<Path> syntaxFiles, String file, String syntaxName, boolean ignoreErrors)
public static SyntaxHighlighter build(Path nanorc, String syntaxName)
nanorc - Path of nano config file jnanorcsyntaxName - syntax name e.g 'Java'protected static void nanorcInclude(String parameter, List<Path> syntaxFiles) throws IOException
IOExceptionprotected static void nanorcTheme(String parameter, List<Path> syntaxFiles) throws IOException
IOExceptionpublic static SyntaxHighlighter build(String nanorcUrl)
nanorcUrl - Url of nanorc filepublic void setCurrentTheme(Path currentTheme)
public Path getCurrentTheme()
public void setParser(org.jline.builtins.SyntaxHighlighter.Parser parser)
public SyntaxHighlighter reset()
public void refresh()
public org.jline.utils.AttributedString highlight(String string)
public org.jline.utils.AttributedString highlight(org.jline.utils.AttributedStringBuilder asb)
public org.jline.utils.AttributedString highlight(org.jline.utils.AttributedString attributedString)
Copyright © 2023. All rights reserved.