Whitespace Fixes
I didn't realize this, but snipmate takes into account any and all whitespaces in the snippets. I fixed these by inserting ## in order to keep it straight and clean. Also did some minor bug fixes.
This commit is contained in:
parent
9982aab77d
commit
0bfbc3a50a
@ -5,7 +5,7 @@ snippet pu
|
|||||||
public
|
public
|
||||||
snippet pr
|
snippet pr
|
||||||
private
|
private
|
||||||
|
##
|
||||||
## Annotations
|
## Annotations
|
||||||
snippet before
|
snippet before
|
||||||
@Before
|
@Before
|
||||||
@ -22,8 +22,8 @@ snippet om
|
|||||||
snippet oo
|
snippet oo
|
||||||
@OneToOne
|
@OneToOne
|
||||||
${1}
|
${1}
|
||||||
|
##
|
||||||
# Basic Java packages and import
|
## Basic Java packages and import
|
||||||
snippet im
|
snippet im
|
||||||
import
|
import
|
||||||
snippet j.b
|
snippet j.b
|
||||||
@ -36,7 +36,7 @@ snippet j.n
|
|||||||
java.net.
|
java.net.
|
||||||
snippet j.u
|
snippet j.u
|
||||||
java.util.
|
java.util.
|
||||||
|
##
|
||||||
## Class
|
## Class
|
||||||
snippet cl
|
snippet cl
|
||||||
class ${1:`Filename("", "untitled")`} ${2}
|
class ${1:`Filename("", "untitled")`} ${2}
|
||||||
@ -44,25 +44,25 @@ snippet in
|
|||||||
interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3}
|
interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3}
|
||||||
snippet tc
|
snippet tc
|
||||||
public class ${1:`Filename()`} extends ${2:TestCase}
|
public class ${1:`Filename()`} extends ${2:TestCase}
|
||||||
|
##
|
||||||
## Class Enhancements
|
## Class Enhancements
|
||||||
snippet ext
|
snippet ext
|
||||||
extends
|
extends
|
||||||
snippet imp
|
snippet imp
|
||||||
implements
|
implements
|
||||||
|
##
|
||||||
## Comments
|
## Comments
|
||||||
snippet /*
|
snippet /*
|
||||||
/*
|
/*
|
||||||
* ${1}
|
* ${1}
|
||||||
*/
|
*/
|
||||||
|
##
|
||||||
## Constants
|
## Constants
|
||||||
snippet co
|
snippet co
|
||||||
static public final ${1:String} ${2:var} = ${3};${4}
|
static public final ${1:String} ${2:var} = ${3};${4}
|
||||||
snippet cos
|
snippet cos
|
||||||
static public final String ${1:var} = "${2}";${3}
|
static public final String ${1:var} = "${2}";${3}
|
||||||
|
##
|
||||||
## Control Statements
|
## Control Statements
|
||||||
snippet case
|
snippet case
|
||||||
case ${1}:
|
case ${1}:
|
||||||
@ -80,15 +80,15 @@ snippet sw
|
|||||||
switch (${1}) {
|
switch (${1}) {
|
||||||
${2}
|
${2}
|
||||||
}
|
}
|
||||||
|
##
|
||||||
## Create a Method
|
## Create a Method
|
||||||
snippet m
|
snippet m
|
||||||
${1:void} ${2:method}(${3}) ${4:throws }${5}
|
${1:void} ${2:method}(${3}) ${4:throws }${5}
|
||||||
|
##
|
||||||
## Create a Variable
|
## Create a Variable
|
||||||
snippet v
|
snippet v
|
||||||
${1:String} ${2:var}${3: = null}${4};${5}
|
${1:String} ${2:var}${3: = null}${4};${5}
|
||||||
|
##
|
||||||
## Enhancements to Methods, variables, classes, etc.
|
## Enhancements to Methods, variables, classes, etc.
|
||||||
snippet ab
|
snippet ab
|
||||||
abstract
|
abstract
|
||||||
@ -98,7 +98,7 @@ snippet st
|
|||||||
static
|
static
|
||||||
snippet sy
|
snippet sy
|
||||||
synchronized
|
synchronized
|
||||||
|
##
|
||||||
## Error Methods
|
## Error Methods
|
||||||
snippet err
|
snippet err
|
||||||
System.err.print("${1:Message}");
|
System.err.print("${1:Message}");
|
||||||
@ -106,7 +106,7 @@ snippet errf
|
|||||||
System.err.printf("${1:Message}", ${2:exception});
|
System.err.printf("${1:Message}", ${2:exception});
|
||||||
snippet errln
|
snippet errln
|
||||||
System.err.println("${1:Message}");
|
System.err.println("${1:Message}");
|
||||||
|
##
|
||||||
## Exception Handling
|
## Exception Handling
|
||||||
snippet as
|
snippet as
|
||||||
assert ${1:test} : "${2:Failure message}";${3}
|
assert ${1:test} : "${2:Failure message}";${3}
|
||||||
@ -127,13 +127,13 @@ snippet tryf
|
|||||||
} catch(${1:Exception} ${2:e}) {
|
} catch(${1:Exception} ${2:e}) {
|
||||||
} finally {
|
} finally {
|
||||||
}
|
}
|
||||||
|
##
|
||||||
## Find Methods
|
## Find Methods
|
||||||
snippet findall
|
snippet findall
|
||||||
List<${1:listName}> ${2:items} = ${1}.findAll();${3}
|
List<${1:listName}> ${2:items} = ${1}.findAll();${3}
|
||||||
snippet findbyid
|
snippet findbyid
|
||||||
${1:var} ${2:item} = ${1}.findById(${3});${4}
|
${1:var} ${2:item} = ${1}.findById(${3});${4}
|
||||||
|
##
|
||||||
## Javadocs
|
## Javadocs
|
||||||
snippet /**
|
snippet /**
|
||||||
/**
|
/**
|
||||||
@ -149,7 +149,7 @@ snippet @pa
|
|||||||
@param ${1:param}
|
@param ${1:param}
|
||||||
snippet @re
|
snippet @re
|
||||||
@return ${1:param}
|
@return ${1:param}
|
||||||
|
##
|
||||||
## Logger Methods
|
## Logger Methods
|
||||||
snippet debug
|
snippet debug
|
||||||
Logger.debug(${1:param});${2}
|
Logger.debug(${1:param});${2}
|
||||||
@ -159,7 +159,7 @@ snippet info
|
|||||||
Logger.info(${1:param});${2}
|
Logger.info(${1:param});${2}
|
||||||
snippet warn
|
snippet warn
|
||||||
Logger.warn(${1:param});${2}
|
Logger.warn(${1:param});${2}
|
||||||
|
##
|
||||||
## Loops
|
## Loops
|
||||||
snippet enfor
|
snippet enfor
|
||||||
for (${1} : ${2}) ${3}
|
for (${1} : ${2}) ${3}
|
||||||
@ -167,13 +167,13 @@ snippet for
|
|||||||
for (${1}; ${2}; ${3}) ${4}
|
for (${1}; ${2}; ${3}) ${4}
|
||||||
snippet wh
|
snippet wh
|
||||||
while (${1}) ${2}
|
while (${1}) ${2}
|
||||||
|
##
|
||||||
## Main method
|
## Main method
|
||||||
snippet main
|
snippet main
|
||||||
public static void main (String[] args) {
|
public static void main (String[] args) {
|
||||||
${1:/* code */}
|
${1:/* code */}
|
||||||
}
|
}
|
||||||
|
##
|
||||||
## Print Methods
|
## Print Methods
|
||||||
snippet print
|
snippet print
|
||||||
System.out.print("${1:Message");
|
System.out.print("${1:Message");
|
||||||
@ -181,7 +181,7 @@ snippet printf
|
|||||||
System.out.printf("${1:Message", ${2:args});
|
System.out.printf("${1:Message", ${2:args});
|
||||||
snippet println
|
snippet println
|
||||||
System.out.println(${1});
|
System.out.println(${1});
|
||||||
|
##
|
||||||
## Render Methods
|
## Render Methods
|
||||||
snippet ren
|
snippet ren
|
||||||
render(${1:param});${2}
|
render(${1:param});${2}
|
||||||
@ -193,7 +193,7 @@ snippet renj
|
|||||||
renderJSON(${1:param});${2}
|
renderJSON(${1:param});${2}
|
||||||
snippet renx
|
snippet renx
|
||||||
renderXml(${1:param});${2}
|
renderXml(${1:param});${2}
|
||||||
|
##
|
||||||
## Setter and Getter Methods
|
## Setter and Getter Methods
|
||||||
snippet set
|
snippet set
|
||||||
$1 void set$3($2 $4){
|
$1 void set$3($2 $4){
|
||||||
@ -203,13 +203,13 @@ snippet get
|
|||||||
${1:public} ${2:String} get${3:}(){
|
${1:public} ${2:String} get${3:}(){
|
||||||
return this.${4:};
|
return this.${4:};
|
||||||
}
|
}
|
||||||
|
##
|
||||||
## Terminate Methods or Loops
|
## Terminate Methods or Loops
|
||||||
snippet re
|
snippet re
|
||||||
return
|
return
|
||||||
snippet br
|
snippet br
|
||||||
break;
|
break;
|
||||||
|
##
|
||||||
## Test Methods
|
## Test Methods
|
||||||
snippet t
|
snippet t
|
||||||
public void test${1:Name}() throws Exception {
|
public void test${1:Name}() throws Exception {
|
||||||
@ -220,11 +220,11 @@ snippet test
|
|||||||
public void test${1:Name}() throws Exception {
|
public void test${1:Name}() throws Exception {
|
||||||
${2}
|
${2}
|
||||||
}
|
}
|
||||||
|
##
|
||||||
## Utils
|
## Utils
|
||||||
snippet Sc
|
snippet Sc
|
||||||
Scanner
|
Scanner
|
||||||
|
##
|
||||||
## Miscellaneous
|
## Miscellaneous
|
||||||
snippet action
|
snippet action
|
||||||
public static void ${1:index}(${2:args}) { ${3} }
|
public static void ${1:index}(${2:args}) { ${3} }
|
||||||
@ -234,8 +234,6 @@ snippet rnfin
|
|||||||
notFoundIfNull(${1:param});${2}
|
notFoundIfNull(${1:param});${2}
|
||||||
snippet rr
|
snippet rr
|
||||||
redirect(${1:param});${2}
|
redirect(${1:param});${2}
|
||||||
snippet rst
|
|
||||||
ResultSet ${1:rst}${2: = null}${3};${4}
|
|
||||||
snippet ru
|
snippet ru
|
||||||
unauthorized(${1:param});${2}
|
unauthorized(${1:param});${2}
|
||||||
snippet unless
|
snippet unless
|
||||||
|
Loading…
Reference in New Issue
Block a user