if ((doc == null) || (pageAnalysis == null)) {
return;
}
// Retrieve configuration
Configuration config = Configuration.getConfiguration();
int limit = config.getInt(null, ConfigurationValueInteger.SYNTAX_HIGHLIGHTING_LIMIT);
if (doc.getLength() > limit) {
return;
}
ConfigurationValueStyle.StyleProperties styleCategory = config.getStyle(
ConfigurationValueStyle.CATEGORY);
ConfigurationValueStyle.StyleProperties styleComments = config.getStyle(
ConfigurationValueStyle.COMMENTS);
ConfigurationValueStyle.StyleProperties styleExternalLink = config.getStyle(
ConfigurationValueStyle.EXTERNAL_LINK);
ConfigurationValueStyle.StyleProperties styleImage = config.getStyle(
ConfigurationValueStyle.IMAGE);
ConfigurationValueStyle.StyleProperties styleInternalLink = config.getStyle(
ConfigurationValueStyle.INTERNAL_LINK);
ConfigurationValueStyle.StyleProperties styleInterwikiLink = config.getStyle(
ConfigurationValueStyle.INTERWIKI_LINK);
ConfigurationValueStyle.StyleProperties styleLanguageLink = config.getStyle(
ConfigurationValueStyle.LANGUAGE_LINK);
ConfigurationValueStyle.StyleProperties styleProgramming = config.getStyle(
ConfigurationValueStyle.PROGRAMMING);
ConfigurationValueStyle.StyleProperties styleTag = config.getStyle(
ConfigurationValueStyle.TAG);
ConfigurationValueStyle.StyleProperties styleTemplate = config.getStyle(
ConfigurationValueStyle.TEMPLATE);
ConfigurationValueStyle.StyleProperties styleTitle = config.getStyle(
ConfigurationValueStyle.TITLE);
// Format
List<PageElement> elements = pageAnalysis.getElements(
styleCategory.getEnabled(),