basic completion tests -> community

This commit is contained in:
peter
2009-10-15 13:07:59 +01:00
parent 5ba0ca7ba0
commit 2635f32a99
185 changed files with 2274 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
class A{
{
X aaa, aab;
(A)aa<caret>
}
}

View File

@@ -0,0 +1,6 @@
class A{
private A myClassCombo;
protected void createNorthPanel() {
((A)myClassCombo<caret>)
}
}

View File

@@ -0,0 +1,6 @@
class A{
private A myClassCombo;
protected void createNorthPanel() {
((A)my<caret>)
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
boolean xxx = xxx instanceof <caret>
}
}

View File

@@ -0,0 +1,9 @@
class AyByCyDyEy {}
public class Foo {
{
ABCDE<caret>
}
}

View File

@@ -0,0 +1,7 @@
public class Foo {
{
ABCDE<caret>
}
}

View File

@@ -0,0 +1,9 @@
import foo.bar.AxBxCxDxEx;
public class Foo {
{
AxBxCxDxEx<caret>
}
}

View File

@@ -0,0 +1,7 @@
@interface MyAnnotation {
Object value();
String name();
}
@MyAnnotation(v<caret>)
class MyClass {}

View File

@@ -0,0 +1,7 @@
@interface MyAnnotation {
Object value();
String name();
}
@MyAnnotation(value = null, n<caret>)
class MyClass {}

View File

@@ -0,0 +1,7 @@
@interface MyAnnotation {
Object value();
String name();
}
@MyAnnotation(value = null, name = <caret>)
class MyClass {}

View File

@@ -0,0 +1,6 @@
@interface MyAnnotation {
Object value();
}
@My<caret>
class MyClass {}

View File

@@ -0,0 +1,6 @@
@interface MyAnnotation {
Object value();
}
@MyAnnotation(<caret>)
class MyClass {}

View File

