1 19 20 package org.netbeans.modules.properties.syntax; 21 22 import org.netbeans.editor.BaseTokenID; 23 import org.netbeans.editor.TokenContext; 24 import org.netbeans.editor.TokenContextPath; 25 26 33 34 public class PropertiesTokenContext extends TokenContext { 35 36 public static final int TEXT_ID = 1; public static final int LINE_COMMENT_ID = 2; public static final int KEY_ID = 3; public static final int EQ_ID = 4; public static final int VALUE_ID = 5; public static final int EOL_ID = 6; 44 public static final BaseTokenID TEXT 46 = new BaseTokenID("text", TEXT_ID); 47 public static final BaseTokenID LINE_COMMENT 48 = new BaseTokenID("line-comment", LINE_COMMENT_ID); 49 public static final BaseTokenID KEY 50 = new BaseTokenID("key", KEY_ID); 51 public static final BaseTokenID EQ 52 = new BaseTokenID("equal-sign", EQ_ID); 53 public static final BaseTokenID VALUE 54 = new BaseTokenID("value", VALUE_ID); 55 public static final BaseTokenID EOL 56 = new BaseTokenID("EOL", EOL_ID); 57 58 59 public static final PropertiesTokenContext context = new PropertiesTokenContext(); 61 62 public static final TokenContextPath contextPath = context.getContextPath(); 63 64 private PropertiesTokenContext() { 65 super("properties-"); 66 67 try { 68 addDeclaredTokenIDs(); 69 } catch (Exception e) { 70 if (Boolean.getBoolean("netbeans.debug.exceptions")) { e.printStackTrace(); 72 } 73 } 74 75 } 76 77 } 78 79 | Popular Tags |