IDEA-58858 Regression: Incorrect behavior on method name autocomplete if the next statement has a cast

This commit is contained in:
peter.gromov
2010-11-08 17:57:34 +03:00
parent f391453d32
commit 217ece149b
4 changed files with 20 additions and 0 deletions
@@ -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());
}