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.
NB 4.2 (200508021800) JDK 1.5.0_4 When thre tree view is switched on, the package containing another packages can not be renamed from the menu. Steps to reproduce: 1) create this package sturcture: sources: \--packA \--subPack1 \--subPack2 2) switch to tree view (right click in the project view and select 'view java packages as | tree' from the context menu) 3) select packA from the tree 4) right click and select 'Refactor | Rename' (or use main menu Refactor | Rename) 5) write new name (e.g. packB) and confirm -> in the preview there is only written 'Rename packA to packB' and no usages are listed (althoug in the subPacks there are several classes) -> the package is not renamed Inline renaming works fine.
Is there any specification regarding this? There was no option to switch to tree mode in previous versions.
Jesse, is there any spec. regarding this? Thanks
I don't think there is any spec. Jano might know. If you want consistency with NB 4.0 (the tree mode was added as a visible UI option in 4.1), I would guess that Rename on a tree view should work the same as it does in the Files tab. <aside> BTW don't ask me for my real opinion - I always thought that the way Rename works on parent packages in the current UI spec is too clever and opaque. IMHO if you try to rename a Java source folder (whether displayed as a package or not) which has subpackages, the Rename dialog should have a checkbox - always checked by default - "Also Rename Subpackages". You could uncheck it if you wanted (though I think the common case would be to leave it checked). Then there would be no confusing difference of behavior according to the view you started with. I feel the same about CVS operations, etc. - better to just ask the user whether he intended to work on subdirs too. </aside>
I'll rather don't have any opinion :) I'll not implement anything without spec. I don't want another QA war again ragarding this. Jano?
This issue cannot be fixed after UI freeze. UI please respond.
I have replied yesterday but IZ ate my reply. We've discuss this topic with Jano and we think the best solution is to make it work in tree view the same way as in files view. That means if user renames a package, all the subpackages should be moved as well, as it is now in files view. We have also discussed the possibility of adding a checkbox to let user decide, but that would add complexity to the UI.
"We have also discussed the possibility of adding a checkbox to let user decide, but that would add complexity to the UI." - not as much as the current complexity, by which the UI behaves differently, with no warning to the user or possibility of override, according to which otherwise interchangeable view you invoke essentially the same action from. IMHO of course. :-)
Checking in src/org/netbeans/modules/refactoring/ui/RenameAction.java; /cvs/refactoring/src/org/netbeans/modules/refactoring/ui/RenameAction.java,v <-- RenameAction.java new revision: 1.32; previous revision: 1.31 done Checking in src/org/netbeans/modules/refactoring/ui/RSMJavaDOAction.java; /cvs/refactoring/src/org/netbeans/modules/refactoring/ui/RSMJavaDOAction.java,v <-- RSMJavaDOAction.java new revision: 1.12; previous revision: 1.11 done Checking in src/org/netbeans/modules/refactoring/CheckUtils.java; /cvs/refactoring/src/org/netbeans/modules/refactoring/CheckUtils.java,v <-- CheckUtils.java new revision: 1.29; previous revision: 1.28 done
verified