Mercurial > hg > RemoteEditor > Eclipse
comparison src/remoteeditor/editors/XMLPartitionScanner.java @ 0:cf13bdba762b
Initial revision
author | pin |
---|---|
date | Sun, 22 Oct 2006 00:26:53 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cf13bdba762b |
---|---|
1 package remoteeditor.editors; | |
2 | |
3 import org.eclipse.jface.text.rules.*; | |
4 | |
5 public class XMLPartitionScanner extends RuleBasedPartitionScanner { | |
6 public final static String XML_COMMENT = "__xml_comment"; | |
7 public final static String XML_TAG = "__xml_tag"; | |
8 | |
9 public XMLPartitionScanner() { | |
10 | |
11 IToken xmlComment = new Token(XML_COMMENT); | |
12 IToken tag = new Token(XML_TAG); | |
13 | |
14 IPredicateRule[] rules = new IPredicateRule[2]; | |
15 | |
16 rules[0] = new MultiLineRule("<!--", "-->", xmlComment); | |
17 rules[1] = new TagRule(tag); | |
18 | |
19 setPredicateRules(rules); | |
20 } | |
21 } |