Is it possible to move mutliple static methods and/or multiples static fields on one shot ?
public final class ClassA {
public static final String CONSTANTE_A = "CONSTANTE_A";
public static final String CONSTANTE_B = "CONSTANTE_B";
public static void methodA() {
// statements....
}
public static void methodB() {
// statements....
}
}
public final class ClassB {
// empty class
}
I would like to be able to select methodA, methodB, CONSTANTE_A and CONSTANTE_B, and do a "move..." to ClassB
Expand until you see the static methods or varibles. Select all that you want to move. Right click. Select Refactor. Then choose the class where you want to move. Click OK. That will not just copy and paste but will refactor (update references to those methods and variables).
The easiest way to do this is to drag and drop the variables in Eclipse's package explorer. Expand ClassA until you see your static variables listed under your class and select both of them -- control + click (pc) or command + click (mac). Then just drag them to the desired destination class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With