1 19 20 package org.netbeans.modules.web.core.syntax.deprecated; 21 22 import org.netbeans.editor.TokenContext; 23 import org.netbeans.editor.TokenContextPath; 24 import org.netbeans.editor.ext.java.JavaTokenContext; 25 import org.openide.ErrorManager; 26 27 34 35 public class JspJavaFakeTokenContext { 36 37 public static class JavaScriptletTokenContext extends TokenContext { 38 39 public static final JavaScriptletTokenContext context = new JavaScriptletTokenContext(); 41 42 43 public static final TokenContextPath contextPath = 44 context.getContextPath(JavaTokenContext.contextPath); 45 46 private JavaScriptletTokenContext() { 47 super("", new TokenContext[] { JavaTokenContext.context 49 } 50 ); 51 52 try { 53 addDeclaredTokenIDs(); 54 } catch (Exception e) { 55 ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); 56 } 57 58 } 59 60 } 61 62 public static class JavaDeclarationTokenContext extends TokenContext { 63 64 public static final JavaDeclarationTokenContext context = new JavaDeclarationTokenContext(); 66 67 68 public static final TokenContextPath contextPath = 69 context.getContextPath(JavaTokenContext.contextPath); 70 71 private JavaDeclarationTokenContext() { 72 super("", new TokenContext[] { JavaTokenContext.context 74 } 75 ); 76 77 try { 78 addDeclaredTokenIDs(); 79 } catch (Exception e) { 80 ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); 81 } 82 83 } 84 85 } 86 87 public static class JavaExpressionTokenContext extends TokenContext { 88 89 public static final JavaExpressionTokenContext context = new JavaExpressionTokenContext(); 91 92 93 public static final TokenContextPath contextPath = 94 context.getContextPath(JavaTokenContext.contextPath); 95 96 private JavaExpressionTokenContext() { 97 super("", new TokenContext[] { JavaTokenContext.context 99 } 100 ); 101 102 try { 103 addDeclaredTokenIDs(); 104 } catch (Exception e) { 105 ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); 106 } 107 108 } 109 110 } 111 112 113 } 114 115 | Popular Tags |