Top Inners Fields Constructors Methods
io.github.kusoroadeolu.veneer

public Class XMLSyntaxHighlighter

extends AbstractSyntaxHighlighter
Class Inheritance
Imports
io.github.kusoroadeolu.clique.Clique, io.github.kusoroadeolu.clique.style.StyleBuilder, io.github.kusoroadeolu.veneer.theme.SyntaxTheme, io.github.kusoroadeolu.veneer.XMLLexer, .XMLParser, io.github.kusoroadeolu.veneer.utils.Constants, .FragmentToken, .Utils, org.antlr.v4.runtime.BufferedTokenStream, .CharStreams, .CommonTokenStream, .Token, java.util.HashSet, .List, .Set

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Inherited from io.github.kusoroadeolu.veneer.AbstractSyntaxHighlighter:
showLineNumberstheme

Constructor Summary

AccessConstructor and Description
public
XMLSyntaxHighlighter(SyntaxTheme theme, boolean showLineNumbers)

public
public
XMLSyntaxHighlighter(boolean showLineNumbers)

public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
applyStyles(Token token, StyleBuilder sb, Set<Integer> attrNameIndices)

pack-priv void
pack-priv void
public String
highlight(String s)

Implements io.github.kusoroadeolu.veneer.SyntaxHighlighter.highlight.

Highlights the given Java source string.

pack-priv boolean
isComment(int type)

pack-priv boolean
isConstant(int type)

pack-priv boolean
isKeyword(int type)

pack-priv boolean
isMultiLineToken(int type)

pack-priv boolean
isName(int type)

pack-priv boolean
isString(int type)

pack-priv void
styleMultiLineToken(Token token, int[] lineNumber, StyleBuilder sb, Set<Integer> indices)

Constructor Detail

XMLSyntaxHighlighterback to summary
public XMLSyntaxHighlighter(SyntaxTheme theme, boolean showLineNumbers)
XMLSyntaxHighlighterback to summary
public XMLSyntaxHighlighter()
XMLSyntaxHighlighterback to summary
public XMLSyntaxHighlighter(boolean showLineNumbers)
XMLSyntaxHighlighterback to summary
public XMLSyntaxHighlighter(SyntaxTheme theme)

Method Detail

applyStylesback to summary
pack-priv void applyStyles(Token token, StyleBuilder sb, Set<Integer> attrNameIndices)
applyWithLinesback to summary
pack-priv void applyWithLines(StyleBuilder sb, BufferedTokenStream stream, Set<Integer> attrNameIndices)
applyWithoutLinesback to summary
pack-priv void applyWithoutLines(StyleBuilder sb, BufferedTokenStream stream, Set<Integer> attrNameIndices)
highlightback to summary
public String highlight(String s)

Implements io.github.kusoroadeolu.veneer.SyntaxHighlighter.highlight.

Doc from io.github.kusoroadeolu.veneer.SyntaxHighlighter.highlight.

Highlights the given Java source string.

Annotations
@Override
isCommentback to summary
pack-priv boolean isComment(int type)
isConstantback to summary
pack-priv boolean isConstant(int type)
isKeywordback to summary
pack-priv boolean isKeyword(int type)
isMultiLineTokenback to summary
pack-priv boolean isMultiLineToken(int type)
isNameback to summary
pack-priv boolean isName(int type)
isStringback to summary
pack-priv boolean isString(int type)
styleMultiLineTokenback to summary
pack-priv void styleMultiLineToken(Token token, int[] lineNumber, StyleBuilder sb, Set<Integer> indices)
io.github.kusoroadeolu.veneer back to summary

pack-priv Class XMLSyntaxHighlighter.DefaultXMLBaseVisitor

extends XMLParserBaseVisitor<Void>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Set<Integer>

Constructor Summary

AccessConstructor and Description
public
DefaultXMLBaseVisitor(Set<Integer> attrNameIndices)

Method Summary

Modifier and TypeMethod and Description
public Void
Inherited from io.github.kusoroadeolu.veneer.XMLParserBaseVisitor:
visitChardatavisitContentvisitDocumentvisitElementvisitMiscvisitPrologvisitReference

Field Detail

attrNameIndicesback to summary
private final Set<Integer> attrNameIndices

Constructor Detail

DefaultXMLBaseVisitorback to summary
public DefaultXMLBaseVisitor(Set<Integer> attrNameIndices)

Method Detail

visitAttributeback to summary
public Void visitAttribute(XMLParser.AttributeContext ctx)

Overrides io.github.kusoroadeolu.veneer.XMLParserBaseVisitor.visitAttribute.

Implements io.github.kusoroadeolu.veneer.XMLParserVisitor.visitAttribute.

Doc from io.github.kusoroadeolu.veneer.XMLParserBaseVisitor.visitAttribute.

Visit a parse tree produced by XMLParser#attribute.

The default implementation returns the result of calling visitChildren on ctx.