1 19 20 package org.netbeans.modules.web.core.syntax.deprecated; 21 22 import org.netbeans.modules.web.core.syntax.deprecated.JspJavaFakeTokenContext; 23 import org.netbeans.editor.BaseTokenID; 24 import org.netbeans.editor.TokenContext; 25 import org.netbeans.editor.TokenContextPath; 26 import org.netbeans.editor.ext.html.HTMLTokenContext; 27 import org.netbeans.editor.ext.plain.PlainTokenContext; 28 import org.netbeans.modules.web.core.syntax.deprecated.ELTokenContext; 29 import org.openide.ErrorManager; 30 31 37 38 public class JspMultiTokenContext extends TokenContext { 39 40 public static final int ERROR_ID = 1; 42 43 44 public static final BaseTokenID ERROR = new BaseTokenID("error", ERROR_ID); 46 public static final JspMultiTokenContext context = new JspMultiTokenContext(); 48 49 public static final TokenContextPath contextPath = context.getContextPath(); 50 51 52 public static final TokenContextPath jspTagContextPath 53 = context.getContextPath(JspTagTokenContext.contextPath); 54 55 56 public static final TokenContextPath elContextPath 57 = context.getContextPath(ELTokenContext.contextPath); 58 59 60 public static final TokenContextPath javaScriptletContextPath 61 = context.getContextPath(JspJavaFakeTokenContext.JavaScriptletTokenContext.contextPath); 62 63 public static final TokenContextPath javaExpressionContextPath 64 = context.getContextPath(JspJavaFakeTokenContext.JavaExpressionTokenContext.contextPath); 65 66 public static final TokenContextPath javaDeclarationContextPath 67 = context.getContextPath(JspJavaFakeTokenContext.JavaDeclarationTokenContext.contextPath); 68 69 70 71 public static final TokenContextPath htmlContextPath 72 = context.getContextPath(HTMLTokenContext.contextPath); 73 74 75 public static final TokenContextPath plainContextPath 76 = context.getContextPath(PlainTokenContext.contextPath); 77 78 79 private JspMultiTokenContext() { 80 super("jsp-", new TokenContext[] { JspTagTokenContext.context, 82 ELTokenContext.context, 83 JspJavaFakeTokenContext.JavaScriptletTokenContext.context, 84 JspJavaFakeTokenContext.JavaDeclarationTokenContext.context, 85 JspJavaFakeTokenContext.JavaExpressionTokenContext.context, 86 HTMLTokenContext.context, 87 PlainTokenContext.context 88 } 89 ); 90 91 try { 92 addDeclaredTokenIDs(); 93 } catch (Exception e) { 94 ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e); 95 } 96 97 } 98 99 } 100 101 | Popular Tags |