summaryrefslogtreecommitdiffstats
path: root/plugins/snippets/data/java.xml
blob: f7f11c0a93e1ca42a3e657f758cf08c07c64b4f9 (plain)
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
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8"?>
<snippets language="Java">
  <snippet id="cd">
    <text><![CDATA[private static final ${1:String} ${2:var} = "$0";]]></text>
    <description>const def</description>
    <tag>cd</tag>
  </snippet>
  <snippet id="ife">
    <text><![CDATA[if ($1) { // $2

   $0

} else { // $3



}

]]></text>
    <description>if .. else</description>
    <tag>ife</tag>
  </snippet>
  <snippet id="if">
    <text><![CDATA[if ($1) { // $2
   $0
}]]></text>
    <description>if</description>
    <tag>if</tag>
  </snippet>
  <snippet id="log">
    <text><![CDATA[/** Logger for this class and subclasses. */
protected final Log log = LogFactory.getLog(getClass());
]]></text>
    <description>logger</description>
    <tag>log</tag>
  </snippet>
  <snippet id="tcf">
    <text><![CDATA[try {
   $2
} catch (${1:Exception} e) {
   $3
} finally {
   $4
}
$0]]></text>
    <description>try .. catch .. finally</description>
    <tag>tcf</tag>
  </snippet>
  <snippet id="while">
    <text><![CDATA[while ($1) { // $2
   $0
}]]></text>
    <description>while statement</description>
    <tag>while</tag>
  </snippet>
  <snippet id="main">
    <text><![CDATA[public static void main(String[] args) {
	${1:System.exit(0)};
}]]></text>
    <description>main</description>
    <tag>main</tag>
  </snippet>
  <snippet id="sout">
    <text><![CDATA[System.out.println("${1}");
$0
]]></text>
    <description>System.out.println</description>
    <tag>sout</tag>
  </snippet>
  <snippet id="try/catch">
    <text><![CDATA[try {
	$GEDIT_SELECTED_TEXT
}
catch (Exception e) {
	${1:e.printStackTrace();}
}
$0]]></text>
    <accelerator><![CDATA[<Shift><Alt>t]]></accelerator>
    <description>Wrap Selection in Try/Catch</description>
  </snippet>
  <snippet id="tc">
    <text><![CDATA[try {
   $2
} catch (${1:Exception} e) {
   $3
}
$0]]></text>
    <tag>tc</tag>
    <description>try .. catch</description>
  </snippet>
</snippets>