summaryrefslogtreecommitdiffstats
path: root/plugins/snippets/data/java.xml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
commitadb934701975f6b0214475d1a8d0d1ce727b9d4d (patch)
tree5688c745d10b64c8856586864ec416a6bdae881d /plugins/snippets/data/java.xml
parentInitial commit. (diff)
downloadgedit-adb934701975f6b0214475d1a8d0d1ce727b9d4d.tar.xz
gedit-adb934701975f6b0214475d1a8d0d1ce727b9d4d.zip
Adding upstream version 3.38.1.upstream/3.38.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/snippets/data/java.xml')
-rw-r--r--plugins/snippets/data/java.xml91
1 files changed, 91 insertions, 0 deletions
diff --git a/plugins/snippets/data/java.xml b/plugins/snippets/data/java.xml
new file mode 100644
index 0000000..f7f11c0
--- /dev/null
+++ b/plugins/snippets/data/java.xml
@@ -0,0 +1,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>