This must be possible but I just can’t figure it out in Eclipse. I have
/** ClassA.java */
class A {
...
}
class B {
...
}
and I’d like to select class B and extract to its own file so that I get:
/** ClassA.java */
class A {
...
}
and
/** ClassB.java */
class B {
...
}
How do I do this in Eclipse?
This is how you do it (works in Eclipse 3.5):
Select your code to extract:
Cut
Right click on the package in which you want to put it
Select paste. (Then Organize imports if needed.)