mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
completion sorting tests -> community
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
public class Foo {
|
||||
{
|
||||
if (Bar.<caret>)
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
public static void voidMethod() {}
|
||||
public static boolean booleanMethod() {}
|
||||
public static final boolean BOOLEAN = true;
|
||||
public static final Object AN_OBJECT = "";
|
||||
|
||||
public static class Inner {}
|
||||
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
public class Foo {
|
||||
{
|
||||
Bar.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
|
||||
public static void voidMethod() {}
|
||||
public static boolean booleanMethod() {}
|
||||
public static final boolean BOOLEAN = true;
|
||||
public static final Object AN_OBJECT = "";
|
||||
|
||||
public static class Inner {}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
public class Aaaaaaa {
|
||||
private final String aaa;
|
||||
|
||||
Aaaaaaa(String aabbb) {
|
||||
aaa = true ? null : aa<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class Aaaaaaa {
|
||||
private final String aaa;
|
||||
|
||||
Aaaaaaa(Object aabbb) {
|
||||
aaa = true ? null : aa<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Foo {
|
||||
|
||||
void register(int registrar) {
|
||||
regi<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Foo {
|
||||
|
||||
int register() {
|
||||
re<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
public class ServiceManager {
|
||||
|
||||
public static <T> T getService(Class<T> serviceClass) {
|
||||
}
|
||||
|
||||
public static <T> T getService(Project project, Class<T> serviceClass) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class Foo {
|
||||
String getFoo() {
|
||||
return ServiceManager.<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Beda {
|
||||
{
|
||||
Object clsLoader;
|
||||
cL<caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@interface Anno {
|
||||
String value();
|
||||
String name();
|
||||
}
|
||||
|
||||
@Anno(<caret>)
|
||||
class Foo {}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
String getName() {}
|
||||
Foo getNameIdentifier() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
void foo() {
|
||||
Foo f;
|
||||
if ("abc".equals(f.getN<caret>))
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public class MyFirstTestClassFoo {
|
||||
|
||||
void foo(int a) {}
|
||||
void foo() {}
|
||||
void foo(int a, int b) {}
|
||||
void fox(int a) {}
|
||||
|
||||
{
|
||||
new MyFirstTestClassFoo().fo<caret>
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Foo {
|
||||
void bar() {}
|
||||
void foo() {}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
void foo() {
|
||||
super.<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Foo {
|
||||
boolean zoo(String s) {
|
||||
return f<caret>
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<p<caret>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
String fooLongButOfDefaultType() {}
|
||||
Foo foo() {}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
void foo() {
|
||||
Foo f;
|
||||
if ("abc".equals(f.fo<caret>))
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
void foo(String s) {}
|
||||
{
|
||||
foo("aaa".sub<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
{
|
||||
Object classLoader;
|
||||
Object classBeforeLoader;
|
||||
cL<caret>
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Foo {
|
||||
{
|
||||
Object classLoader;
|
||||
Object classLoader2;
|
||||
cL<caret>
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public abstract class Foo {
|
||||
|
||||
void foo(Boolean value);
|
||||
|
||||
{
|
||||
boolean b;
|
||||
foo(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
|
||||
public Class<? extends String> foo() {
|
||||
return <caret>
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
class Foo {
|
||||
{
|
||||
Object _o;
|
||||
Bar b;
|
||||
if (_o instanceof Goo) {
|
||||
Goo g = <caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Goo {
|
||||
|
||||
}
|
||||
|
||||
class Bar extends Goo {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
String name;
|
||||
Object o1;
|
||||
Foo foo;
|
||||
|
||||
Object o = <caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
enum MyEnum {
|
||||
FOO, BAR;
|
||||
}
|
||||
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
MyEnum e;
|
||||
MyEnum e1 = <caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
enum MyEnum {
|
||||
FOO, BAR;
|
||||
}
|
||||
|
||||
public class Foo {
|
||||
|
||||
MyEnum bar() {}
|
||||
|
||||
MyEnum foo() {
|
||||
MyEnum e;
|
||||
return <caret>
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
interface MyProcessor<T> {
|
||||
void execute(T t);
|
||||
}
|
||||
|
||||
class Proc1<T> implements MyProcessor<T> { public void execute(T t) {}}
|
||||
|
||||
class Foo {
|
||||
MyProcessor<Foo> p = new <caret>
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.*;
|
||||
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
Map<Pair<Object, Object>, Object> map;
|
||||
map.get(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Pair<A, B> {
|
||||
Pair(A a, B b) {}
|
||||
|
||||
static <A,B> Pair<A,B> create(A a, B b) {}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
String myFoo;
|
||||
String myBar;
|
||||
|
||||
String getFoo() {
|
||||
return my<caret>
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Smth {}
|
||||
class Button extends Smth {}
|
||||
class ButtonBase extends Button {}
|
||||
|
||||
class Foo {
|
||||
Foo foo(String s) {
|
||||
Smth s = new B<caret>
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package zzzzz;
|
||||
|
||||
public class Foo {
|
||||
{
|
||||
class InnerGoo extends Goo{}
|
||||
|
||||
Goo g = new <caret>
|
||||
}
|
||||
|
||||
class Bar extends Goo {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Goo {
|
||||
|
||||
}
|
||||
|
||||
class AGoo extends Goo {}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class FooBean3 extends JComponent {
|
||||
|
||||
JComponent foo(int a) {
|
||||
}
|
||||
|
||||
public void setFooBean239(String fooBean239) {
|
||||
String name;
|
||||
PopupMenu b;
|
||||
add(<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class FooBean3 extends JComponent {
|
||||
|
||||
{
|
||||
add(new <caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
public void getAbc() {
|
||||
if(<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Foo {
|
||||
public boolean getAbc() {
|
||||
return <caret>
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
|
||||
Foo bar() { }
|
||||
Foo goo() { }
|
||||
|
||||
void foo(Foo param) {
|
||||
Foo foo;
|
||||
Foo zzz = <caret>
|
||||
}
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
Class<Foo> local;
|
||||
Class<? extends Foo> f = <caret>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Bar extends Foo {}
|
||||
@@ -0,0 +1,16 @@
|
||||
public class FooBar {
|
||||
|
||||
class Xxx {}
|
||||
|
||||
Xxx foo() { }
|
||||
Xxx bar() { }
|
||||
Xxx goo() { }
|
||||
|
||||
void aaa(Xxx a) {}
|
||||
|
||||
{
|
||||
new FooBar().aaa( new FooBar().<caret> );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Foo<T> {
|
||||
|
||||
T foo() {}
|
||||
|
||||
<V> V bar() {}
|
||||
|
||||
{
|
||||
Foo<String> o;
|
||||
String a = o.<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
interface List {
|
||||
void add();
|
||||
}
|
||||
|
||||
class ArrayList implements List {
|
||||
public void add() {}
|
||||
}
|
||||
|
||||
class OtherList extends ArrayList {}
|
||||
|
||||
class Foo {
|
||||
{
|
||||
ArrayList l = new <caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Foo extends JComponent {
|
||||
|
||||
public Component foo() {
|
||||
return new <caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
public class MyRunnable implements Runnable {
|
||||
|
||||
private class MyAnotherRunnable extends MyRunnable {}
|
||||
|
||||
Runnable foo() {
|
||||
return new <caret>
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
interface Bar {}
|
||||
class Goo {}
|
||||
|
||||
abstract class Foo {
|
||||
void foo(Bar f);
|
||||
|
||||
void foo(Foo f);
|
||||
|
||||
void foo(Goo f);
|
||||
|
||||
|
||||
{
|
||||
|
||||
foo((<caret>))
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
|
||||
void register(Foo param) {
|
||||
|
||||
}
|
||||
|
||||
void foo(Foo param) {
|
||||
param.register(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
|
||||
void register(Foo param) {
|
||||
|
||||
}
|
||||
|
||||
void foo(Foo param) {
|
||||
register(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
class Foo {
|
||||
private static final Foo A_PRIVATE;
|
||||
@Deprecated public static final Foo B_DEPRECATED;
|
||||
public static final Foo C_NORMAL;
|
||||
|
||||
}
|
||||
|
||||
class Bar {
|
||||
{
|
||||
Foo a = <caret>
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public class A {
|
||||
private A myDelegate;
|
||||
|
||||
public void method(String abc, String xyz) {
|
||||
myDelegate.method(abc, <caret>);
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
String myVersion;
|
||||
String getVersion();
|
||||
String getSelectedVersion();
|
||||
String calculateVersion();
|
||||
{
|
||||
String version = <caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import javax.swing.JPanel;
|
||||
|
||||
public class FooBean3 extends javax.swing.JComponent {
|
||||
|
||||
{
|
||||
add(new <caret>)
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class ZZZZZZ {
|
||||
public String getTitle() { }
|
||||
private static String getVersionString(int a) {}
|
||||
|
||||
public String getDefaultVersion() {
|
||||
return <caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class FooBean3 extends javax.swing.JComponent {
|
||||
|
||||
{
|
||||
add(new <caret>)
|
||||
}
|
||||
|
||||
private class NestedClass extends FooBean3 {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
Foo foo(int i, String s) {
|
||||
|
||||
}
|
||||
|
||||
Foo foo(String s) {
|
||||
String a;
|
||||
int b;
|
||||
return foo(<caret>)
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
class T {
|
||||
I myLastI;
|
||||
I getLastI() { return myLastI; }
|
||||
|
||||
void setLastI(I a) {
|
||||
myLastI = <caret>
|
||||
}
|
||||
}
|
||||
|
||||
class I {
|
||||
static final I _1 = new I();
|
||||
static final I _2a = new I();
|
||||
static final I _3a = new I();
|
||||
static final I _4a = new I();
|
||||
static final I _5a = new I();
|
||||
static final I _6a = new I();
|
||||
static final I _7a = new I();
|
||||
static final I _8a = new I();
|
||||
static final I _9a = new I();
|
||||
|
||||
static I valueOf(String sth) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
class Foo {
|
||||
boolean foo;
|
||||
boolean bar;
|
||||
|
||||
{
|
||||
foo(f<caret>)
|
||||
}
|
||||
|
||||
void foo(boolean foo, boolean bar) {
|
||||
}
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
String s;
|
||||
Object o;
|
||||
java.util.List<String> list;
|
||||
list.contains(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public abstract class Foo {
|
||||
|
||||
private class Bar extends Foo {}
|
||||
|
||||
{
|
||||
java.util.List<Foo> list;
|
||||
list.contains(new <caret>)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
String s;
|
||||
Object o;
|
||||
new String().equals(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
String s;
|
||||
Foo foo;
|
||||
Object o;
|
||||
new Foo().equals(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
|
||||
{
|
||||
String a;
|
||||
Foo b;
|
||||
Object z;
|
||||
equals(<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public abstract class Foo {
|
||||
|
||||
private class Bar extends Foo {}
|
||||
|
||||
{
|
||||
new Foo().equals(new <caret>)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public abstract class Foo {
|
||||
|
||||
{
|
||||
this.equals(new <caret>)
|
||||
}
|
||||
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
java.util.List<Foo> p = new <caret>
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
String getAttributeValue(String s);
|
||||
String getNamespace();
|
||||
}
|
||||
|
||||
class Bar {
|
||||
String getAttribute() {
|
||||
Foo f;
|
||||
return f.<caret>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user