Package org.eclipse.xtext.util

Examples of org.eclipse.xtext.util.StopWatch


   */
  @Test
  public void testFormatCode() {
    final Utils utils = new Utils();
    String code = "";
    final StopWatch watch = new StopWatch();
    IntegerRange _upTo = new IntegerRange(0, 1);
    for (final Integer i : _upTo) {
      LangDef _langDef = this.langDef();
      String _formatCode = utils.formatCode("mein foo ist bar nicht baz.", _langDef);
      code = _formatCode;
    }
    watch.resetAndLog("keywords");
    Assert.assertEquals("mein&nbsp;<span class=\"keyword\">foo</span>&nbsp;ist&nbsp;<span class=\"keyword\">bar</span>&nbsp;nicht&nbsp;<span class=\"keyword\">baz</span>.", code);
  }
View Full Code Here


    langDef.getKeywords().add("dfsdf");
    langDef.getKeywords().add("wweee");
    langDef.getKeywords().add("dsfsd");
    final Utils utils = new Utils();
    String code = null;
    StopWatch watch = new StopWatch();
    for (int i = 0; i < 2 ;i++) {
      code = utils.formatCode("mein foo ist bar nicht baz.", langDef);
    }
    watch.resetAndLog("keywords");
    assertEquals("mein&nbsp;<span class=\"keyword\">foo</span>&nbsp;ist&nbsp;<span class=\"keyword\">bar</span>&nbsp;nicht&nbsp;<span class=\"keyword\">baz</span>.", code);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.util.StopWatch

Copyright © 2018 www.massapicom. 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.