mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
suggest class names in foreach with missing type (IDEA-74350)
This commit is contained in:
@@ -625,7 +625,11 @@ public class JavaCompletionContributor extends CompletionContributor {
|
||||
iterator.advance();
|
||||
}
|
||||
|
||||
if (!iterator.atEnd() && iterator.getTokenType() == JavaTokenType.LPARENTH) {
|
||||
while (!iterator.atEnd() && ElementType.JAVA_COMMENT_OR_WHITESPACE_BIT_SET.contains(iterator.getTokenType())) {
|
||||
iterator.advance();
|
||||
}
|
||||
|
||||
if (!iterator.atEnd() && (iterator.getTokenType() == JavaTokenType.LPARENTH || iterator.getTokenType() == JavaTokenType.COLON)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Zoo2 {
|
||||
{
|
||||
for (Stri<caret>child : dir.getChildren())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Zoo2 {
|
||||
{
|
||||
for (Stri<caret> : dir.getChildren())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Zoo2 {
|
||||
{
|
||||
for (String <caret> : dir.getChildren())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Zoo2 {
|
||||
{
|
||||
for (String <caret>child : dir.getChildren())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -854,6 +854,8 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
|
||||
public void testMethodParameterAnnotationClass() throws Throwable { doTest(); }
|
||||
public void testPrimitiveCastOverwrite() throws Throwable { doTest '\t' }
|
||||
public void testClassReferenceInFor() throws Throwable { doTest ' ' }
|
||||
public void testClassReferenceInFor2() throws Throwable { doTest ' ' }
|
||||
|
||||
public void testVoidMethodsInNonVoidContext() throws Throwable {
|
||||
configure()
|
||||
|
||||
Reference in New Issue
Block a user