Package org.apache.sis.internal.book
Class CodeColorizer
java.lang.Object
org.apache.sis.internal.book.CodeColorizer
Apply syntax colorization on Java code. This class is different than most other colorization tools
since its apply different colors depending on whether a word is known to be defined in an OGC/ISO
standard, in GeoAPI or in Apache SIS.
- Since:
- 0.7
- Version:
- 1.3
- Author:
- Martin Desruisseaux (Geomatys)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
JAVA_KEYWORDS
Lists of Java keywords.
-
-
Constructor Details
-
CodeColorizer
Creates a new color colorizer.- Parameters:
document- the object to use for creating nodes.- Throws:
IOException- if an error occurred while reading the list of predefined identifiers.BookException- if an identifier is defined twice.
-
-
Method Details
-
highlight
Applies emphasing on the words found in all text node of the given node.- Parameters:
parent- the root element where to put Java keywords in bold characters. This is typically a<samp>or<code>element.type-"xml"if the element to process is XML rather than Java code.- Throws:
BookException- if an element cannot be processed.
-