mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
don't qualify class references twice
This commit is contained in:
@@ -76,7 +76,9 @@ class ConstructorInsertHandler implements InsertHandler<LookupElementDecorator<L
|
||||
|
||||
insertParentheses(context, delegate, psiClass, withTail && isAbstract);
|
||||
|
||||
DefaultInsertHandler.addImportForItem(context, delegate);
|
||||
if (item.getDelegate() instanceof JavaPsiClassReferenceElement) {
|
||||
DefaultInsertHandler.addImportForItem(context, delegate);
|
||||
}
|
||||
|
||||
if (!withTail) {
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {{
|
||||
foo.Foo<String> f = new bar.Bar();<caret>
|
||||
}}
|
||||
|
||||
class Bar {}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {{
|
||||
foo.Foo<String> f = new B<caret>
|
||||
}}
|
||||
|
||||
class Bar {}
|
||||
@@ -1032,6 +1032,12 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
|
||||
checkResultByTestName();
|
||||
}
|
||||
|
||||
public void testQualifiedAfterNew() throws Exception {
|
||||
myFixture.addClass("package foo; public interface Foo<T> {}");
|
||||
myFixture.addClass("package bar; public class Bar implements foo.Foo {}");
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testTabAfterNew() throws Exception {
|
||||
doFirstItemTest('\t');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user