Examples of WhitespaceRule


Examples of org.eclipse.jface.text.rules.WhitespaceRule

        //for unfilled "holes"
        //rules.add(new SingleLineRule("{", "}", comment));

        // Add generic whitespace rule.
        rules.add(new WhitespaceRule(new WhitespaceDetector()));

        // Add word rule for keywords, types, and constants.
        WordRule wordRule= new WordRule(new RuleWordDetector(), other);
        for (int i= 0; i < DROOLS_KEYWORDS.length; i++)
            wordRule.addWord(DROOLS_KEYWORDS[i], keyword);
View Full Code Here

Examples of org.eclipse.jface.text.rules.WhitespaceRule

    // Add rule for double quotes
    rules[0] = new SingleLineRule("\"", "\"", string, '\\');
    // Add a rule for single quotes
    rules[1] = new SingleLineRule("'", "'", string, '\\');
    // Add generic whitespace rule.
    rules[2] = new WhitespaceRule(new XMLWhitespaceDetector());

    setRules(rules);
  }
View Full Code Here

Examples of org.languagetool.rules.WhitespaceRule

import java.io.IOException;

public class WhitespaceRuleTest extends TestCase {

    public void testRule() throws IOException {
      final WhitespaceRule rule = new WhitespaceRule(TestTools.getEnglishMessages(), new Polish());
      final JLanguageTool langTool = new JLanguageTool(new Polish());
      assertEquals(0, rule.match(langTool.getAnalyzedSentence("To jest test.")).length);
      assertEquals(1, rule.match(langTool.getAnalyzedSentence("To jest   test.")).length);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.