mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
method chain completion: suggest chains for collection of elements
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
import java.jang.String;
|
||||
import java.util.*;
|
||||
|
||||
class PsiMethod {
|
||||
}
|
||||
|
||||
interface PsiClass {
|
||||
List<PsiMethod> getMethods();
|
||||
}
|
||||
|
||||
public class TestCompletion {
|
||||
|
||||
PsiClass c;
|
||||
|
||||
public void method() {
|
||||
Collection<PsiMethod> m = <caret>
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
import java.util.*;
|
||||
|
||||
|
||||
public class TestIndex {
|
||||
|
||||
public void statMethod(PsiClass c) {
|
||||
c.getMethods();
|
||||
c.getMethods();
|
||||
c.getMethods();
|
||||
c.getMethods();
|
||||
c.getMethods();
|
||||
c.getMethods();
|
||||
c.getMethods();
|
||||
c.getMethods();
|
||||
}
|
||||
}
|
||||
|
||||
class PsiMethod {
|
||||
}
|
||||
|
||||
interface PsiClass {
|
||||
Collection<PsiMethod> getMethods();
|
||||
}
|
||||
+5
@@ -215,6 +215,11 @@ public class MethodChainsCompletionTest extends AbstractCompilerAwareTest {
|
||||
assertEquals("c.getMethods", element.getLookupString());
|
||||
}
|
||||
|
||||
public void testCollection() {
|
||||
WeightableChainLookupElement element = assertOneElement(doCompletion());
|
||||
assertEquals("c.getMethods", element.getLookupString());
|
||||
}
|
||||
|
||||
public void assertAdvisorLookupElementEquals(String lookupText,
|
||||
int unreachableParametersCount,
|
||||
int lastMethodWeight,
|
||||
|
||||
Reference in New Issue
Block a user