01: /*
02: * Sun Public License Notice
03: *
04: * The contents of this file are subject to the Sun Public License
05: * Version 1.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://www.sun.com/
08: *
09: * The Original Code is NetBeans. The Initial Developer of the Original
10: * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
11: * Microsystems, Inc. All Rights Reserved.
12: */
13:
14: package org.netbeans.editor.ext.java;
15:
16: import org.netbeans.editor.BaseTokenID;
17: import org.netbeans.editor.TokenContext;
18: import org.netbeans.editor.TokenContextPath;
19:
20: /**
21: * Various extensions to the displaying of the java tokens is defined here. The
22: * tokens defined here are used by the java-drawing-layer.
23: *
24: * @author Miloslav Metelka
25: * @version 1.00
26: */
27:
28: public class JavaLayerTokenContext extends TokenContext {
29:
30: // Token category-ids
31:
32: // Numeric-ids for token-ids
33: public static final int METHOD_ID = 1;
34:
35: // Token-categories
36: // public static final BaseTokenCategory KEYWORDS
37: // = new BaseTokenCategory("keywords", KEYWORDS_ID);
38:
39: // Token-ids
40: public static final BaseTokenID METHOD = new BaseTokenID("method",
41: METHOD_ID);
42:
43: // Context instance declaration
44: public static final JavaLayerTokenContext context = new JavaLayerTokenContext();
45:
46: public static final TokenContextPath contextPath = context
47: .getContextPath();
48:
49: private JavaLayerTokenContext() {
50: super ("java-layer-");
51:
52: try {
53: addDeclaredTokenIDs();
54: } catch (Exception e) {
55: if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N
56: e.printStackTrace();
57: }
58: }
59:
60: }
61:
62: }
|