I am developing an eclipse editor for a language, which has keywords like T:
I'm adding the highlighting- feature with this code:
WordRule keywordRules = new WordRule(new WordDetector(), standard);
for ( String keyword1: Keywords.KEYWORDS1 )
{
keywordRules.addWord(keyword1, keywords1);
}
for ( String keyword2: Keywords.KEYWORDS2 )
{
keywordRules.addWord(keyword2, keywords2);
}
rules.add(keywordRules);
rules.add(new SingleLineRule("F", ": ", keywords2));
IRule[] result = new IRule[rules.size()];
rules.toArray(result);
setRules(result);
My WordDetector class just checks if the character is return Character.isJavaIdentifierPart(c);
In the class Keywords, there are the keywords in static string arrays.
What am I doing wrong?
[Updated on: Fri, 13 August 2010 06:22]
Report message to a moderator