// Add generic whitespace rule.
rules.add(new WhitespaceRule(new JavaWhitespaceDetector()));
// Add word rule for keywords, types, and constants.
WordRule wordRule = new WordRule(new JavaWordDetector(), other);
List<String> keywords = Keywords.getValues(Keywords.KEYWORDS);
for( int i = 0; i < keywords.size(); i++ )
wordRule.addWord(keywords.get(i), keywordTok);
List<String> types = Keywords.getValues(Keywords.TYPES);
for( int i = 0; i < types.size(); i++ )
wordRule.addWord(types.get(i), typeTok);
List<String> constants = Keywords.getValues(Keywords.CONSTANTS);
for( int i = 0; i < constants.size(); i++ )
wordRule.addWord(constants.get(i), constantsTok);
List<String> geoscript = Keywords.getValues(Keywords.GEOSCRIPT);
for( int i = 0; i < geoscript.size(); i++ )
wordRule.addWord(geoscript.get(i), geoscriptTok);
List<String> jgtModules = Keywords.getValues(Keywords.JGTMODULES);
for( int i = 0; i < jgtModules.size(); i++ )
wordRule.addWord(jgtModules.get(i), geoscriptTok);
List<String> method = Keywords.getValues(Keywords.METHODS);
for( int i = 0; i < method.size(); i++ )
wordRule.addWord(method.get(i), methodTok);
List<String> jgt_method = Keywords.getValues(Keywords.JGTMETHODS);
for( int i = 0; i < jgt_method.size(); i++ )
wordRule.addWord(jgt_method.get(i), methodTok);
List<String> oms = Keywords.getValues(Keywords.OMS);
for( int i = 0; i < oms.size(); i++ ) {
wordRule.addWord(oms.get(i), omsComponentsTok);
}
for( String moduleFieldsName : moduleFieldsNameList ) {
wordRule.addWord(moduleFieldsName, modulesFieldsTok);
}
for( String moduleClassesName : moduleClassesNameList ) {
wordRule.addWord(moduleClassesName, omsModulesTok);
}
rules.add(wordRule);
IRule[] result = new IRule[rules.size()];