Improve java snippet

This commit is contained in:
Shougo Matsushita 2013-12-21 15:08:08 +09:00
parent 909c2c9fdb
commit f657404c22

View File

@ -1,21 +1,3 @@
snippet pu
public
snippet po
protected
snippet pr
private
snippet st
static
snippet fi
final
snippet ab
abstract
snippet class
class ${1} ${2:extends} ${3:#:Parent} ${4:implements} ${5:#:Interface} {
${0:TARGET}
@ -34,16 +16,13 @@ snippet method
snippet var
${1:#:type} ${2:#:var}${3};
snippet co
snippet const
static public final ${1:#:type} ${2:#:var} = ${3};${4}
snippet cos
snippet const_string
static public final String ${1:var} = "${2}";${4}
snippet re
return
snippet as
snippet assert
assert ${1:#:test} ${2:#:Failure message};${3}
snippet if
@ -52,6 +31,7 @@ snippet if
}
snippet elif
alias elseif
else if (${1}) {
${2:TARGET}
}
@ -78,7 +58,6 @@ snippet switch
}
snippet case
abbr ce
case ${1}:
${2:TARGET}
${0}
@ -86,13 +65,35 @@ abbr ce
snippet br
break;
snippet de
snippet default
alias de
default:
${0}
snippet try
try {
${0:TARGET}
} catch (${1:#:Exception} ${2:e}) {
${3:e.printStackTrace();}
}
snippet try_finally
try {
${0:TARGET}
} catch (${1:Exception} ${2:e}) {
${3:e.printStackTrace();}
} finally {
${4}
}
snippet catch
catch (${1:#:Exception} ${2:e}) {
${0}
catch (${1:Exception} ${2:e}) {
${0:e.printStackTrace();}
}
snippet finally
finally {
${0:TARGET}
}
snippet th
@ -101,13 +102,8 @@ snippet th
snippet sy
synchronized
snippet im
import
snippet pa
package
snippet tc
snippet testclass
alias tc
public class ${1} extends ${2:TestCase} {
${0:TARGET}
}
@ -158,30 +154,24 @@ snippet author
@author ${0:$TM_FULLNAME}
snippet {code
abbr {
{@code ${0}
snippet deprecated
@deprecated ${0:#:description}
snippet {docRoot
abbr {
{@docRoot
snippet {inheritDoc
abbr {
{@inheritDoc
snippet {link
abbr {
{@link ${1:#:target} ${0:#:label}
snippet {linkplain
abbr {
{@linkplain ${1:#:target} ${0:#:label}
snippet {literal
abbr {
{@literal ${0}
snippet param
@ -209,7 +199,6 @@ snippet throws
@throws ${1:#:class} ${0:#:description}
snippet {value
abbr {
{@value ${0}
snippet version