Package tk.eclipse.plugin.csseditor.editors

Source Code of tk.eclipse.plugin.csseditor.editors.CSSPartitionScanner

package tk.eclipse.plugin.csseditor.editors;

import org.eclipse.jface.text.rules.IPredicateRule;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.MultiLineRule;
import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
import org.eclipse.jface.text.rules.Token;

/**
* @author Naoki Takezoe
*/
public class CSSPartitionScanner extends RuleBasedPartitionScanner {
 
  public final static String CSS_COMMENT = "__css_comment";
 
  public CSSPartitionScanner(){
    IToken comment  = new Token(CSS_COMMENT);
   
    IPredicateRule[] rules = new IPredicateRule[1];
    rules[0] = new MultiLineRule("/*" , "*/" ,comment);
   
    setPredicateRules(rules);
  }
}
TOP

Related Classes of tk.eclipse.plugin.csseditor.editors.CSSPartitionScanner

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.