mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
IDEA-84100 Code completion does not work for Spring injected beans in debugger
This commit is contained in:
@@ -430,7 +430,8 @@ public class JavaCompletionUtil {
|
||||
|
||||
PsiType runtimeQualifier = getQualifierCastType(javaReference, parameters);
|
||||
if (runtimeQualifier != null) {
|
||||
javaReference = (PsiReferenceExpression) JavaPsiFacade.getElementFactory(element.getProject()).createExpressionFromText("xxx.xxx", createContextWithXxxVariable(element, runtimeQualifier));
|
||||
javaReference = (PsiReferenceExpression) JavaPsiFacade.getElementFactory(element.getProject()).createExpressionFromText("xxx.xxx", createContextWithXxxVariable(element,
|
||||
PsiIntersectionType.createIntersection(qualifierType, runtimeQualifier)));
|
||||
qualifierType = runtimeQualifier;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
interface Foo { void foo(); }
|
||||
interface Bar { void bar(); }
|
||||
|
||||
public class A {
|
||||
void foo(Foo l) {
|
||||
if (l instanceof Bar) {
|
||||
l.<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1330,4 +1330,9 @@ public class ListUtils {
|
||||
public void testInterfaceImplementationNoCast() { doTest() }
|
||||
public void testStaticallyImportedMethodsBeforeExpression() { doTest() }
|
||||
|
||||
public void testCompatibleInterfacesCast() {
|
||||
configure()
|
||||
assert myFixture.lookupElementStrings.containsAll(['foo', 'bar'])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user