Skip to content

Commit 5a4a1aa

Browse files
doggy8088rgrunber
authored andcommitted
fine-tune new, ctor, try_catch and try_resources snippets
Signed-off-by: Will <[email protected]>
1 parent 184111d commit 5a4a1aa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

snippets/java.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"prefix": "ctor",
1313
"body": [
1414
"public ${1:${TM_FILENAME_BASE}}($2) {",
15-
"\t${0:super();}",
15+
"\t${3:super();}$0",
1616
"}"
1717
],
1818
"description": "Public constructor"
@@ -23,7 +23,7 @@
2323
"try {",
2424
"\t$1",
2525
"} catch (${2:Exception} ${3:e}) {",
26-
"\t$4//${0:TODO}: handle exception",
26+
"\t$0// TODO: handle exception",
2727
"}"
2828
],
2929
"description": "try/catch block"
@@ -34,7 +34,7 @@
3434
"try ($1) {",
3535
"\t$2",
3636
"} catch (${3:Exception} ${4:e}) {",
37-
"\t$5//${0:TODO}: handle exception",
37+
"\t$0// TODO: handle exception",
3838
"}"
3939
]
4040
},
@@ -100,7 +100,8 @@
100100
"newObject": {
101101
"prefix": "new",
102102
"body": [
103-
"${0:Object} ${1:foo} = new ${0:Object}();"
103+
"${1:Object} ${2:foo} = new ${1}($3);",
104+
"$0"
104105
],
105106
"description": "Create new Object"
106107
},

0 commit comments

Comments
 (0)