allkeys[i++] = opname.toUpperCase();
}
//build the word highlighter
CFKeywordDetector cfkd = new CFKeywordDetector();
PredicateWordRule words = new PredicateWordRule(
cfkd,
cfdefault,
allkeys,
cfkeyword
);
words.setCaseSensitive(false);
//now do the opperators
set = dic.getOperators();
it = set.iterator();
while(it.hasNext())
{
String opp = (String)it.next().toString().toLowerCase();
words.addWord(opp, cfopperators);
}
//now do the cffuntions so they look pretty too :)
set = dic.getFunctions();
it = set.iterator();
while(it.hasNext())
{
String fun = (String)it.next().toString().toLowerCase();
words.addWord(fun, cffunction);
}
rules.add(words);
//now do the scopes so they look pretty too :)
set = dic.getAllScopes();
it = set.iterator();
while(it.hasNext())
{
String scope = (String)it.next().toString().toLowerCase();
words.addWord(scope, cfscope);
}
words.addWord("application", cfbuiltinscope);
words.addWord("arguments", cfbuiltinscope);
words.addWord("attributes", cfbuiltinscope);
words.addWord("caller", cfbuiltinscope);
words.addWord("client", cfbuiltinscope);
words.addWord("cookie", cfbuiltinscope);
words.addWord("flash", cfbuiltinscope);
words.addWord("form", cfbuiltinscope);
words.addWord("request", cfbuiltinscope);
words.addWord("server", cfbuiltinscope);
words.addWord("session", cfbuiltinscope);
words.addWord("this",cfbuiltinscope);
words.addWord("thistag", cfbuiltinscope);
words.addWord("thread", cfbuiltinscope);
words.addWord("url", cfbuiltinscope);
words.addWord("variables",cfbuiltinscope);
rules.add(words);
IRule[] rulearry = new IRule[rules.size()];
rules.toArray(rulearry);