From 24388213403098463b9c58a3023202e3a2b6b310 Mon Sep 17 00:00:00 2001 From: Josh Wainwright Date: Wed, 7 May 2014 22:45:53 +0100 Subject: [PATCH 1/4] Added semi-colons to end of lines where missing. --- UltiSnips/java.snippets | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UltiSnips/java.snippets b/UltiSnips/java.snippets index 21be6be..ab27a6a 100644 --- a/UltiSnips/java.snippets +++ b/UltiSnips/java.snippets @@ -141,7 +141,7 @@ if len(args) > 0: public `!p snip.rv = snip.basename or "unknown"`($1) { `!p args = getArgs(t[1]) for i in args: - snip.rv += "\n\t\tthis." + i[1] + " = " + i[1] + snip.rv += "\n\t\tthis." + i[1] + " = " + i[1] + ";" if len(args) == 0: snip.rv += "\n"` } @@ -224,7 +224,7 @@ $0 endsnippet snippet im "import" b -import ${1:java}.${2:util}.$0 +import ${1:java}.${2:util}.$0; endsnippet snippet in "interface" b @@ -269,7 +269,7 @@ if len(args) > 0: public `!p snip.rv = snip.basename or "unknown"`($1) { `!p args = getArgs(t[1]) for i in args: - snip.rv += "\n\t\tthis." + i[1] + " = " + i[1] + snip.rv += "\n\t\tthis." + i[1] + " = " + i[1] + ";" if len(args) == 0: snip.rv += "\n"` } From 33830aea0c3122a3fe9f52ecbe9a8638f1106a4c Mon Sep 17 00:00:00 2001 From: Josh Wainwright Date: Wed, 7 May 2014 22:46:43 +0100 Subject: [PATCH 2/4] Added couple of $0 anchors where missing. --- UltiSnips/java.snippets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UltiSnips/java.snippets b/UltiSnips/java.snippets index ab27a6a..36655f8 100644 --- a/UltiSnips/java.snippets +++ b/UltiSnips/java.snippets @@ -64,7 +64,7 @@ assert ${1:test}${2/(.+)/(?1: \: ")/}${2:Failure message}${2/(.+)/(?1:")/};$0 endsnippet snippet at "assert true" b -assertTrue(${1:actual}); +assertTrue(${1:actual});$0 endsnippet snippet af "assert false" b @@ -72,7 +72,7 @@ assertFalse(${1:actual});$0 endsnippet snippet ae "assert equals" b -assertEquals(${1:expected}, ${2:actual}); +assertEquals(${1:expected}, ${2:actual});$0 endsnippet snippet br "break" From 3cb138312fa235ccac0ab9a813aff57be79a95df Mon Sep 17 00:00:00 2001 From: Josh Wainwright Date: Thu, 8 May 2014 08:47:05 +0100 Subject: [PATCH 3/4] Removed implicit $0 at end of snippent --- UltiSnips/java.snippets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UltiSnips/java.snippets b/UltiSnips/java.snippets index 36655f8..045eebe 100644 --- a/UltiSnips/java.snippets +++ b/UltiSnips/java.snippets @@ -60,19 +60,19 @@ abstract $0 endsnippet snippet as "assert" b -assert ${1:test}${2/(.+)/(?1: \: ")/}${2:Failure message}${2/(.+)/(?1:")/};$0 +assert ${1:test}${2/(.+)/(?1: \: ")/}${2:Failure message}${2/(.+)/(?1:")/}; endsnippet snippet at "assert true" b -assertTrue(${1:actual});$0 +assertTrue(${1:actual}); endsnippet snippet af "assert false" b -assertFalse(${1:actual});$0 +assertFalse(${1:actual}); endsnippet snippet ae "assert equals" b -assertEquals(${1:expected}, ${2:actual});$0 +assertEquals(${1:expected}, ${2:actual}); endsnippet snippet br "break" From 0326b5ba97f69d493c426a7986752b37394a706b Mon Sep 17 00:00:00 2001 From: Josh Wainwright Date: Thu, 8 May 2014 08:48:09 +0100 Subject: [PATCH 4/4] Use more readable format for snippets including ending semi-colon. --- UltiSnips/java.snippets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UltiSnips/java.snippets b/UltiSnips/java.snippets index 045eebe..02b95e1 100644 --- a/UltiSnips/java.snippets +++ b/UltiSnips/java.snippets @@ -141,7 +141,7 @@ if len(args) > 0: public `!p snip.rv = snip.basename or "unknown"`($1) { `!p args = getArgs(t[1]) for i in args: - snip.rv += "\n\t\tthis." + i[1] + " = " + i[1] + ";" + snip.rv += "\n\t\tthis.%s = %s;" % (i[1], i[1]) if len(args) == 0: snip.rv += "\n"` } @@ -269,7 +269,7 @@ if len(args) > 0: public `!p snip.rv = snip.basename or "unknown"`($1) { `!p args = getArgs(t[1]) for i in args: - snip.rv += "\n\t\tthis." + i[1] + " = " + i[1] + ";" + snip.rv += "\n\t\tthis.%s = %s;" % (i[1], i[1]) if len(args) == 0: snip.rv += "\n"` }