mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
inplace introduce parameter: from field with the same name (IDEA-85750)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
public class ATest {
|
||||
public static final String FOO = "foo";
|
||||
public static final String FOO1 = "foo1";
|
||||
|
||||
String m_interval = "";
|
||||
void foo() {
|
||||
if (FOO.equals(<caret>m_interval.substring(1))) {
|
||||
System.out.println(FOO);
|
||||
} else if (FOO1.equals(m_interval.substring(1))) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
public class ATest {
|
||||
public static final String FOO = "foo";
|
||||
public static final String FOO1 = "foo1";
|
||||
|
||||
String m_interval = "";
|
||||
void foo(String m_interval1) {
|
||||
if (FOO.equals(m_interval1.substring(1))) {
|
||||
System.out.println(FOO);
|
||||
} else if (FOO1.equals(m_interval1.substring(1))) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,15 @@ public class InplaceIntroduceParameterTest extends AbstractJavaInplaceIntroduceT
|
||||
});
|
||||
}
|
||||
|
||||
public void testReplaceAll2() throws Exception {
|
||||
doTest(new Pass<AbstractInplaceIntroducer>() {
|
||||
@Override
|
||||
public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
|
||||
inplaceIntroduceFieldPopup.setReplaceAllOccurrences(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void testReplaceAllMethodCalls() throws Exception {
|
||||
doTest(new Pass<AbstractInplaceIntroducer>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user