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.
Build 040606 j2sdk1.4.2 Consider a following structure: <source packages> |-abc | |-a.java | |-b.java | |-c.java | |-def I select all three java file in the project view and invoke Control-X (Cut) then Control-V (Paste) action on the 'def' folder. The same I can perform using D&D functionality. Files are moved in the first step of action and Move class dialog is appeared. The attachment shows the dialog contains wrong values (location - should be 'abc', to package should be 'def'). Question - What is a correct behaviour when user press the cansel button in the dialog. I would expect whole action (move) is reverted to the initial state, but files are remain moved now.
Created attachment 15526 [details] Snapshot
Sorry, I forgot to mentioned the dialog doesn't have a title (look at the attachment).
1. Misleading package is fixed: Checking in MoveClassPanel.java; /cvs/refactoring/src/org/netbeans/modules/refactoring/ui/MoveClassPanel.java,v <-- MoveClassPanel.java new revision: 1.3; previous revision: 1.2 done 2. Location should be "Source Packages". 3. Answer to your question: If you do cut/paste (or DND) - files are moved on the disk and then Move Class Refactoring is invoked. If you cancel Move Class Refactoring, no changes are made in contents of files, but these files should stay moved. 4. Lowering priority to P4. Missing title is minor issue.
Increasing priority because the title is important for UI tests. On the other hand it is also important to understand purpose of the dialog. I also thought that Cancel revert the move. UI is not clear IMO.
IMO, the users won't understand moving of files (and classes) as a two step process. They use a single DnD gesture or Paste action to move files (along with classes). The fact that this is done in two steps (move files + refactor classes) is an implementation detail the user doesn't care about. Therefore, Cancel should restore the original state completely. -> P2
To Honza Ch.: It depends on point of view. This solution allows to move file and don't do refactoring. After consultation with UI we added explanatory title: "Refactor Code for Moved Class(es)" User: mmatula Date: 04/06/13 13:58:48 Modified: src/org/netbeans/modules/refactoring/ui Bundle.properties MoveClassPanel.java MoveClassesUI.java RefactoringOperationListener.java RenamePanel.java RenameRefactoringUI.java Log: Changing title of the refactoring window when triggered by a file rename/move to Refactor Code for Renamed/Moved File(s)/Class(es) implemented
Verified