UltiSnips/UltiSnips/tm_java.snippets

195 lines
2.4 KiB
Plaintext

snippet ab "abstract"
abstract
endsnippet
snippet as "assert"
assert ${1:test}${2/(.+)/(?1: \: ")/}${2:Failure message}${2/(.+)/(?1:")/};$0
endsnippet
snippet br "break"
break;
endsnippet
snippet cs "case"
case $1:
$2
$0
endsnippet
snippet ca "catch"
catch (${1:Exception} ${2:e}) {
$0
}
endsnippet
snippet cl "class"
class ${1:${TM_FILENAME/(.*?)(\..+)/$1/}} ${2:extends ${3:Parent} }${4:implements ${5:Interface} }{
$0
}
endsnippet
snippet cos "constant string"
static public final String ${1:var} = "$2";$0
endsnippet
snippet co "constant"
static public final ${1:String} ${2:var} = $3;$0
endsnippet
snippet de "default"
default:
$0
endsnippet
snippet elif "else if"
else if ($1) {
$0
}
endsnippet
snippet el "else"
else {
$0
}
endsnippet
snippet fi "final"
final
endsnippet
snippet fore "for (each)"
for ($1 : $2) {
$0
}
endsnippet
snippet for "for"
for ($1; $2; $3) {
$0
}
endsnippet
snippet if "if"
if ($1) {
$0
}
endsnippet
snippet imt "import junit_framework_TestCase;"
import junit.framework.TestCase;
$0
endsnippet
snippet im "import"
import
endsnippet
snippet in "interface"
interface ${1:${TM_FILENAME/(.*?)(\..+)/$1/}} ${2:extends ${3:Parent} }{
$0
}
endsnippet
snippet j.b "java_beans_"
java.beans.
endsnippet
snippet j.i "java_io"
java.io.
endsnippet
snippet j.m "java_math"
java.math.
endsnippet
snippet j.n "java_net_"
java.net.
endsnippet
snippet j.u "java_util_"
java.util.
endsnippet
snippet main "method (main)"
public static void main(String[] args) {
$0
}
endsnippet
snippet m "method"
${1:void} ${2:method}($3) ${4:throws $5 }{
$0
}
endsnippet
snippet pa "package"
package
endsnippet
snippet p "print"
System.out.print($1);$0
endsnippet
snippet pl "println"
System.out.println($1);$0
endsnippet
snippet pr "private"
private
endsnippet
snippet po "protected"
protected
endsnippet
snippet pu "public"
public
endsnippet
snippet re "return"
return
endsnippet
snippet st "static"
static
endsnippet
snippet sw "switch"
switch ($1) {
$0
}
endsnippet
snippet sy "synchronized"
synchronized
endsnippet
snippet tc "test case"
public class ${1:${TM_FILENAME/(.*?)(\..+)/$1/}} extends ${2:TestCase} {
$0
}
endsnippet
snippet t "test"
public void test${1:Name}() throws Exception {
$0
}
endsnippet
snippet th "throw"
throw $0
endsnippet
snippet v "variable"
${1:String} ${2:var}${3: = ${0:null}};
endsnippet
snippet wh "while"
while ($1) {
$0
}
endsnippet