1 4 package freemarker.eclipse.test; 5 6 import org.eclipse.jface.text.rules.IToken; 7 import org.eclipse.jface.text.rules.Token; 8 9 import freemarker.eclipse.editors.PartitionScanner; 10 import freemarker.eclipse.test.util.TokenList; 11 12 17 public class PartitionScannerTest extends AbstractScannerTestCase { 18 19 private IToken DIRECTIVE_TOKEN = new Token(PartitionScanner.FTL_DIRECTIVE); 20 private IToken DEFAULT_TOKEN = new Token(null); 21 private IToken COMMENT_TOKEN = new Token(PartitionScanner.FTL_COMMENT); 22 23 public PartitionScannerTest(String name) { 24 super(name); 25 } 26 27 public void setUp() { 28 tokens = new TokenList(); 29 text = "<#if foo>bar</#if>"; 30 scanner = new PartitionScanner(); 31 tokens.addToken(DIRECTIVE_TOKEN,9); 32 tokens.addToken(DEFAULT_TOKEN,3); 33 tokens.addToken(DIRECTIVE_TOKEN,6); 34 } 35 36 } 37 | Popular Tags |