Skip to content

Add missing semicolons and anchors #365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 12, 2014
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions UltiSnips/java.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ assert ${1:test}${2/(.+)/(?1: \: ")/}${2:Failure message}${2/(.+)/(?1:")/};$0
endsnippet

snippet at "assert true" b
assertTrue(${1:actual});
assertTrue(${1:actual});$0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$0 at the end of snippets is implicit. No need to add them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sorry hadn't twigged that the end anchor was always implicit. Thanks
I'll remove them from a couple of other lines just to keep consistency.

endsnippet

snippet af "assert false" b
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"
Expand Down Expand Up @@ -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] + ";"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"\n\t\tthis.%s = %s;" % (i[1], i[1]) is more readable I think.

if len(args) == 0:
snip.rv += "\n"`
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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] + ";"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same change to the string here?

if len(args) == 0:
snip.rv += "\n"`
}
Expand Down