KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > text > syntax > XMLTokenIDs


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.xml.text.syntax;
21
22 import org.netbeans.editor.BaseTokenID;
23
24 /**
25  * Enumeration of all XML TokenIds.
26  *
27  * @author Petr Kuzel
28  * @see XMLDefaultTokenContext
29  * @see XMLTokenId
30  */

31 @Deprecated JavaDoc
32 public interface XMLTokenIDs {
33
34     // Token categories
35

36     // Numeric-ids for token-ids
37
public static final int TEXT_ID = 1;
38     public static final int WS_ID = 2;
39     public static final int ERROR_ID = 3;
40     public static final int TAG_ID = 4;
41     public static final int ARGUMENT_ID = 5;
42     public static final int OPERATOR_ID = 6;
43     public static final int VALUE_ID = 7;
44     public static final int BLOCK_COMMENT_ID = 8;
45 // public static final int SGML_COMMENT_ID = 9;
46
public static final int DECLARATION_ID = 10;
47     public static final int CHARACTER_ID = 11;
48     
49     public static final int EOL_ID = 12;
50
51     public static final int PI_START_ID = 13;
52     public static final int PI_TARGET_ID = 14;
53     public static final int PI_CONTENT_ID = 15;
54     public static final int PI_END_ID = 16;
55
56     public static final int CDATA_SECTION_ID = 17;
57     
58     // Token-ids
59
/** Plain text */
60     public static final BaseTokenID TEXT = new BaseTokenID( "text", TEXT_ID );
61     /** Erroneous Text */
62     public static final BaseTokenID WS = new BaseTokenID( "ws", WS_ID );
63     /** Plain Text*/
64     public static final BaseTokenID ERROR = new BaseTokenID( "error", ERROR_ID );
65     /** XML Tag */
66     public static final BaseTokenID TAG = new BaseTokenID( "tag", TAG_ID );
67     /** Argument of a tag */
68     public static final BaseTokenID ARGUMENT = new BaseTokenID( "attribute", ARGUMENT_ID );
69     /** Operators - '=' between arg and value */
70     public static final BaseTokenID OPERATOR = new BaseTokenID( "operator", OPERATOR_ID );
71     /** Value - value of an argument */
72     public static final BaseTokenID VALUE = new BaseTokenID( "value", VALUE_ID );
73     /** Block comment */
74     public static final BaseTokenID BLOCK_COMMENT = new BaseTokenID( "comment", BLOCK_COMMENT_ID );
75     /** SGML declaration in XML document - e.g. <!DOCTYPE> */
76     public static final BaseTokenID DECLARATION = new BaseTokenID( "doctype", DECLARATION_ID );
77     /** Character reference, e.g. &amp;lt; = &lt; */
78     public static final BaseTokenID CHARACTER = new BaseTokenID( "ref", CHARACTER_ID );
79     
80     /** End of line */
81     public static final BaseTokenID EOL = new BaseTokenID( "EOL", EOL_ID );
82
83     /* PI start delimiter <sample><b>&lt;?</b>target content of pi ?></sample> */
84     public static final BaseTokenID PI_START = new BaseTokenID( "pi-start", PI_START_ID);
85     /* PI target <sample>&lt;?<b>target</b> content of pi ?></sample> */
86     public static final BaseTokenID PI_TARGET = new BaseTokenID( "pi-target", PI_TARGET_ID);
87     /* PI conetnt <sample>&lt;?target <b>content of pi </b>?></sample> */
88     public static final BaseTokenID PI_CONTENT = new BaseTokenID( "pi-content", PI_CONTENT_ID);
89     /* PI end delimiter <sample>&lt;?target <content of pi <b>?></b></sample> */
90     public static final BaseTokenID PI_END = new BaseTokenID( "pi-end", PI_END_ID);
91     /** Cdata section including its delimiters. */
92     public static final BaseTokenID CDATA_SECTION = new BaseTokenID( "cdata-section", CDATA_SECTION_ID);
93 }
94
Popular Tags