listed templates can be selected by space, move the tests to community

This commit is contained in:
peter
2012-02-15 16:37:49 +01:00
parent fe13245171
commit 51647b8898
20 changed files with 609 additions and 1 deletions
@@ -0,0 +1,9 @@
public class EndInTheMiddle {
public static void main(String[] args) {
javax.swing.JFrame frame = new javax.swing.JFrame();
<caret>
frame.setVisible(true);
frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
frame.pack();
}
}
@@ -0,0 +1,5 @@
public class EndInTheMiddle {
public static void main(String[] args) {
<caret>
}
}
@@ -0,0 +1,12 @@
import java.util.*;
class BarGoo {}
class Foo {
{
List<BarGoo> goos;
for (BarGoo goo : goos) {
<caret>
}
}
}
@@ -0,0 +1,10 @@
import java.util.*;
class BarGoo {}
class Foo {
{
List<BarGoo> goos;
<caret>
}
}
@@ -0,0 +1,14 @@
import java.util.*;
public class C {
Object o = new Object() {
class Inner {
}
void foo(List<Inner> inners) {
for (Inner <selection>inner<caret></selection> : inners) {
}
}
};
}
@@ -0,0 +1,12 @@
import java.util.*;
public class C {
Object o = new Object() {
class Inner {
}
void foo(List<Inner> inners) {
<caret>
}
};
}
@@ -0,0 +1,14 @@
import java.util.*;
class BarGoo {}
class Foo {
{
List<BarGoo> goos;
if (true) {
for (BarGoo goo : <selection>goos</selection><caret>) {
}
}
}
}
@@ -0,0 +1,10 @@
import java.util.*;
class BarGoo {}
class Foo {
{
List<BarGoo> goos;
if (true) <caret>
}
}
@@ -0,0 +1,15 @@
import java.util.List;
public class LiveTemplateTest {
void one() {
List<A.B<String>> list;
for (A.B<String> stringB : <selection>list</selection><caret>) {
}
}
}
class A {
static interface B<T> {}
}
@@ -0,0 +1,13 @@
import java.util.List;
public class LiveTemplateTest {
void one() {
List<A.B<String>> list;
<caret>
}
}
class A {
static interface B<T> {}
}
@@ -0,0 +1,3 @@
Hello H World H
Hello H World H
Hello H World H<caret>
@@ -0,0 +1,10 @@
import java.lang.String;
import java.util.List;
public class LiveTemplateTest {
void usage(int num, boolean someBoolean, List<String> args){
System.out.println("num = [" + num + "], someBoolean = [" + someBoolean + "], args = [" + args + "]");<caret>
}
}
@@ -0,0 +1,10 @@
import java.lang.String;
import java.util.List;
public class LiveTemplateTest {
void usage(int num, boolean someBoolean, List<String> args){
<caret>
}
}
@@ -0,0 +1,8 @@
import java.util.*;
class Foo {
{
List<String> l;
String[] s = l.toArray(new String[l.size()])<caret>
}
}
@@ -0,0 +1,8 @@
import java.util.*;
class Foo {
{
List<String> l;
String[] s = <caret>
}
}
@@ -0,0 +1,11 @@
import java.util.List;
public class LiveTemplateTest {
void foo(String... messages){}
void usage(){
List<String> messages = new ArrayList<String>();
foo(messages.toArray(new <selection>String<caret></selection>[messages.size()]));
}
}
@@ -0,0 +1,11 @@
import java.util.List;
public class LiveTemplateTest {
void foo(String... messages){}
void usage(){
List<String> messages = new ArrayList<String>();
foo(<caret>);
}
}