private void addWhitespaceRule(List rules) {
rules.add(new WhitespaceRule(new ColoringWhitespaceDetector()));
}
private void addTextSequenceRules(Rule ruleSet, List rules, IToken defaultToken) {
ColoringWordDetector wordDetector = new ColoringWordDetector();
if(ruleSet.getHighlightDigits()) rules.add(new NumberRule(newToken(ColorsPreferencePage.DIGIT_COLOR)));
CasedWordRule wordRule = new CasedWordRule(wordDetector, defaultToken, ruleSet.getKeywords().ignoreCase());
addKeywordRule(ruleSet, "COMMENT1", ColorsPreferencePage.COMMENT1_COLOR, wordRule, wordDetector);
addKeywordRule(ruleSet, "COMMENT2", ColorsPreferencePage.COMMENT2_COLOR, wordRule, wordDetector);