java - How to refactor a static inner class to a top level class in Eclipse? -
I'm having trouble finding the correct reactor options for the following scenario:
I have a code like this (Externally .java):
public class external {// ... class content public static class inner {// ... internal class stuff}}
I'm looking for a way to select Inner, and it has changed it to a top-level class, it has its own .java
source file. I know that copying / paste etc. is easy to do manually, but in many places the internal class is referenced and I would prefer the refactor option to reference the reference everywhere.
I chose the option Eclipse Edition 3.5.1 Galileo EDIT: I can not believe I'm ignoring the option to do this. Thank you for all your correct answers; +1 all of you. I still need to accept an answer, so if there is any more useful information, eg. Meet the script, yet there is one purpose to leave an answer. It is so easy that I 'do not believe I forgot it: With cursor anywhere inside internal type, right click and select: (There is no shortcut in the default settings) It automatically removes the internal type, and puts it in its own file, The directory in the same package and as the external type. Updates In the later versions of Eclipse, this refactoring name has been renamed "new type of mov file" the refractor - & gt; Remove the class ...
but it does some strange things with a field called data which I did not understand.
refactor -> Convert Member Type Top Level ...
Comments
Post a Comment