Bug 194817

Summary: Add a new hint to @Override annotation errors to "Rename method"
Product: java Reporter: _ wadechandler <wadechandler>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW --- QA Contact: issues <issues.netbeans.org>
Priority: P3    
Version: 6.x   
Target Milestone: TBD   
Hardware: All   
OS: All   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:

Description _ wadechandler 2011-01-28 15:48:50 UTC
Please see:
http://wadechandler.blogspot.com/2011/01/java-override-and-refactoring.html

as to why I'm requesting this as an aid in refactoring. Basically, when one has methods which no longer make sense in an interface or class and they must be removed, classes overriding them have these methods which no longer make sense. These methods can be renamed, logic pulled from them, or perhaps completely removed. It would be very handy to just ALT-ENTER then use the "Rename method" hint to be done with the method. Now, if one is refactoring such an interface they should use the "Rename method" refactoring and that go ahead and fix the issue for them in the entire code base, but in the cases where this has not been done, or perhaps some dependent project was not open at the time, then this would be extremely handy.

It would be nice if there were some way when this occurs to have another hint option of "Rename all methods using this name implementing interfaces used in this class". That would be a way to throw some dependent project into a refactor mode for such a time when the project wasn't open to take advantage of some larger refactoring. It may be the dependency sources are not even controlled by the dependent project, and in that case such a refactoring would never be possible without some sort of a similar feature.
Comment 1 MackSix 2011-11-14 12:34:11 UTC
*** Bug 194815 has been marked as a duplicate of this bug. ***
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo