mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
extract method: correct extraction with leading comment
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class Test {
|
||||
public void method2() {
|
||||
if (true) {
|
||||
<selection>
|
||||
// add to list2
|
||||
list2.add(true);</selection>
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
class Test {
|
||||
public void method2() {
|
||||
if (true) {
|
||||
newMethod();
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void newMethod() {
|
||||
// add to list2
|
||||
list2.add(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user