mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
create less new variables
This commit is contained in:
+1
-1
@@ -198,7 +198,7 @@ public class ReplaceForEachLoopWithIndexedForLoopIntention extends Intention {
|
||||
return createVariable(variableName, expression, context);
|
||||
}
|
||||
final PsiElement target = referenceElement.resolve();
|
||||
if (target instanceof PsiLocalVariable) {
|
||||
if (target instanceof PsiVariable) {
|
||||
// maybe should not do this for local variables outside of
|
||||
// anonymous classes
|
||||
return variableName;
|
||||
|
||||
Reference in New Issue
Block a user