mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-58858 Regression: Incorrect behavior on method name autocomplete if the next statement has a cast
This commit is contained in:
@@ -922,6 +922,14 @@ public class JavaCompletionUtil {
|
||||
// Invoke parameters popup
|
||||
AutoPopupController.getInstance(file.getProject()).autoPopupParameterInfo(editor, overloadsMatter ? null : (PsiElement)item.getObject());
|
||||
}
|
||||
|
||||
if (tailType == TailType.SEMICOLON) {
|
||||
PsiDocumentManager.getInstance(file.getProject()).commitAllDocuments();
|
||||
if (psiElement().beforeLeaf(psiElement().withText(".")).accepts(file.findElementAt(context.getTailOffset() - 1))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (tailType == TailType.SMART_COMPLETION || needLeftParenth && needRightParenth) {
|
||||
tailType.processTail(editor, context.getTailOffset());
|
||||
}
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Beda {
|
||||
{
|
||||
System.out.printl<caret> ((String)"a").subSequence();
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public class Beda {
|
||||
{
|
||||
System.out.println (<caret>(String)"a").subSequence();
|
||||
}
|
||||
}
|
||||
+2
@@ -596,6 +596,8 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNoSemicolonAfterExistingParenthesesEspeciallyIfItsACast() throws Throwable { doTest(); }
|
||||
|
||||
public void testCaseTailType() throws Throwable { doTest(); }
|
||||
|
||||
def doPrimitiveTypeTest() {
|
||||
|
||||
Reference in New Issue
Block a user