Refactor to move a class to its own file

If I add a second class to a file, then the system objects so is there a tool/refactor option that lets me select the class in the IDE and then have the system create a new file with the same name as the class and move the class's code into that new file ?

Thanks

1 comment
Comment actions Permalink

Just use the Move Refactor (F6 or Refactor > Move from the menu) with your cursor on the second class name. After promoting it, you will likely want to make the class public.

0

Please sign in to leave a comment.