First commit.

This commit is contained in:
kj
2022-03-29 19:21:13 -04:00
commit da8f068975
293 changed files with 3002 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: param
# key: @param
# uuid: @param
# condition: (sp-point-in-comment)
# --
@param ${1:paramater} $0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: return
# key: @return
# uuid: @return
# condition: (sp-point-in-comment)
# --
@return ${1:description}

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: apr_assert
# key: apr_assert
# uuid: apr_assert
# --
if (Globals.useAssertions) {
${1:assert ..};
}

8
snippets/java-mode/class Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: class
# key: class
# uuid: class
# --
${1:public }class ${2:`(f-base buffer-file-name)`} {
$0
}

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: constructor
# key: __init__
# uuid: __init__
# --
public ${1:`(f-base buffer-file-name)`}($2) {
$0
}

9
snippets/java-mode/doc Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: doc
# key: /*
# uuid: /*
# condition: (not (use-region-p))
# --
/**
* $0
*/

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: equals
# key: eq
# uuid: eq
# --
public boolean equals(${1:Class} other) {
$0
}

View File

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: file_class
# key: file
# uuid: file
# --
public class ${1:`(file-name-base
(or (buffer-file-name)
(buffer-name)))`} {
$0
}

8
snippets/java-mode/for Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: for
# key: for
# uuid: for
# --
for (${1:int i = 0}; ${2:i < N}; ${3:i++}) {
`%`$0
}

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: foreach
# key: fore
# uuid: fore
# --
for (${1:Object} ${2:var} : ${3:iterator}) {
$0
}

9
snippets/java-mode/if Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: if
# key: if
# uuid: if
# condition: (not (sp-point-in-string-or-comment))
# --
if (${1:true}) {
$0
}

10
snippets/java-mode/ife Normal file
View File

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: ife
# key: ife
# uuid: ife
# --
if (${1:true}) {
`%`$2
} else {
$0
}

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: import
# --
import ${1:System.};
$0

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: interface
# key: interface
# uuid: interface
# --
interface ${1:`(f-base buffer-file-name)`} {
$0
}

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: iterator
# key: iterator
# uuid: iterator
# --
public Iterator<${1:type}> iterator() {
$0
}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: javadoc
# key: doc
# uuid: doc
# --
/**
* $0
*
*/

8
snippets/java-mode/main Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: main
# key: main
# uuid: main
# --
public static void main(String[] args) {
$0
}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: method
# key: method
# uuid: method
# condition: (not (sp-point-in-string-or-comment))
# --
${1:void} ${2:name}($3) {
$0
}

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: @Override method
# key: method@
# uuid: method@
# condition: (not (sp-point-in-string-or-comment))
# --
@Override ${1:public} ${2:void} ${3:methodName}($4) {
$0
}

6
snippets/java-mode/new Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: new
# key: new
# uuid: new
# --
${1:Type} ${2:obj} = new ${3:$1}($4);$0

View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: paintComponent (Swing)
# key: paintComponent
# uuid: paintComponent
# condition: (not (sp-point-in-string-or-comment))
# --
@Override public void paintComponent(Graphics g) {
`%`$0
}

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: printf
# key: printf
# uuid: printf
# --
System.out.printf("`%`$0%n");

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: println
# key: println
# uuid: println
# --
System.out.println("`%`$0");

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: private
# key: pri
# uuid: pri
# --
private $0

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: protected
# key: pr
# uuid: pr
# --
protected $0

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: public
# key: p
# uuid: p
# --
public $0

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: return
# key: ret
# uuid: ret
# condition: (not (sp-point-in-string-or-comment))
# --
return `%`$0;

9
snippets/java-mode/test Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: test
# key: test
# uuid: test
# --
@Test
public void test_${1:Case}() {
$0
}

View File

@ -0,0 +1,13 @@
# -*- mode: snippet -*-
# name: testClass
# key: tc
# uuid: tc
# --
import junit.framework.*;
import junit.textui.*;
public class Test${1:Class} extends TestCase {
protected void setUp() {
$0
}
}

6
snippets/java-mode/this Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: this
# key: .
# uuid: .
# --
this.$0

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: toString
# key: toStr
# uuid: toStr
# --
public String toString() {
$0
}

12
snippets/java-mode/try Normal file
View File

@ -0,0 +1,12 @@
# -*- mode: snippet -*-
# name: try
# key: try
# uuid: try
# condition: (not (sp-point-in-string-or-comment))
# --
try {
`%`$0
} catch (${1:Throwable} e) {
${2:System.out.println("Error " + e.getMessage());
e.printStackTrace();}
}

7
snippets/java-mode/var Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: variable declaration
# key: var
# uuid: var
# condition: (not (sp-point-in-string-or-comment))
# --
${1:int} ${2:variable}

7
snippets/java-mode/var= Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: variable declaration & assignment
# key: var=
# uuid: var=
# condition: (not (sp-point-in-string-or-comment))
# --
${1:int} ${2:variable} = `%`$0;

6
snippets/java-mode/void Normal file
View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: void
# key: v
# uuid: v
# --
void $0

9
snippets/java-mode/while Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: while loop
# key: while
# uuid: while
# condition: (not (sp-point-in-string-or-comment))
# --
while (${1:true}) {
$0
}