|
3 | 3 | "prefix": "main", |
4 | 4 | "body": [ |
5 | 5 | "public static void main(String[] args) {", |
6 | | - "\t$1", |
| 6 | + "\t$0", |
7 | 7 | "}" |
8 | 8 | ], |
9 | 9 | "description": "Public static main method" |
10 | 10 | }, |
11 | 11 | "sysout": { |
12 | 12 | "prefix": "sysout", |
13 | 13 | "body": [ |
14 | | - "System.out.println($1);" |
| 14 | + "System.out.println($0);" |
15 | 15 | ], |
16 | 16 | "description": "Print to standard out" |
17 | 17 | }, |
18 | 18 | "syserr": { |
19 | 19 | "prefix": "syserr", |
20 | 20 | "body": [ |
21 | | - "System.err.println($1);" |
| 21 | + "System.err.println($0);" |
22 | 22 | ], |
23 | 23 | "description": "Print to standard err" |
24 | 24 | }, |
25 | 25 | "fori": { |
26 | 26 | "prefix": "fori", |
27 | 27 | "body": [ |
28 | 28 | "for (${1:int} ${2:i} = ${3:0}; $2 < ${4:max}; $2++) {", |
29 | | - "\t$5", |
| 29 | + "\t$0", |
30 | 30 | "}" |
31 | 31 | ], |
32 | 32 | "description": "Indexed for loop" |
|
35 | 35 | "prefix": "foreach", |
36 | 36 | "body": [ |
37 | 37 | "for (${1:type} ${2:var} : ${3:iterable}) {", |
38 | | - "\t$4", |
| 38 | + "\t$0", |
39 | 39 | "}" |
40 | 40 | ], |
41 | 41 | "description": "Enhanced for loop" |
|
64 | 64 | "if (${1:condition}) {", |
65 | 65 | "\t$2", |
66 | 66 | "} else {", |
67 | | - "\t$3", |
| 67 | + "\t$0", |
68 | 68 | "}" |
69 | 69 | ], |
70 | 70 | "description": "if/else statement" |
|
73 | 73 | "prefix": "ifnull", |
74 | 74 | "body": [ |
75 | 75 | "if (${1:condition} == null) {", |
76 | | - "\t$2", |
| 76 | + "\t$0", |
77 | 77 | "}" |
78 | 78 | ], |
79 | 79 | "description": "if statement checking for null" |
|
82 | 82 | "prefix": "ifnotnull", |
83 | 83 | "body": [ |
84 | 84 | "if (${1:condition} != null) {", |
85 | | - "\t$2", |
| 85 | + "\t$0", |
86 | 86 | "}" |
87 | 87 | ], |
88 | 88 | "description": "if statement checking for not null" |
|
93 | 93 | "try {", |
94 | 94 | "\t$1", |
95 | 95 | "} catch (${2:Exception} ${3:e}) {", |
96 | | - "\t$4//${5:TODO}: handle exception", |
| 96 | + "\t$4//${0:TODO}: handle exception", |
97 | 97 | "}" |
98 | 98 | ], |
99 | 99 | "description": "try/catch block" |
|
102 | 102 | "prefix": "private_method", |
103 | 103 | "body": [ |
104 | 104 | "private ${1:void} ${2:name}($3) {", |
105 | | - "\t$4", |
| 105 | + "\t$0", |
106 | 106 | "}" |
107 | 107 | ], |
108 | 108 | "description": "private method" |
|
111 | 111 | "prefix": "public_method", |
112 | 112 | "body": [ |
113 | 113 | "public ${1:void} ${2:name}(${3}) {", |
114 | | - "\t$4", |
| 114 | + "\t$0", |
115 | 115 | "}" |
116 | 116 | ], |
117 | 117 | "description": "public method" |
|
120 | 120 | "prefix": "private_static_method", |
121 | 121 | "body": [ |
122 | 122 | "private static ${1:Type} ${2:name}(${3}) {", |
123 | | - "\t$4", |
| 123 | + "\t$0", |
124 | 124 | "}" |
125 | 125 | ], |
126 | 126 | "description": "private static method" |
|
129 | 129 | "prefix": "public_static_method", |
130 | 130 | "body": [ |
131 | 131 | "public static ${1:void} ${2:name}(${3}) {", |
132 | | - "\t$4", |
| 132 | + "\t$0", |
133 | 133 | "}" |
134 | 134 | ], |
135 | 135 | "description": "public static method" |
|
138 | 138 | "prefix": "protected_method", |
139 | 139 | "body": [ |
140 | 140 | "protected ${1:void} ${2:name}(${3}) {", |
141 | | - "\t$4", |
| 141 | + "\t$0", |
142 | 142 | "}" |
143 | 143 | ], |
144 | 144 | "description": "Protected method" |
|
178 | 178 | "newObject": { |
179 | 179 | "prefix": "new", |
180 | 180 | "body": [ |
181 | | - "${1:Object} ${2:foo} = new ${1:Object}();" |
| 181 | + "${0:Object} ${1:foo} = new ${0:Object}();" |
182 | 182 | ], |
183 | 183 | "description": "Create new Object" |
184 | 184 | } |
|
0 commit comments