mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
extract method: make static and pass fields as parameters if possible (IDEA-112230)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class X {
|
||||
private int myI;
|
||||
void foo() {
|
||||
<selection>int i = myI++;</selection>
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class X {
|
||||
private int myI;
|
||||
void foo() {
|
||||
<selection>int i = myI;</selection>
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class X {
|
||||
private int myI;
|
||||
void foo() {
|
||||
newMethod(myI);
|
||||
}
|
||||
|
||||
private static void newMethod(int myI) {
|
||||
int i = myI;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user