This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 7.1 (Build 201112051121) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.7.0_01 Runtime = Java HotSpot(TM) Client VM 21.1-b02 given a public class containing some inner classes: public class MyClass { [...] class CsvFilter extends javax.swing.filechooser.FileFilter { @Override public boolean accept(File file) { String filename = file.getName(); return file.isDirectory() || filename.toLowerCase().endsWith(".csv"); } @Override public String getDescription() { return "*.csv"; } } class TxtFilter extends javax.swing.filechooser.FileFilter { @Override public boolean accept(File file) { String filename = file.getName(); return file.isDirectory() || filename.toLowerCase().endsWith(".txt"); } @Override public String getDescription() { return "*.txt"; } } [...] } For some reason the inner classes should be moved to it's own files and become public (eg. a class had been developed for local usage only, but can be used in general) - Highlight (select) a whole inner class, eg. class CsvFilter - Press Alt-Shift-m (move) --> NB tries to move the whole file, ignoring the selection only Moving the whole file might be simplier done by just dragging the file to a different package/folder within the project tree. The selection should indicate to move this part only. Is the current behavior buggy or is my sugesstion nothing but a new feature requested?
Maybe Move Inner To Outer should be also merged with "Move" refactoring
I have the same problem, and solution doesn't apply to my situation. I want to move an inner class (member) to another class (as a member). - When I select the inner class name or the inner class entirely, 'Move' assumes I want to move members inside the inner class. - When I go to the outer class, 'Move' shows me a list with movable members in the class (my fields, constants and methods) but not inner classes. My inner class is static and already public. I just want to move it to another class like any other member can be moved, including updating references.
the only workaround i can find is to "move inner to outer level", and then "move" the new class (click "To Type") to an existing class. it's far from perfect - the code gets reformatted and the end result is pretty buggy, eg superclass methods get prepended with the class name and don't resolve so i'm then copying and pasting the old code into the new class