forked from ajaxorg/ace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwollok.snippets.js
85 lines (74 loc) · 1.08 KB
/
wollok.snippets.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = `##
## Basic Java packages and import
snippet im
import
snippet w.l
wollok.lang
snippet w.i
wollok.lib
## Class and object
snippet cl
class \${1:\`Filename("", "untitled")\`} \${2}
snippet obj
object \${1:\`Filename("", "untitled")\`} \${2:inherits Parent}\${3}
snippet te
test \${1:\`Filename("", "untitled")\`}
##
## Enhancements
snippet inh
inherits
##
## Comments
snippet /*
/*
* \${1}
*/
##
## Control Statements
snippet el
else
snippet if
if (\${1}) \${2}
##
## Create a Method
snippet m
method \${1:method}(\${2}) \${5}
##
## Tests
snippet as
assert.equals(\${1:expected}, \${2:actual})
##
## Exceptions
snippet ca
catch \${1:e} : (\${2:Exception} ) \${3}
snippet thr
throw
snippet try
try {
\${3}
} catch \${1:e} : \${2:Exception} {
}
##
## Javadocs
snippet /**
/**
* \${1}
*/
##
## Print Methods
snippet print
console.println("\${1:Message}")
##
## Setter and Getter Methods
snippet set
method set\${1:}(\${2:}) {
\$1 = \$2
}
snippet get
method get\${1:}() {
return \${1:};
}
##
## Terminate Methods or Loops
snippet re
return`;