Skip to content

Fixed some java issues and added declarations for collections #383

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 3 commits into from
Jun 10, 2014
Merged
Changes from all 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
47 changes: 30 additions & 17 deletions snippets/java.snippets
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Access Modifiers
snippet po
protected
protected ${0}
snippet pu
public
public ${0}
snippet pr
private
private ${0}
##
## Annotations
snippet before
Expand All @@ -25,7 +25,7 @@ snippet oo
##
## Basic Java packages and import
snippet im
import
import ${0}
snippet j.b
java.beans.
snippet j.i
Expand All @@ -39,17 +39,17 @@ snippet j.u
##
## Class
snippet cl
class ${1:`vim_snippets#Filename("", "untitled")`} ${0}
class ${1:`vim_snippets#Filename("$1", "untitled")`} ${0}
snippet in
interface ${1:`vim_snippets#Filename("", "untitled")`} ${2:extends Parent}
interface ${1:`vim_snippets#Filename("$1", "untitled")`} ${2:extends Parent}
snippet tc
public class ${1:`vim_snippets#Filename()`} extends ${0:TestCase}
public class ${1:`vim_snippets#Filename("$1")`} extends ${0:TestCase}
##
## Class Enhancements
snippet ext
extends
extends ${0}
snippet imp
implements
implements ${0}
##
## Comments
snippet /*
Expand Down Expand Up @@ -89,15 +89,28 @@ snippet m
snippet v
${1:String} ${2:var}${3: = null}${4};
##
## Declaration for ArrayList
snippet d.al
List<${1:Object}> ${2:list} = ArrayList<$1>;${0}
## Declaration for HashMap
snippet d.hm
Map<${1:Object}, ${2:Object}> ${3:map} = HashMap<$1, $2>;${0}
## Declaration for HashSet
snippet d.hs
Set<${1:Object}> ${2:set} = HashSet<$1>;${0}
## Declaration for Stack
snippet d.st
Stack<${1:Object}> ${2:stack} = Stack<$1>;${0}
##
## Enhancements to Methods, variables, classes, etc.
snippet ab
abstract
abstract ${0}
snippet fi
final
final ${0}
snippet st
static
static ${0}
snippet sy
synchronized
synchronized ${0}
##
## Error Methods
snippet err
Expand All @@ -113,9 +126,9 @@ snippet as
snippet ca
catch(${1:Exception} ${2:e}) ${0}
snippet thr
throw
throw ${0}
snippet ths
throws
throws ${0}
snippet try
try {
${0}
Expand Down Expand Up @@ -144,7 +157,7 @@ snippet @au
snippet @br
@brief ${0:Description}
snippet @fi
@file ${0:`vim_snippets#Filename()`}.java
@file ${0:`vim_snippets#Filename("$1")`}.java
snippet @pa
@param ${0:param}
snippet @re
Expand Down Expand Up @@ -206,7 +219,7 @@ snippet get
##
## Terminate Methods or Loops
snippet re
return
return ${0}
snippet br
break;
##
Expand Down