mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[^ann] IDEA-85082 IDEA erroneously uses qualified class names for type parameters when using smart completion for inner class
This commit is contained in:
@@ -78,8 +78,9 @@ public class PsiTypeLookupItem extends LookupItem {
|
||||
|
||||
PsiElement position = context.getFile().findElementAt(context.getStartOffset());
|
||||
assert position != null;
|
||||
context.getDocument().insertString(context.getTailOffset(), calcGenerics(position, context));
|
||||
JavaCompletionUtil.shortenReference(context.getFile(), context.getStartOffset());
|
||||
int genericsStart = context.getTailOffset();
|
||||
context.getDocument().insertString(genericsStart, calcGenerics(position, context));
|
||||
JavaCompletionUtil.shortenReference(context.getFile(), genericsStart - 1);
|
||||
|
||||
int tail = context.getTailOffset();
|
||||
String braces = StringUtil.repeat("[]", getBracketsCount());
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
public class Test {
|
||||
|
||||
{
|
||||
new Foo<String>().method(new Outer.Inner<String>());<caret>
|
||||
}
|
||||
|
||||
static class Outer {
|
||||
static class Inner<A> {}
|
||||
}
|
||||
|
||||
class Foo<A> {
|
||||
public void method(Outer.Inner<A> inner) {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
public class Test {
|
||||
|
||||
{
|
||||
new Foo<String>().method(new <caret>);
|
||||
}
|
||||
|
||||
static class Outer {
|
||||
static class Inner<A> {}
|
||||
}
|
||||
|
||||
class Foo<A> {
|
||||
public void method(Outer.Inner<A> inner) {}
|
||||
}
|
||||
}
|
||||
+1
@@ -1034,6 +1034,7 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
|
||||
|
||||
public void testArrayInitializerBeforeVarargs() throws Throwable { doTest(); }
|
||||
public void testDuplicateMembersFromSuperClass() throws Throwable { doTest(); }
|
||||
public void testInnerAfterNew() throws Throwable { doTest(); }
|
||||
|
||||
public void testMemberImportStatically() {
|
||||
configureByTestName();
|
||||
|
||||
Reference in New Issue
Block a user