|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.web.core.syntax; import org.netbeans.editor.TokenID; import org.netbeans.editor.TokenContext; import org.netbeans.editor.TokenContextPath; import org.netbeans.editor.BaseTokenID; import org.openide.ErrorManager; /** * Syntax class for JSP tags. It is not meant to be used by itself, but as one of syntaxes with * MultiSyntax. Recognizes JSP tags, comments and directives. Does not recognize scriptlets, * expressions and declarations, which should be rocognized by the master syntax, as expressions * can appear embedded in a JSP tag. Moreover, they all share Java syntax. * * @author Petr Jiricka * @version 1.00 */ public class JspTagTokenContext extends TokenContext { // Numeric-ids public static final int TEXT_ID = 1; public static final int ERROR_ID = 2; public static final int TAG_ID = 3; public static final int SYMBOL_ID = 4; public static final int SYMBOL2_ID = 5; public static final int COMMENT_ID = 6; public static final int ATTRIBUTE_ID = 7; public static final int ATTR_VALUE_ID = 8; public static final int EOL_ID = 9; public static final int AFTER_UNEXPECTED_LT_ID = 10; // TokenIDs public static final BaseTokenID TEXT = new BaseTokenID("text", TEXT_ID); // NOI18N public static final BaseTokenID ERROR = new BaseTokenID("error", ERROR_ID); // NOI18N public static final BaseTokenID TAG = new BaseTokenID("tag-directive", TAG_ID); // NOI18N public static final BaseTokenID SYMBOL = new BaseTokenID("symbol", SYMBOL_ID); // NOI18N public static final BaseTokenID SYMBOL2 = new BaseTokenID("scriptlet-delimiter", SYMBOL2_ID); // NOI18N public static final BaseTokenID COMMENT = new BaseTokenID("comment", COMMENT_ID); // NOI18N public static final BaseTokenID ATTRIBUTE = new BaseTokenID("attribute-name", ATTRIBUTE_ID); // NOI18N public static final BaseTokenID ATTR_VALUE = new BaseTokenID("attribute-value", ATTR_VALUE_ID); // NOI18N public static final BaseTokenID EOL = new BaseTokenID("EOL", EOL_ID); // NOI18N public static final BaseTokenID AFTER_UNEXPECTED_LT = new BaseTokenID("AFTER_UNEXPECTED_LT", AFTER_UNEXPECTED_LT_ID); // NOI18N // Context instance declaration public static final JspTagTokenContext context = new JspTagTokenContext(); public static final TokenContextPath contextPath = context.getContextPath(); private JspTagTokenContext() { super("jsptag-"); // NOI18N try { addDeclaredTokenIDs(); } catch (Exception e) { ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e); } } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.