@@ -0,0 +1,16 @@
enum Setup {
NO_CONNECTION,
CONNECTION
}
@Target(value = ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Test {
Setup setup();
}
public class Client {
@Test(setup = Setup.CO<caret>)
public void run() {
}
}

View File

@@ -0,0 +1,16 @@
enum Setup {
NO_CONNECTION,
CONNECTION
}
@Target(value = ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Test {
Setup setup();
}
public class Client {
@Test(setup = Setup.CONNECTION<caret>)
public void run() {
}
}

View File

@@ -0,0 +1,6 @@
@interface MyAnnotation {
String documentation() default "";
}
@My<caret>
class MyClass {}

View File

@@ -0,0 +1,6 @@
@interface MyAnnotation {
String documentation() default "";
}
@MyAnnotation<caret>
class MyClass {}

View File

@@ -0,0 +1,7 @@
@interface MyAnnotation {
int value();
String name();
}
@MyAnnotation(value = 0, n<caret>)
class MyClass {}

View File

@@ -0,0 +1,7 @@
@interface MyAnnotation {
int value();
String name();
}
@MyAnnotation(value = 0, name = <caret>)
class MyClass {}

View File

@@ -0,0 +1,6 @@
@interface MyAnnotation {
Class value();
}
@MyAnnotation(<caret>A.class)
class MyClass {}

View File

@@ -0,0 +1,6 @@
@interface MyAnnotation {
Class value();
}
@MyAnnotation(value = <caret>A.class)
class MyClass {}

View File

@@ -0,0 +1,12 @@
@interface MyAnno {
String xxx();
String yyy();
}
public class MyFirstTestClassFoo {
{
MyAn<caret>
}
}

View File

@@ -0,0 +1,10 @@
@interface MyAnno {
String xxx();
String yyy();
}
/**
* @see MyAn<caret>
*/
public class MyFirstTestClassFoo {
}

View File

@@ -0,0 +1,10 @@
@interface MyAnno {
String xxx();
String yyy();
}
/**
* @see MyAnno<caret>
*/
public class MyFirstTestClassFoo {
}

View File

@@ -0,0 +1,10 @@
@interface MyAnno {
String xxx();
String yyy();
}
public class MyFirstTestClassFoo {
MyAn<caret>
}

View File

@@ -0,0 +1,10 @@
@interface MyAnno {
String xxx();
String yyy();
}
public class MyFirstTestClassFoo {
MyAnno<caret>
}

View File

@@ -0,0 +1,12 @@
@interface MyAnno {
String xxx();
String yyy();
}
public class MyFirstTestClassFoo {
{
MyAnno<caret>
}
}

View File

@@ -0,0 +1,10 @@
@interface MyAnno {
String xxx();
String yyy();
}
public class MyFirstTestClassFoo {
@MyAn<caret>
}

View File

@@ -0,0 +1,10 @@
@interface MyAnno {
String xxx();
String yyy();
}
public class MyFirstTestClassFoo {
@MyAnno(<caret>)
}

View File

@@ -0,0 +1,3 @@
@java.la<caret>
class Foo {
}

View File

@@ -0,0 +1,3 @@
@java.lang.<caret>
class Foo {
}

View File

@@ -0,0 +1,7 @@
@interface Anno {
String foo();
String bar();
}
@Anno(<caret>)
class Foo {}

View File

@@ -0,0 +1,7 @@
@interface MyAnnotation {
Object value();
String name();
}
@MyAnnotation(value = <caret>)
class MyClass {}

View File

@@ -0,0 +1,3 @@
public class Main {
@in<caret>
}

View File

@@ -0,0 +1,3 @@
public class Main {
@ab<caret>
}

View File

@@ -0,0 +1,3 @@
public class Main {
@ab<caret>
}

View File

@@ -0,0 +1,3 @@
public class Main {
@interface <caret>
}

View File

@@ -0,0 +1,7 @@
class A{
{
Integer i;
i.<caret>
i;
}
}

View File

@@ -0,0 +1,6 @@
public class Main {
{
equals(tr<caret>)
}
}

View File

@@ -0,0 +1,6 @@
public class Main {
{
equals(true<caret>)
}
}

View File

@@ -0,0 +1,13 @@
public class Foooo {
{
Xxx a;
switch (a) {
case F<caret>
}
}
enum Xxx {
FOO, BAR
}
}

View File

@@ -0,0 +1,13 @@
public class Foooo {
{
Xxx a;
switch (a) {
case FOO:<caret>
}
}
enum Xxx {
FOO, BAR
}
}

View File

@@ -0,0 +1,11 @@
public class Aaaaaaa {
Object foo() {}
void bar() {
if (foo() instanceof String) {
foo().substr<caret>
}
}
}

View File

@@ -0,0 +1,11 @@
public class Aaaaaaa {
Object foo() {}
void bar() {
if (foo() instanceof String) {
((String) foo()).substring(<caret>)
}
}
}

View File

@@ -0,0 +1,10 @@
public abstract class Zzza {
void foo(Object o) {
if (o instanceof String) {
o.substr<caret>
}
}
}

View File

@@ -0,0 +1,10 @@
public abstract class Zzza {
void foo(Object o) {
if (o instanceof String) {
((String) o).substring(<caret>)
}
}
}

View File

@@ -0,0 +1,6 @@
class A{
{
long zzz = 0;
int asd = (<caret>)zzz
}
}

View File

@@ -0,0 +1,6 @@
class A{
{
long zzz = 0;
int asd = (<caret>)
}
}

View File

@@ -0,0 +1,6 @@
class A{
{
long zzz = 0;
int asd = (<caret>
}
}

View File

@@ -0,0 +1,73 @@
public class Aaaaaaa {
Object foo() {
return null;
}
Object foobar() {
return null;
}
void bar() {
try {
if (foo() instanceof String) {
//foo().s
}
try {
try {
try {
try {
if (foobar() instanceof String) {
}
foobar().substr<caret>
} finally {
try {
System.out.println("");
} catch (Exception e) {
System.out.println("");
}
}
} finally {
try {
try {
if (foo() instanceof String) {
System.out.println("");
}
} finally {
try {
System.out.println("");
} catch (Exception e) {
System.out.println("");
}
}
} catch (Exception e) {
System.out.println("");
}
}
} finally {
try {
System.out.println("");
} catch (Exception e) {
System.out.println("");
}
}
} finally {
try {
System.out.println("");
} catch (Exception e) {
System.out.println("");
}
}
} finally {
try {
System.out.println("");
} catch (Exception e) {
System.out.println("");
}
}
}
}

View File

@@ -0,0 +1,5 @@
class Foo {
int a = new Foo().
t<caret>a().length(). ..
}

View File

@@ -0,0 +1,5 @@
class Foo {
int a = new Foo().
toString()<caret>a().length(). ..
}

View File

@@ -0,0 +1,7 @@
@Anno(String.cla<caret>)
public class Main {
}
@interface Anno {
Class value();
}

View File

@@ -0,0 +1,7 @@
@Anno(String.class<caret>)
public class Main {
}
@interface Anno {
Class value();
}

View File

@@ -0,0 +1,5 @@
public class FooBar {
{
new FooB<caret>().
}
}

View File

@@ -0,0 +1,5 @@
public class FooBar {
{
new FooBar()<caret>.
}
}

View File

@@ -0,0 +1,7 @@
public class Xxx {
{
this.e<caret>Xxx.class;
}
}

View File

@@ -0,0 +1,7 @@
public class Xxx {
{
this.equals(<caret>)Xxx.class;
}
}

View File

@@ -0,0 +1,3 @@
class ABCDE{
public AB<caret>
}

View File

@@ -0,0 +1,3 @@
class ABCDE{
public AB<caret>(){}
}

View File

@@ -0,0 +1,14 @@
@interface Anno {
String value();
}
public class FooBar {
@Anno(FoB<caret>)
void m() {}
String FooBarrrrrr() {}
public static String FooBarrrr() {}
}

View File

@@ -0,0 +1,14 @@
@interface Anno {
String value();
}
public class FooBar {
@Anno(FooBar<caret>)
void m() {}
String FooBarrrrrr() {}
public static String FooBarrrr() {}
}

View File

@@ -0,0 +1,9 @@
public class Foo {
{
do {
} while (toSt<caret>);
}
}

View File

@@ -0,0 +1,9 @@
public class Foo {
{
do {
} while (toString()<caret>);
}
}

View File

@@ -0,0 +1,10 @@
class AaaaBbbb {}
class AaaaBbbbb {}
class Foo {
{
AaBb<caret>
}
}

View File

@@ -0,0 +1,10 @@
class AaaaBbbb {}
class AaaaBbbbb {}
class Foo {
{
AaaaBbbb~<caret>
}
}

View File

@@ -0,0 +1,10 @@
public abstract class Zzza {
void foo(Object o) {
if (o instanceof String) {
o.toStr<caret>
}
}
}

View File

@@ -0,0 +1,10 @@
public abstract class Zzza {
void foo(Object o) {
if (o instanceof String) {
o.toString()<caret>
}
}
}

View File

@@ -0,0 +1,11 @@
public class Foo {
void bar() {
equals(new Object() {
boolean bar() {
return f<caret>
}
});
}
}

View File

@@ -0,0 +1,7 @@
public class A {
public class B {
void m() {
A.thi<caret>
}
}
}

View File

@@ -0,0 +1,7 @@
public class A {
public class B {
void m() {
A.this<caret>
}
}
}

View File

@@ -0,0 +1 @@
public enum Foo { private Fo<caret> }

View File

@@ -0,0 +1 @@
public enum Foo { private Foo<caret> }

View File

@@ -0,0 +1,11 @@
public class Main {
interface Account {}
public static void main(String[] args) {
java.util.List list;
for (int i = 0; i < list.size(); i++) {
Object o = (Acco<caret>list.get(i);
System.out.println(o);
}
}
}

View File

@@ -0,0 +1,11 @@
public class Main {
interface Account {}
public static void main(String[] args) {
java.util.List list;
for (int i = 0; i < list.size(); i++) {
Object o = (Account<caret>list.get(i);
System.out.println(o);
}
}
}

View File

@@ -0,0 +1,8 @@
class List<T> {}
class Foo {
List<? e<caret>>
}

View File

@@ -0,0 +1,8 @@
class List<T> {}
class Foo {
List<? extends <caret>>
}

View File

@@ -0,0 +1,10 @@
public class FooBar {
String getFoo();
String getBar();
{
String s = new FooBar().<caret>
}
}

View File

@@ -0,0 +1,10 @@
public class FooBar {
String getFoo();
String getBar();
{
String s = new FooBar().get<caret>
}
}

View File

@@ -0,0 +1,7 @@
public class MyFirstTestClassFoo {
{
MFT<caret>x
}
}

View File

@@ -0,0 +1,7 @@
public class MyFirstTestClassFoo {
{
MyFirstTestClassFoo.<caret>x
}
}

View File

@@ -0,0 +1,7 @@
class Foo {
int foo();
{
fo<caret>
}
}

View File

@@ -0,0 +1,7 @@
class Foo {
int foo();
{
foo().<caret>
}
}

View File

@@ -0,0 +1,7 @@
public class MyFirstTestClassFoo {
{
getCl<caret>(abc)
}
}

View File

@@ -0,0 +1,7 @@
public class MyFirstTestClassFoo {
{
getClass<caret>(abc)
}
}

View File

@@ -0,0 +1,10 @@
public class Quetzalcoatl {
public static final String FOO_BAR;
public static final String FOO_CHAR;
}
public class Beda {
{
Quetzalcoatl.F_B<caret>
}
}

View File

@@ -0,0 +1,10 @@
public class Quetzalcoatl {
public static final String FOO_BAR;
public static final String FOO_CHAR;
}
public class Beda {
{
Quetzalcoatl.FOO_BAR<caret>
}
}

View File

@@ -0,0 +1,8 @@
class DoubleTypeCompletion {
private final b<caret>
DoubleTypeCompletion(boolean result) {
}
}

View File

@@ -0,0 +1,5 @@
class A{
public class B{}
public class C extends Exception{}
public int method() throws <caret>
}

View File

@@ -0,0 +1,4 @@
class A{
A nullA = new A();
A x = null<caret>
}

View File

@@ -0,0 +1,4 @@
class A{
A nullA = new A();
A x = nullA<caret>
}

View File

@@ -0,0 +1,8 @@
public class Main {
Main getParent() {}
{
Main v;
for (;;v.getPa<caret>)
}
}

View File

@@ -0,0 +1,8 @@
public class Main {
Main getParent() {}
{
Main v;
for (;;v.getParent()<caret>)
}
}

View File

@@ -0,0 +1,17 @@
class B {
void setA(int i) {}
void setB(int i) {}
}
class C {
B b;
}
class A {
C c;
A() {
c.b.set<caret>A();
}
}

View File

@@ -0,0 +1,7 @@
class A {
int getAAA(int param) { return 0; }
public void actionPerformed(A a) {
a.getAA<caret>
((A)a).actionPerformed(this);
}
}

View File

@@ -0,0 +1,7 @@
class A {
int getAAA(int param) { return 0; }
public void actionPerformed(A a) {
a.getAAA(<caret>)
((A)a).actionPerformed(this);
}
}

View File

@@ -0,0 +1,7 @@
class A {
int getAAA(int param) { return 0; }
public void actionPerformed(A a) {
a.getAAA
(<caret>(A)a).actionPerformed(this);
}
}

View File

@@ -0,0 +1,6 @@
class A {
void getAAA(int param) { return 0; }
public void actionPerformed(A a) {
a.getAA<caret>zzz(239);
}
}

View File

@@ -0,0 +1,6 @@
class A {
void getAAA(int param) { return 0; }
public void actionPerformed(A a) {
a.getAAA(<caret>239);
}
}

View File

@@ -0,0 +1,6 @@
public class FooBar {
StringBuf<caret> foo() {
}
}

View File

@@ -0,0 +1,6 @@
public class FooBar {
StringBuf<caret>boo() {
}
}

Some files were not shown because too many files have changed in this diff Show More