- java.lang.Object
-
- org.jline.reader.impl.DefaultHighlighter
-
- org.jline.console.impl.SystemHighlighter
-
- All Implemented Interfaces:
Highlighter
public class SystemHighlighter extends DefaultHighlighter
Highlight command and language syntax using nanorc highlighter.- Author:
- Matti Rinta-Nikkola
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classSystemHighlighter.FileHighlightCommand
-
Field Summary
Fields Modifier and Type Field Description protected Nano.SyntaxHighlighterargsHighlighterprotected Nano.SyntaxHighlightercommandHighlighterprotected Map<String,SystemHighlighter.FileHighlightCommand>fileHighlightprotected Nano.SyntaxHighlighterlangHighlighterprotected SystemRegistrysystemRegistry-
Fields inherited from class org.jline.reader.impl.DefaultHighlighter
errorIndex, errorPattern
-
-
Constructor Summary
Constructors Constructor Description SystemHighlighter(Nano.SyntaxHighlighter commandHighlighter, Nano.SyntaxHighlighter argsHighlighter, Nano.SyntaxHighlighter langHighlighter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFileHighlight(String... commands)voidaddFileHighlight(String command, String subcommand, Collection<String> fileOptions)protected AttributedStringdoCommandHighlight(String buffer)protected AttributedStringdoFileArgsHighlight(LineReader reader, String buffer, SystemHighlighter.FileHighlightCommand fhc)protected AttributedStringdoFileOptsHighlight(LineReader reader, String buffer, SystemHighlighter.FileHighlightCommand fhc)AttributedStringhighlight(LineReader reader, String buffer)protected AttributedStringsystemHighlight(LineReader reader, String buffer)-
Methods inherited from class org.jline.reader.impl.DefaultHighlighter
setErrorIndex, setErrorPattern
-
-
-
-
Field Detail
-
commandHighlighter
protected final Nano.SyntaxHighlighter commandHighlighter
-
argsHighlighter
protected final Nano.SyntaxHighlighter argsHighlighter
-
langHighlighter
protected final Nano.SyntaxHighlighter langHighlighter
-
systemRegistry
protected final SystemRegistry systemRegistry
-
fileHighlight
protected final Map<String,SystemHighlighter.FileHighlightCommand> fileHighlight
-
-
Constructor Detail
-
SystemHighlighter
public SystemHighlighter(Nano.SyntaxHighlighter commandHighlighter, Nano.SyntaxHighlighter argsHighlighter, Nano.SyntaxHighlighter langHighlighter)
-
-
Method Detail
-
highlight
public AttributedString highlight(LineReader reader, String buffer)
- Specified by:
highlightin interfaceHighlighter- Overrides:
highlightin classDefaultHighlighter
-
addFileHighlight
public void addFileHighlight(String... commands)
-
addFileHighlight
public void addFileHighlight(String command, String subcommand, Collection<String> fileOptions)
-
systemHighlight
protected AttributedString systemHighlight(LineReader reader, String buffer)
-
doFileOptsHighlight
protected AttributedString doFileOptsHighlight(LineReader reader, String buffer, SystemHighlighter.FileHighlightCommand fhc)
-
doFileArgsHighlight
protected AttributedString doFileArgsHighlight(LineReader reader, String buffer, SystemHighlighter.FileHighlightCommand fhc)
-
doCommandHighlight
protected AttributedString doCommandHighlight(String buffer)
-
-