KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > core > syntax > deprecated > JspDirectiveTokenContext


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.web.core.syntax.deprecated;
21
22 import org.netbeans.editor.BaseTokenCategory;
23 import org.netbeans.editor.TokenCategory;
24 import org.netbeans.editor.TokenContextPath;
25 import org.netbeans.editor.BaseTokenID;
26 import org.openide.ErrorManager;
27
28 /**
29 * Syntax Token Context class for JSP directives. Tokens from this token context
30 * are used for jsp directives. The only difference between them is that directive
31 * tokens has a special token context category.
32 *
33 * @author Marek Fukala
34 * @deprecated Use Jsp Lexer instead.
35 */

36
37 public class JspDirectiveTokenContext extends JspTagTokenContext {
38
39     //token ids - are inherited from superclass
40

41     //token category ids
42
public static final int TAG_CATEGORY_ID = WHITESPACE_ID + 1;
43
44     //token category for jsp directives
45
public static final TokenCategory tokenCategory = new BaseTokenCategory("directive", TAG_CATEGORY_ID); // NOI18N
46

47     // TokenIDs
48
public static final BaseTokenID TEXT = new BaseTokenID("text", TEXT_ID, tokenCategory); // NOI18N
49
public static final BaseTokenID ERROR = new BaseTokenID("error", ERROR_ID, tokenCategory); // NOI18N
50
public static final BaseTokenID TAG = new BaseTokenID("tag-directive", TAG_ID, tokenCategory); // NOI18N
51
public static final BaseTokenID SYMBOL = new BaseTokenID("symbol", SYMBOL_ID, tokenCategory); // NOI18N
52
public static final BaseTokenID SYMBOL2 = new BaseTokenID("scriptlet-delimiter", SYMBOL2_ID, tokenCategory); // NOI18N
53
public static final BaseTokenID COMMENT = new BaseTokenID("comment", COMMENT_ID, tokenCategory); // NOI18N
54
public static final BaseTokenID ATTRIBUTE = new BaseTokenID("attribute-name", ATTRIBUTE_ID, tokenCategory); // NOI18N
55
public static final BaseTokenID ATTR_VALUE = new BaseTokenID("attribute-value", ATTR_VALUE_ID, tokenCategory); // NOI18N
56
public static final BaseTokenID EOL = new BaseTokenID("EOL", EOL_ID, tokenCategory); // NOI18N
57
public static final BaseTokenID AFTER_UNEXPECTED_LT = new BaseTokenID("AFTER_UNEXPECTED_LT", AFTER_UNEXPECTED_LT_ID, tokenCategory); // NOI18N
58
public static final BaseTokenID WHITESPACE = new BaseTokenID("whitespace", WHITESPACE_ID, tokenCategory); // NOI18N
59

60     // Context instance declaration
61
public static final JspDirectiveTokenContext context = new JspDirectiveTokenContext();
62
63     public static final TokenContextPath contextPath = context.getContextPath();
64
65     JspDirectiveTokenContext() {
66         super(); // NOI18N
67

68         try {
69             addDeclaredTokenIDs();
70         } catch (Exception JavaDoc e) {
71             ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e);
72         }
73
74     }
75     
76 }
77
78
Popular Tags