mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
smart completion tests -> community
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
abstract class Foo {
|
||||
Foo f = new <caret>
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
class A {
|
||||
{
|
||||
new java.io.File("aaa").list(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
<selection>return false; //To change body of implemented methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
{
|
||||
new java.io.File("aaa").list(new <caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class User {
|
||||
{
|
||||
String s = new String(<caret>) == null ? getDefaultEjbName() : s;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class User {
|
||||
{
|
||||
String s = new <caret> == null ? getDefaultEjbName() : s;
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
class Pair<A, B> {
|
||||
public final A first;
|
||||
public final B second;
|
||||
|
||||
Pair(A first, B second) {
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
}
|
||||
}
|
||||
|
||||
class Test {
|
||||
void test(Pair<String, Integer> p) {
|
||||
Pair<String, Integer> p2 = new Pair<String, Integer>(p.first, <caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class Pair<A, B> {
|
||||
public final A first;
|
||||
public final B second;
|
||||
|
||||
Pair(A first, B second) {
|
||||
this.first = first;
|
||||
this.second = second;
|
||||
}
|
||||
}
|
||||
|
||||
class Test {
|
||||
void test(Pair<String, Integer> p) {
|
||||
Pair<String, Integer> p2 = new Pair<String, Integer>(p.f<caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
interface Foo {
|
||||
int ABC = 1;
|
||||
}
|
||||
|
||||
interface Bar extends Foo {
|
||||
boolean ABC = 2;
|
||||
}
|
||||
|
||||
class FooImpl implements Foo {}
|
||||
|
||||
class BarImpl extends FooImpl implements Bar {
|
||||
{
|
||||
boolean a = Bar.ABC;<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
interface Foo {
|
||||
int ABC = 1;
|
||||
}
|
||||
|
||||
interface Bar extends Foo {
|
||||
boolean ABC = 2;
|
||||
}
|
||||
|
||||
class FooImpl implements Foo {}
|
||||
|
||||
class BarImpl extends FooImpl implements Bar {
|
||||
{
|
||||
boolean a = A<caret>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Target;
|
||||
@Target(value={ElementType.<caret>})
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Target;
|
||||
@Target(value={<caret>})
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Retention;
|
||||
@Retention(RetentionPolicy.<caret>)
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Retention;
|
||||
@Retention(<caret>)
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Retention;
|
||||
@Retention(value=RetentionPolicy.<caret>)
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Retention;
|
||||
@Retention(value=<caret>)
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
@interface Table {
|
||||
int columnCount();
|
||||
}
|
||||
|
||||
@interface Join {
|
||||
Table table();
|
||||
}
|
||||
|
||||
|
||||
@Join(table = @Table(<caret>) )
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
@interface Table {
|
||||
int columnCount();
|
||||
}
|
||||
|
||||
@interface Join {
|
||||
Table table();
|
||||
}
|
||||
|
||||
|
||||
@Join(table = <caret> )
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
@interface Column {
|
||||
String name();
|
||||
}
|
||||
|
||||
@interface Table {
|
||||
Column id();
|
||||
}
|
||||
|
||||
@interface Join {
|
||||
Table[] table();
|
||||
}
|
||||
|
||||
|
||||
@Join({@Table(id = @Column(<caret>))} )
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
@interface Column {
|
||||
String name();
|
||||
}
|
||||
|
||||
@interface Table {
|
||||
Column id();
|
||||
}
|
||||
|
||||
@interface Join {
|
||||
Table[] table();
|
||||
}
|
||||
|
||||
|
||||
@Join({@Table(id = <caret>)} )
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
@interface Join {
|
||||
boolean nestedLoops();
|
||||
}
|
||||
|
||||
@Join(nestedLoops = <caret> )
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
@interface Join {
|
||||
boolean nestedLoops();
|
||||
}
|
||||
|
||||
@Join(nestedLoops = <caret> )
|
||||
@interface Annotation {
|
||||
|
||||
}
|
||||
@@ -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.<caret>)
|
||||
public void run() {
|
||||
}
|
||||
}
|
||||
@@ -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.<caret>)
|
||||
public void run() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(ElementType.<caret>)
|
||||
public @interface Test {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(<caret>)
|
||||
public @interface Test {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
{
|
||||
int pppp;
|
||||
int[] aaaa;
|
||||
aaaa[pppp<caret>]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class Foo {
|
||||
{
|
||||
int pppp;
|
||||
int[] aaaa;
|
||||
aaaa[p<caret>]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public @interface A {
|
||||
String[] value();
|
||||
}
|
||||
|
||||
class WontComplete {
|
||||
public static final String STRING = "aaaaa";
|
||||
|
||||
@A(STRING<caret>{"x"})
|
||||
int x;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public @interface A {
|
||||
String[] value();
|
||||
}
|
||||
|
||||
class WontComplete {
|
||||
public static final String STRING = "aaaaa";
|
||||
|
||||
@A(<caret>{"x"})
|
||||
int x;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class ArrayClone {
|
||||
public static void main(String[] arg) {
|
||||
String[] strings1 = {""};
|
||||
String[] strings2 = strings1.clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class ArrayClone {
|
||||
public static void main(String[] arg) {
|
||||
String[] strings1 = {""};
|
||||
String[] strings2 = strings1.cl<caret>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
int abcdef;
|
||||
int[] xxx;
|
||||
int z = xxx[abcdef<caret>]
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
int abcdef;
|
||||
int[] xxx;
|
||||
int z = xxx[a<caret>]
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
int foo;
|
||||
|
||||
{
|
||||
Foo f;
|
||||
foo = f.foo;<caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
int foo;
|
||||
|
||||
{
|
||||
Foo f;
|
||||
foo = f.f<caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class ZZZ {
|
||||
Object foo();
|
||||
|
||||
{
|
||||
ZZZ z;
|
||||
ZZZ y = (ZZZ ) z.foo()<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
public class ZZZ {
|
||||
Object foo();
|
||||
|
||||
{
|
||||
ZZZ z;
|
||||
ZZZ y = (ZZZ ) z.f<caret>
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class B {
|
||||
{
|
||||
Object o;
|
||||
if (o instanceof String) {
|
||||
String s = (String) o;
|
||||
String ss = (String) o;<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class B {
|
||||
{
|
||||
Object o;
|
||||
if (o instanceof String) {
|
||||
String s = (String) o;
|
||||
String ss = o<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
Foo foo = null;
|
||||
Foo bar = id(foo, <caret>Foo.class.toString() + "[]"));
|
||||
}
|
||||
|
||||
Foo id(Foo foo, String a) {return foo;}
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
Foo foo = null;
|
||||
Foo bar = id(f<caret>Foo.class.toString() + "[]"));
|
||||
}
|
||||
|
||||
Foo id(Foo foo, String a) {return foo;}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
public static final Foo[] EMPTY_ARRAY = new Foo[0];
|
||||
|
||||
public Foo[] foo(boolean b){
|
||||
return EMPTY_ARRAY;<caret>(Bar[]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
public static final Foo[] EMPTY_ARRAY = new Foo[0];
|
||||
|
||||
public Foo[] foo(boolean b){
|
||||
return EMA<caret>(Bar[]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
public class QQQ {
|
||||
void f(QQQ q) { }
|
||||
|
||||
{
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
f(QQQ.this);<caret>
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
public class QQQ {
|
||||
void f(QQQ q) { }
|
||||
|
||||
{
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
f(<caret>);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
/**
|
||||
* @exception IllegalStateException<caret>
|
||||
*/
|
||||
public void foo() throws java.io.IOException, IllegalStateException {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class JavaClass<T> {
|
||||
|
||||
|
||||
|
||||
<V extends T> V foo(Class<V> s) {}
|
||||
}
|
||||
|
||||
class Zoo {
|
||||
{
|
||||
Class<? extends String> xcccccccc = null;
|
||||
JavaClass<String> cccc = new JavaClass<String>();
|
||||
bar(cccc.foo(xcccccccc<caret>));
|
||||
}
|
||||
|
||||
void bar(String... s) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class JavaClass<T> {
|
||||
|
||||
|
||||
|
||||
<V extends T> V foo(Class<V> s) {}
|
||||
}
|
||||
|
||||
class Zoo {
|
||||
{
|
||||
Class<? extends String> xcccccccc = null;
|
||||
JavaClass<String> cccc = new JavaClass<String>();
|
||||
bar(cccc.foo(xcc<caret>));
|
||||
}
|
||||
|
||||
void bar(String... s) {
|
||||
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class A<T> {
|
||||
T get() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
class B extends A<StringBuffer> {}
|
||||
class C {
|
||||
void m(A<?> a) {
|
||||
if (a instanceof B) {
|
||||
StringBuffer s = ((B) a).get();<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class A<T> {
|
||||
T get() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
class B extends A<StringBuffer> {}
|
||||
class C {
|
||||
void m(A<?> a) {
|
||||
if (a instanceof B) {
|
||||
StringBuffer s = a.<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class MyException extends Exception {}
|
||||
|
||||
class Test {
|
||||
void test() throws MyException {
|
||||
try {
|
||||
throw new RuntimeException();
|
||||
} catch(Exception e) {
|
||||
throw (MyException) <caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class MyException extends Exception {}
|
||||
|
||||
class Test {
|
||||
void test() throws MyException {
|
||||
try {
|
||||
throw new RuntimeException();
|
||||
} catch(Exception e) {
|
||||
throw (<caret>)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class SomeClass {
|
||||
|
||||
{
|
||||
String[] aaa = (String[]) <caret>
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class SomeClass {
|
||||
|
||||
{
|
||||
String[] aaa = (<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class A<T> {
|
||||
private static final A<?> X = null;
|
||||
|
||||
A<String> get(B o) {
|
||||
return (A<String>) <caret>X;
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class A<T> {
|
||||
private static final A<?> X = null;
|
||||
|
||||
A<String> get(B o) {
|
||||
return (<caret>X;
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
interface Foo<T,V> {}
|
||||
|
||||
class Bar<T,V> {
|
||||
Bar(Foo<T,V> foo) {}
|
||||
}
|
||||
|
||||
class Main {
|
||||
Foo foo;
|
||||
Bar<String,String> bar = new Bar<String,String>((Foo<String, String>) <caret>foo);
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
interface Foo<T,V> {}
|
||||
|
||||
class Bar<T,V> {
|
||||
Bar(Foo<T,V> foo) {}
|
||||
}
|
||||
|
||||
class Main {
|
||||
Foo foo;
|
||||
Bar<String,String> bar = new Bar<String,String>((<caret>foo);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Aaaaaaa {
|
||||
|
||||
void foo(Class<? extends Object> c) {}
|
||||
|
||||
void bar() {
|
||||
foo((Class<Object>) <caret>Class.forName("sdd"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Aaaaaaa {
|
||||
|
||||
void foo(Class<? extends Object> c) {}
|
||||
|
||||
void bar() {
|
||||
foo((<caret>Class.forName("sdd"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import java.io.*;
|
||||
|
||||
class Foo {
|
||||
{
|
||||
Runnable runnable = new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
throw new IOException();
|
||||
} catch (IOException <caret>) {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import java.io.*;
|
||||
|
||||
class Foo {
|
||||
{
|
||||
Runnable runnable = new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
throw new IOException();
|
||||
} catch (<caret>) {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class C {
|
||||
void h (Class<? extends String> clazz) {}
|
||||
{
|
||||
h(<caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class C {
|
||||
void h (Class<? extends String> clazz) {}
|
||||
{
|
||||
h(<caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
@interface Anno {
|
||||
Class<? extends String> value();
|
||||
}
|
||||
@Anno(String.class<caret>)
|
||||
class Foo {}
|
||||
@@ -0,0 +1,5 @@
|
||||
@interface Anno {
|
||||
Class<? extends String> value();
|
||||
}
|
||||
@Anno(String.cl<caret>)
|
||||
class Foo {}
|
||||
@@ -0,0 +1,5 @@
|
||||
@interface Anno {
|
||||
Class<? extends String> value();
|
||||
}
|
||||
@Anno(String.class<caret>)
|
||||
class Foo {}
|
||||
@@ -0,0 +1,5 @@
|
||||
@interface Anno {
|
||||
Class<? extends String> value();
|
||||
}
|
||||
@Anno(<caret>)
|
||||
class Foo {}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@interface Anno {
|
||||
Class<? extends Foo> value();
|
||||
}
|
||||
@Anno(Bar.class<caret>)
|
||||
class Foo {}
|
||||
class Bar extends Foo{}
|
||||
@@ -0,0 +1,6 @@
|
||||
@interface Anno {
|
||||
Class<? extends Foo> value();
|
||||
}
|
||||
@Anno(B<caret>)
|
||||
class Foo {}
|
||||
class Bar extends Foo{}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import bar.Intf;
|
||||
import foo.Bar;
|
||||
|
||||
class Fooooo {
|
||||
Class<? extends Intf> f = Bar.class;<caret>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import bar.Intf;
|
||||
|
||||
class Fooooo {
|
||||
Class<? extends Intf> f = B<caret>
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class Set<T> {}
|
||||
|
||||
class Collections {
|
||||
static <T> Set<T> emptySet() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
{
|
||||
foo(Collections.<String>emptySet());<caret>
|
||||
}
|
||||
|
||||
void foo(Set<String> set){}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class Set<T> {}
|
||||
|
||||
class Collections {
|
||||
static <T> Set<T> emptySet() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
{
|
||||
foo(Collections.e<caret>)
|
||||
}
|
||||
|
||||
void foo(Set<String> set){}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class Set<T> {}
|
||||
|
||||
class Collections {
|
||||
static <T> Set<T> emptySet() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
Set<String> bar() {
|
||||
return true ? Collections.<String>emptySet() : <caret>
|
||||
}
|
||||
|
||||
void foo(Set<String> set){}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class Set<T> {}
|
||||
|
||||
class Collections {
|
||||
static <T> Set<T> emptySet() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
Set<String> bar() {
|
||||
return true ? Collections.e<caret>
|
||||
}
|
||||
|
||||
void foo(Set<String> set){}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class Set<T> {}
|
||||
|
||||
class Collections {
|
||||
static <T> Set<T> emptySet() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
Set<String> bar() {
|
||||
return true ? null : Collections.<String>emptySet();<caret>
|
||||
}
|
||||
|
||||
void foo(Set<String> set){}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class Set<T> {}
|
||||
|
||||
class Collections {
|
||||
static <T> Set<T> emptySet() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
Set<String> bar() {
|
||||
return true ? null : Collections.e<caret>
|
||||
}
|
||||
|
||||
void foo(Set<String> set){}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public abstract class Zzz {
|
||||
|
||||
{
|
||||
foo(aaaa(), <caret>)
|
||||
}
|
||||
|
||||
int aaaa() {}
|
||||
|
||||
void foo(int a) {}
|
||||
void foo(int a, String b) {}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
public abstract class Zzz {
|
||||
|
||||
{
|
||||
foo(<caret>)
|
||||
}
|
||||
|
||||
int aaaa() {}
|
||||
|
||||
void foo(int a) {}
|
||||
void foo(int a, String b) {}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import java.util.*;
|
||||
|
||||
public class FooBar {
|
||||
|
||||
{
|
||||
List<String> laaaaaa;
|
||||
List<String> laaaabbbbbb;
|
||||
for (String s : laaaaaa<caret>) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import java.util.*;
|
||||
|
||||
public class FooBar {
|
||||
|
||||
{
|
||||
List<String> laaaaaa;
|
||||
List<String> laaaabbbbbb;
|
||||
for (String s : <selection><caret>laaaasdafsdf</selection>) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class Key {}
|
||||
|
||||
public class Foo {
|
||||
static final Key FOO;
|
||||
|
||||
void foo(Key key) {}
|
||||
|
||||
{
|
||||
foo(FOO);<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class Key {}
|
||||
|
||||
public class Foo {
|
||||
static final Key FOO;
|
||||
|
||||
void foo(Key key) {}
|
||||
|
||||
{
|
||||
foo(<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
interface Bar {
|
||||
char c;
|
||||
char d;
|
||||
}
|
||||
|
||||
class Foo {
|
||||
{
|
||||
String s = "".substring("".lastIndexOf(Bar.<caret>));
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class Main {
|
||||
private static void method(Integer param) {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
method(
|
||||
new Integer(<caret>)
|
||||
);
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class Main {
|
||||
private static void method(Integer param) {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
method(
|
||||
new <caret>
|
||||
);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class TestSmartComplete {
|
||||
public static void main(String[] args) {
|
||||
Long var;
|
||||
|
||||
var = new Long(<caret>);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class TestSmartComplete {
|
||||
public static void main(String[] args) {
|
||||
Long var;
|
||||
|
||||
var = new <caret>();
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
enum MyEnum {
|
||||
FOO, BAR;
|
||||
}
|
||||
|
||||
public @interface Foo {
|
||||
|
||||
MyEnum en() default MyEnum.FOO;<caret>
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
enum MyEnum {
|
||||
FOO, BAR;
|
||||
}
|
||||
|
||||
public @interface Foo {
|
||||
|
||||
MyEnum en() default F<caret>
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
@interface Anno {
|
||||
String value();
|
||||
}
|
||||
|
||||
public class FooBar {
|
||||
public static final String FOO_BAR;
|
||||
|
||||
@Anno(FOO_BAR<caret>)
|
||||
void m() {}
|
||||
|
||||
String FooBarrrrrr() {}
|
||||
|
||||
public static String FooBarrrr() {}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
@interface Anno {
|
||||
String value();
|
||||
}
|
||||
|
||||
public class FooBar {
|
||||
public static final String FOO_BAR;
|
||||
|
||||
@Anno(FB<caret>)
|
||||
void m() {}
|
||||
|
||||
String FooBarrrrrr() {}
|
||||
|
||||
public static String FooBarrrr() {}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
@interface Anno {
|
||||
String value();
|
||||
}
|
||||
|
||||
@Anno(FooBar.FEE_BAR<caret>)
|
||||
public class FooBar {
|
||||
public static final String FEE_BAR;
|
||||
|
||||
String FooBarrrrrr() {}
|
||||
|
||||
public static String FooBarrrr() {}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
@interface Anno {
|
||||
String value();
|
||||
}
|
||||
|
||||
@Anno(FB<caret>)
|
||||
public class FooBar {
|
||||
public static final String FEE_BAR;
|
||||
|
||||
String FooBarrrrrr() {}
|
||||
|
||||
public static String FooBarrrr() {}
|
||||
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
public class SomeClass {
|
||||
|
||||
public void foo(int count) {}
|
||||
public static Object foo(int count, String descr) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SomeClassImpl {
|
||||
public Object foo(int count, String description) {
|
||||
SomeClass.foo(count, description)<caret>;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
public class SomeClass {
|
||||
|
||||
public void foo(int count) {}
|
||||
public static Object foo(int count, String descr) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SomeClassImpl {
|
||||
public Object foo(int count, String description) {
|
||||
SomeClass.foo(<caret>);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class ExtensionPointName<T> {
|
||||
public static <T> ExtensionPointName<T> create(String s) { return null; }
|
||||
}
|
||||
|
||||
class Foo<B> {
|
||||
public static <T> T[] getExtensions(ExtensionPointName<T> extensionPointName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ExtensionPointName<B> EXTENSION_POINT_NAME = ExtensionPointName.create("com.intellij.fileBasedIndex");
|
||||
|
||||
void f() {
|
||||
final B[] extensions = getExtensions(<caret>XXX.EXTENSION_POINT_NAME);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class ExtensionPointName<T> {
|
||||
public static <T> ExtensionPointName<T> create(String s) { return null; }
|
||||
}
|
||||
|
||||
class Foo<B> {
|
||||
public static <T> T[] getExtensions(ExtensionPointName<T> extensionPointName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ExtensionPointName<B> EXTENSION_POINT_NAME = ExtensionPointName.create("com.intellij.fileBasedIndex");
|
||||
|
||||
void f() {
|
||||
final B[] extensions = getExtensions(<caret>XXX.EXTENSION_POINT_NAME);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
Foo myFoo;
|
||||
|
||||
Foo foo(Foo foo) {
|
||||
}
|
||||
|
||||
{
|
||||
myFoo = foo(myFoo)<caret>
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user