mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: fix replacing for with foreach
This commit is contained in:
+2
-1
@@ -446,7 +446,8 @@ public class JavaStructuralSearchProfile extends StructuralSearchProfile {
|
||||
ParameterInfo nameInfo = builder.findParameterization(name);
|
||||
ParameterInfo typeInfo = builder.findParameterization(type);
|
||||
|
||||
if (nameInfo != null && typeInfo != null && !(parameter.getParent() instanceof PsiCatchSection)) {
|
||||
final PsiElement scope = parameter.getDeclarationScope();
|
||||
if (nameInfo != null && typeInfo != null && !(scope instanceof PsiCatchSection) && !(scope instanceof PsiForeachStatement)) {
|
||||
nameInfo.setArgumentContext(false);
|
||||
typeInfo.setArgumentContext(false);
|
||||
typeInfo.setMethodParameterContext(true);
|
||||
|
||||
Reference in New Issue
Block a user