1 11 package org.eclipse.pde.internal.ui.editor.text; 12 13 import org.eclipse.jface.text.rules.IPredicateRule; 14 import org.eclipse.jface.text.rules.MultiLineRule; 15 import org.eclipse.jface.text.rules.RuleBasedPartitionScanner; 16 import org.eclipse.jface.text.rules.Token; 17 18 public class XMLPartitionScanner extends RuleBasedPartitionScanner { 19 public final static String XML_COMMENT = "__xml_comment"; public final static String XML_TAG = "__xml_tag"; 22 public static final String [] PARTITIONS = new String [] {XML_COMMENT, XML_TAG}; 23 24 public XMLPartitionScanner() { 25 IPredicateRule[] rules = new IPredicateRule[2]; 26 rules[0] = new MultiLineRule("<!--", "-->", new Token(XML_COMMENT), '\\', true); rules[1] = new XMLTagRule(new Token(XML_TAG)); 28 setPredicateRules(rules); 29 } 30 } 31 | Popular Tags |