mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
inplace introduce variable: rename variable introduced inside loop without braces (IDEA-135083)
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
class C {
|
||||
{
|
||||
Runnable r = () -> System.out.println("extrac<caret>t me");
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class C {
|
||||
{
|
||||
Runnable r = () -> {
|
||||
String expr = "extract me";
|
||||
System.out.println(expr);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,15 @@ public class InplaceIntroduceVariableTest extends AbstractJavaInplaceIntroduceTe
|
||||
});
|
||||
}
|
||||
|
||||
public void testPlaceInsideLoopAndRename() throws Exception {
|
||||
doTest(new Pass<AbstractInplaceIntroducer>() {
|
||||
@Override
|
||||
public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
|
||||
type("expr");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void testRanges() throws Exception {
|
||||
doTest(new Pass<AbstractInplaceIntroducer>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user