// Add generic whitespace rule.
rules.add(new WhitespaceRule(new WhitespaceDetectorAdaptor()));
IToken token = syntaxManager.getSyntaxToken(SyntaxManager.Java.OPERATOR);
rules.add(new OperatorRule(token));
token = syntaxManager.getSyntaxToken(SyntaxManager.Java.BRACKET);
rules.add(new BracketRule(token));
// Add word rule for keywords, types, and constants.