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.
Refactoring 'Preview' needs to provide a way for the user to see the future state, rather than the list of places/lines where the source file is going to be changed. Comments from the NetBeans 4.0 Beta 2 feedback: -------------------------------------------- I used the refactoring feature today to add a parameter to a constructor. When I hit Preview, I got a list of all the places referencing the constructor. However, the preview text did not show the -new-/proposed version of the line, instead it showed the old (same as in editor) version of the code. As a result I was unsure if it would work. I copied my tree and tried anyway -- and it works. --------------------------------------------
This will be covered by a "diff" available from the pop-up menu in usages window. We plan to implement this for promoF (nb4.2)
Adding this comment here since it is related to this issue and may change the strategy of where a preview or diff may be viewable. Since Refactoring uses a wizard type of approach, the generally accepted workflow with a wizard is walk a user through the steps of an operation one screen at a time and when the last screen has gone away, then the operation is fully complete. Refactoring doesn't follow this principle. For instance, on a Refactor > Rename, after a user puts in a new name and presses "Next", the wizard goes away. For users who are used to wizard operations, his or her expectation is that the refactoring in complete. This is not the case, instead the IDE's output window displays a list of occurences it found that would be modified and requires the user to press "Do Refactoring" to finish the operation which is outside the wizard. To be consistent with a wizard approach, a slightly different windowing flow should in place. Here's an example, (not necessarily the best approach, but a possibility): Put the preview up inside the wizard after the user presses "Next" on the "Rename" dialog with a scrollable window with the "Do Refactoring" or a "Next" at the bottom of the wizard. This screen of the wizard might also be the place to show a "diff" button for the previews.
We try to do it for 6.0
Prototype implemented.