language-java.cson 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. '.source.java, .source.groovy':
  2. 'abstract':
  3. 'prefix': 'ab'
  4. 'body': 'abstract '
  5. 'case':
  6. 'prefix': 'cs'
  7. 'body': 'case $1:\n\t$2\n$0'
  8. 'catch':
  9. 'prefix': 'ca'
  10. 'body': 'catch (${1:Exception} ${2:e}) {\n\t$0\n}'
  11. 'class':
  12. 'prefix': 'cl'
  13. 'body': 'class ${1:MyClass} ${2:extends ${3:Parent} }${4:implements ${5:Interface} }{\n\t$6\n}'
  14. 'else if':
  15. 'prefix': 'elif'
  16. 'body': 'else if ($1) {\n\t$0\n}'
  17. 'do while':
  18. 'prefix': 'dow'
  19. 'body': 'do {\n\t$1\n} while ($2);$0'
  20. 'else':
  21. 'prefix': 'el'
  22. 'body': 'else {\n\t$0\n}'
  23. 'final':
  24. 'prefix': 'fi'
  25. 'body': 'final '
  26. 'finally':
  27. 'prefix': 'fy'
  28. 'body': 'finally {\n\t$0\n}'
  29. 'for':
  30. 'prefix': 'for'
  31. 'body': 'for ($1; $2; $3) {\n\t$0\n}'
  32. 'if':
  33. 'prefix': 'if'
  34. 'body': 'if ($1) {\n\t$0\n}'
  35. 'import':
  36. 'prefix': 'im'
  37. 'body': 'import '
  38. 'interface':
  39. 'prefix': 'in'
  40. 'body': 'interface ${1:MyInterface} ${2:extends ${3:Parent} }{\n\t$0\n}'
  41. 'private':
  42. 'prefix': 'pr'
  43. 'body': 'private '
  44. 'protected':
  45. 'prefix': 'po'
  46. 'body': 'protected '
  47. 'public':
  48. 'prefix': 'pu'
  49. 'body': 'public '
  50. 'return':
  51. 'prefix': 're'
  52. 'body': 'return '
  53. 'serialVersionUID':
  54. 'prefix': 'se'
  55. 'body': 'private static final long serialVersionUID = ${1:42}l;$0'
  56. 'static':
  57. 'prefix': 'st'
  58. 'body': 'static '
  59. 'switch':
  60. 'prefix': 'sw'
  61. 'body': 'switch ($1) {\n\t$0\n}'
  62. 'synchronized':
  63. 'prefix': 'sy'
  64. 'body': 'synchronized '
  65. 'throw new':
  66. 'prefix': 'tn'
  67. 'body': 'throw new $0'
  68. 'throw':
  69. 'prefix': 'th'
  70. 'body': 'throw $0'
  71. 'try':
  72. 'prefix': 'tr'
  73. 'body': 'try {\n\t$0\n}'
  74. 'try-catch':
  75. 'prefix':'trc'
  76. 'body': 'try {\n\t$1\n} catch(${2:Exception} ${3:e}) {\n\t$4\n}'
  77. 'variable':
  78. 'prefix': 'v'
  79. 'body': '${1:String} ${2:var}${3: = ${0:null}};'
  80. '.source.java':
  81. 'break':
  82. 'prefix': 'br'
  83. 'body': 'break;\n'
  84. 'constant string':
  85. 'prefix': 'cos'
  86. 'body': 'public static final String ${1:var} = "$2";$0'
  87. 'constant':
  88. 'prefix': 'co'
  89. 'body': 'public static final ${1:String} ${2:var} = $3;$0'
  90. 'default':
  91. 'prefix': 'de'
  92. 'body': 'default:\n\t$0'
  93. 'for (each)':
  94. 'prefix': 'fore'
  95. 'body': 'for ($1 : $2) {\n\t$0\n}'
  96. 'import junit.framework.TestCase;':
  97. 'prefix': 'imt'
  98. 'body': 'import junit.framework.TestCase;\n$0'
  99. 'java.beans.':
  100. 'prefix': 'j.b'
  101. 'body': 'java.beans.'
  102. 'java.io.':
  103. 'prefix': 'j.i'
  104. 'body': 'java.io.'
  105. 'java.math.':
  106. 'prefix': 'j.m'
  107. 'body': 'java.math.'
  108. 'java.net.':
  109. 'prefix': 'j.n'
  110. 'body': 'java.net.'
  111. 'java.util.':
  112. 'prefix': 'j.u'
  113. 'body': 'java.util.'
  114. 'method (main)':
  115. 'prefix': 'main'
  116. 'body': 'public static void main(String[] args) {\n\t$0\n}'
  117. 'method':
  118. 'prefix': 'm'
  119. 'body': '${1:void} ${2:method}($3) ${4:throws $5 }{\n\t$0\n}\n'
  120. 'print':
  121. 'prefix': 'p'
  122. 'body': 'System.out.print($1);$0'
  123. 'println':
  124. 'prefix': 'pl'
  125. 'body': 'System.out.println($1);$0'
  126. 'test case':
  127. 'prefix': 'tc'
  128. 'body': 'public class ${1:MyTest} extends ${2:TestCase} {\n\t$0\n}'
  129. 'test':
  130. 'prefix': 't'
  131. 'body': 'public void test${1:Name}() throws Exception {\n\t$0\n}'
  132. 'while':
  133. 'prefix': 'wh'
  134. 'body': 'while ($1) {\n\t$0\n}'