1 19 package org.netbeans.modules.xml.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.xml.text.syntax.javacc.lib.*; 27 28 35 36 public class XMLTokenContext extends TokenContext { 37 38 public static final int ATT_ID = 1; 39 public static final int CDATA_ID = 2; 40 public static final int COMMENT_ID = 3; 41 public static final int EOL_ID = 4; 42 public static final int ERROR_ID = 5; 43 public static final int KW_ID = 6; 44 public static final int PLAIN_ID = 7; 45 public static final int REF_ID = 8; 46 public static final int STRING_ID = 9; 47 public static final int SYMBOL_ID = 10; 48 public static final int TAG_ID = 11; 49 public static final int TARGET_ID = 12; 50 public static final int CDATA_MARKUP_ID = 13; 51 52 53 54 public static final JJTokenID ATT = new JJTokenID("attribute", ATT_ID); public static final JJTokenID CDATA = new JJTokenID("cdata", CDATA_ID); 59 public static final JJTokenID COMMENT = new JJTokenID("comment", COMMENT_ID); public static final JJTokenID EOL = new JJTokenID("EOL", EOL_ID); public static final JJTokenID ERROR = new JJTokenID("error", ERROR_ID, true); 63 public static final JJTokenID KW = new JJTokenID("keyword", KW_ID); public static final JJTokenID PLAIN = new JJTokenID("plain", PLAIN_ID); public static final JJTokenID REF = new JJTokenID("ref", REF_ID); public static final JJTokenID STRING = new JJTokenID("string", STRING_ID); public static final JJTokenID SYMBOL = new JJTokenID("symbol", SYMBOL_ID); public static final JJTokenID TAG = new JJTokenID("tag", TAG_ID); public static final JJTokenID TARGET = new JJTokenID("target", TARGET_ID); 77 public static final JJTokenID CDATA_MARKUP = new JJTokenID("markup-in-CDATA", CDATA_MARKUP_ID); 79 public static final XMLTokenContext context = new XMLTokenContext(); 81 82 public static final TokenContextPath contextPath = context.getContextPath(); 83 84 85 protected XMLTokenContext() { 86 super("xml-"); 88 try { 89 addDeclaredTokenIDs(); 90 } catch (Exception e) { 91 if (Boolean.getBoolean("netbeans.debug.exceptions")) { e.printStackTrace(); 93 } 94 } 95 96 } 97 98 } 99 | Popular Tags |