mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
correctly treat accepting "new int[]" with [ (IDEA-70002)
This commit is contained in:
@@ -58,6 +58,9 @@ public class PsiTypeLookupItem extends LookupItem {
|
||||
if (!braces.isEmpty()) {
|
||||
context.getDocument().insertString(tail, braces);
|
||||
editor.getCaretModel().moveToOffset(tail + 1);
|
||||
if (context.getCompletionChar() == '[') {
|
||||
context.setAddCompletionChar(false);
|
||||
}
|
||||
} else {
|
||||
editor.getCaretModel().moveToOffset(tail);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Bar {
|
||||
{
|
||||
int[] a = new in<caret>
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Bar {
|
||||
{
|
||||
int[] a = new int[<caret>]
|
||||
}
|
||||
}
|
||||
+2
@@ -919,6 +919,8 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
doTest '\n'
|
||||
}
|
||||
|
||||
public void testPrimitiveArrayWithRBrace() throws Throwable { doTest '[' }
|
||||
|
||||
public void testSuggestMembersOfStaticallyImportedClasses() throws Exception {
|
||||
myFixture.addClass("""package foo;
|
||||
public class Foo {
|
||||
|
||||
Reference in New Issue
Block a user