mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't suggest return after dot
This commit is contained in:
@@ -637,7 +637,8 @@ public class JavaCompletionData extends JavaAwareCompletionData{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (psiElement().withParents(PsiReferenceExpression.class, PsiExpressionStatement.class, PsiIfStatement.class).accepts(position)) {
|
||||
if (psiElement().withParents(PsiReferenceExpression.class, PsiExpressionStatement.class, PsiIfStatement.class).andNot(
|
||||
psiElement().afterLeaf(".")).accepts(position)) {
|
||||
PsiElement stmt = position.getParent().getParent();
|
||||
PsiIfStatement ifStatement = (PsiIfStatement)stmt.getParent();
|
||||
if (ifStatement.getElseBranch() == stmt || ifStatement.getThenBranch() == stmt) {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Zoo {
|
||||
{
|
||||
if (true) toString().<caret>
|
||||
}
|
||||
|
||||
}
|
||||
+5
@@ -1278,4 +1278,9 @@ public class ListUtils {
|
||||
checkResult()
|
||||
}
|
||||
|
||||
public void testNoReturnAfterDot() {
|
||||
configure()
|
||||
assert !('return' in myFixture.lookupElementStrings)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user