mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
java: add static import: don't pretend only one method is available when popup would be shown afterwards (IDEA-223655)
only applicable method is returned from `getMembersToImport(false, StaticMembersProcessor.SearchMode.MAX_2_MEMBERS)` when one of it is applicable and another is not. At the same time when we already calculate 100 first applicable methods, we can just reuse them instead the recalculation GitOrigin-RevId: e31fe962bd8180850e8e5c06aa1f93efb7654aa5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e32a42a8a0
commit
11606b6f47
@@ -0,0 +1,41 @@
|
||||
// "Import static method..." "true"
|
||||
package p;
|
||||
|
||||
import static p.FFF.myEqualTo;
|
||||
|
||||
public class X {
|
||||
public void test() throws Exception {
|
||||
assertMe("", myEqualTo(""));
|
||||
}
|
||||
|
||||
<V> void assertMe(V v, M<V> m) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class M<T> {
|
||||
}
|
||||
|
||||
class FFF {
|
||||
public static <T> M<T> myEqualTo(T operand) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class LLL {
|
||||
public static M<String> myEqualTo(int string) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class XXX {
|
||||
public static <T> M<T> myEqualTo(T operand) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
class YYY {
|
||||
public static <T> M<T> myEqualTo(T operand) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// "Import static method..." "true"
|
||||
package p;
|
||||
public class X {
|
||||
public void test() throws Exception {
|
||||
assertMe("", my<caret>EqualTo(""));
|
||||
}
|
||||
|
||||
<V> void assertMe(V v, M<V> m) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class M<T> {
|
||||
}
|
||||
|
||||
class FFF {
|
||||
public static <T> M<T> myEqualTo(T operand) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class LLL {
|
||||
public static M<String> myEqualTo(int string) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class XXX {
|
||||
public static <T> M<T> myEqualTo(T operand) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
class YYY {
|
||||
public static <T> M<T> myEqualTo(T operand) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user