svn-gvsig-desktop / trunk / libraries / libIverUtiles / src / com / iver / utiles / console / jedit / JavaTokenMarker.java @ 8515
History | View | Annotate | Download (2.86 KB)
1 |
package com.iver.utiles.console.jedit; |
---|---|
2 |
/*
|
3 |
* JavaTokenMarker.java - Java token marker
|
4 |
* Copyright (C) 1999 Slava Pestov
|
5 |
*
|
6 |
* You may use and modify this package for any purpose. Redistribution is
|
7 |
* permitted, in both source and binary form, provided that this notice
|
8 |
* remains intact in all source distributions of this package.
|
9 |
*/
|
10 |
|
11 |
|
12 |
/**
|
13 |
* Java token marker.
|
14 |
*
|
15 |
* @author Slava Pestov
|
16 |
* @version $Id$
|
17 |
*/
|
18 |
public class JavaTokenMarker extends CTokenMarker |
19 |
{ |
20 |
public JavaTokenMarker()
|
21 |
{ |
22 |
super(false,getKeywords()); |
23 |
} |
24 |
|
25 |
public static KeywordMap getKeywords() |
26 |
{ |
27 |
if(javaKeywords == null) |
28 |
{ |
29 |
javaKeywords = new KeywordMap(false); |
30 |
javaKeywords.add("package",Token.KEYWORD2);
|
31 |
javaKeywords.add("import",Token.KEYWORD2);
|
32 |
javaKeywords.add("byte",Token.KEYWORD3);
|
33 |
javaKeywords.add("char",Token.KEYWORD3);
|
34 |
javaKeywords.add("short",Token.KEYWORD3);
|
35 |
javaKeywords.add("int",Token.KEYWORD3);
|
36 |
javaKeywords.add("long",Token.KEYWORD3);
|
37 |
javaKeywords.add("float",Token.KEYWORD3);
|
38 |
javaKeywords.add("double",Token.KEYWORD3);
|
39 |
javaKeywords.add("boolean",Token.KEYWORD3);
|
40 |
javaKeywords.add("void",Token.KEYWORD3);
|
41 |
javaKeywords.add("class",Token.KEYWORD3);
|
42 |
javaKeywords.add("interface",Token.KEYWORD3);
|
43 |
javaKeywords.add("abstract",Token.KEYWORD1);
|
44 |
javaKeywords.add("final",Token.KEYWORD1);
|
45 |
javaKeywords.add("private",Token.KEYWORD1);
|
46 |
javaKeywords.add("protected",Token.KEYWORD1);
|
47 |
javaKeywords.add("public",Token.KEYWORD1);
|
48 |
javaKeywords.add("static",Token.KEYWORD1);
|
49 |
javaKeywords.add("synchronized",Token.KEYWORD1);
|
50 |
javaKeywords.add("native",Token.KEYWORD1);
|
51 |
javaKeywords.add("volatile",Token.KEYWORD1);
|
52 |
javaKeywords.add("transient",Token.KEYWORD1);
|
53 |
javaKeywords.add("break",Token.KEYWORD1);
|
54 |
javaKeywords.add("case",Token.KEYWORD1);
|
55 |
javaKeywords.add("continue",Token.KEYWORD1);
|
56 |
javaKeywords.add("default",Token.KEYWORD1);
|
57 |
javaKeywords.add("do",Token.KEYWORD1);
|
58 |
javaKeywords.add("else",Token.KEYWORD1);
|
59 |
javaKeywords.add("for",Token.KEYWORD1);
|
60 |
javaKeywords.add("if",Token.KEYWORD1);
|
61 |
javaKeywords.add("instanceof",Token.KEYWORD1);
|
62 |
javaKeywords.add("new",Token.KEYWORD1);
|
63 |
javaKeywords.add("return",Token.KEYWORD1);
|
64 |
javaKeywords.add("switch",Token.KEYWORD1);
|
65 |
javaKeywords.add("while",Token.KEYWORD1);
|
66 |
javaKeywords.add("throw",Token.KEYWORD1);
|
67 |
javaKeywords.add("try",Token.KEYWORD1);
|
68 |
javaKeywords.add("catch",Token.KEYWORD1);
|
69 |
javaKeywords.add("extends",Token.KEYWORD1);
|
70 |
javaKeywords.add("finally",Token.KEYWORD1);
|
71 |
javaKeywords.add("implements",Token.KEYWORD1);
|
72 |
javaKeywords.add("throws",Token.KEYWORD1);
|
73 |
javaKeywords.add("this",Token.LITERAL2);
|
74 |
javaKeywords.add("null",Token.LITERAL2);
|
75 |
javaKeywords.add("super",Token.LITERAL2);
|
76 |
javaKeywords.add("true",Token.LITERAL2);
|
77 |
javaKeywords.add("false",Token.LITERAL2);
|
78 |
} |
79 |
return javaKeywords;
|
80 |
} |
81 |
|
82 |
// private members
|
83 |
private static KeywordMap javaKeywords; |
84 |
} |