1 19 package org.netbeans.modules.css.text.syntax; 20 21 import org.netbeans.editor.BaseTokenCategory; 22 import org.netbeans.editor.BaseTokenID; 23 import org.netbeans.editor.TokenContext; 24 import org.netbeans.editor.TokenContextPath; 25 26 import org.netbeans.modules.css.text.syntax.javacc.lib.*; 27 28 35 public class CSSTokenContext extends TokenContext { 36 37 public final static int ATKW_ID = 1; 38 public final static int COMMENT_ID = 2; 39 public final static int EOL_ID = 3; 40 public final static int ERROR_ID = 4; 41 public final static int PLAIN_ID = 5; 42 public final static int PROPERTY_ID = 6; 43 public final static int SELECTOR_ID = 7; 44 45 46 public final static JJTokenID ATKW = new JJTokenID("at-keyword", ATKW_ID); public final static JJTokenID COMMENT = new JJTokenID("comment", COMMENT_ID); public final static JJTokenID EOL = new JJTokenID("eol", EOL_ID); public final static JJTokenID ERROR = new JJTokenID("error", ERROR_ID, true); public final static JJTokenID PLAIN = new JJTokenID("plain", PLAIN_ID); public final static JJTokenID PROPERTY = new JJTokenID("property", PROPERTY_ID); public final static JJTokenID SELECTOR = new JJTokenID("selector", SELECTOR_ID); 54 public static final CSSTokenContext context = new CSSTokenContext(); 56 57 public static final TokenContextPath contextPath = context.getContextPath(); 58 59 private CSSTokenContext() { 60 super("css-"); 62 try { 63 addDeclaredTokenIDs(); 64 } catch (Exception e) { 65 if (Boolean.getBoolean("netbeans.debug.exceptions")) { e.printStackTrace(); 67 } 68 } 69 70 } 71 } 72 | Popular Tags |