1
+ package simplejavatexteditor ;
2
+
3
+ import java .util .ArrayList ;
4
+
5
+ public class SupportedKeywords {
6
+ private String [] java = {"abstract" , "assert" , "boolean" ,
7
+ "break" , "byte" , "case" , "catch" , "char" , "class" , "const" ,
8
+ "continue" , "default" , "do" , "double" , "else" , "extends" , "false" ,
9
+ "final" , "finally" , "float" , "for" , "goto" , "if" , "implements" ,
10
+ "import" , "instanceof" , "int" , "System" , "out" , "print()" , "println()" ,
11
+ "new" , "null" , "package" , "private" , "protected" , "public" , "interface" ,
12
+ "long" , "native" , "return" , "short" , "static" , "strictfp" , "super" , "switch" ,
13
+ "synchronized" , "this" , "throw" , "throws" , "transient" , "true" ,
14
+ "try" , "void" , "volatile" , "while" , "String" };
15
+
16
+ private String [] cpp = { "auto" , "const" , "double" , "float" , "int" , "short" ,
17
+ "struct" , "unsigned" , "break" , "continue" , "else" , "for" , "long" , "signed" ,
18
+ "switch" , "void" , "case" , "default" , "enum" , "goto" , "register" , "sizeof" ,
19
+ "typedef" , "volatile" , "char" , "do" , "extern" , "if" , "return" , "static" ,
20
+ "union" , "while" , "asm" , "dynamic_cast" , "namespace" , "reinterpret_cast" , "try" ,
21
+ "bool" , "explicit" , "new" , "static_cast" , "typeid" , "catch" , "false" , "operator" ,
22
+ "template" , "typename" , "class" , "friend" , "private" , "this" , "using" , "const_cast" , "inline" ,
23
+ "public" , "throw" , "virtual" , "delete" , "mutable" , "protected" , "true" , "wchar_t" , };
24
+
25
+ private String [] brackets = { "{" , "(" };
26
+ private String [] bCompletions = { "}" , ")" };
27
+ public String [] getJavaKeywords () {
28
+ return java ;
29
+ }
30
+ public String [] getCppKeywords () {
31
+ return cpp ;
32
+ }
33
+ public ArrayList <String > getbracketCompletions () {
34
+ ArrayList <String > alist = new ArrayList <>();
35
+ for (String completion : bCompletions ) {
36
+ alist .add (completion );
37
+ }
38
+ return alist ;
39
+ }
40
+ public ArrayList <String > getbrackets () {
41
+ ArrayList <String > alist = new ArrayList <>();
42
+ for (String completion : brackets ) {
43
+ alist .add (completion );
44
+ }
45
+ return alist ;
46
+ }
47
+ public ArrayList <String > setKeywords (String [] arr ) {
48
+ ArrayList <String > al = new ArrayList <>();
49
+ for (String words : arr ) {
50
+ al .add (words );
51
+ }
52
+ return al ;
53
+ }
54
+ }
0 commit comments