Package org.basex.gui.text
Class SyntaxXML
java.lang.Object
org.basex.gui.text.SyntaxXML
This class defines syntax highlighting for XML files.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the end of a comment.byte[]Returns the start of a comment.byte[]format(byte[] string, byte[] spaces) Returns a formatted version of a string.getColor(org.basex.gui.text.TextIterator iter) Returns the color for the current token.voidInitializes the highlighter.
-
Constructor Details
-
SyntaxXML
public SyntaxXML()
-
-
Method Details
-
init
Initializes the highlighter.- Parameters:
color- default color
-
getColor
Returns the color for the current token.- Parameters:
iter- iterator- Returns:
- color
-
commentOpen
public byte[] commentOpen()Returns the start of a comment.- Returns:
- comment start
-
commentEnd
public byte[] commentEnd()Returns the end of a comment.- Returns:
- comment end
-
format
public byte[] format(byte[] string, byte[] spaces) Returns a formatted version of a string.- Parameters:
string- string to be formattedspaces- spaces- Returns:
- formatted string
-