nmatt opened a new issue, #8788:
URL: https://github.com/apache/netbeans/issues/8788

   ### Apache NetBeans version
   
   Apache NetBeans 27
   
   ### What happened
   
   When renaming a non-inherited method of a private class with Ctrl+R, 
NetBeans correctly recognizes that it can be renamed in-place (because the 
class being private means that method can only be referenced from within the 
current source file), but doesn't rename any overrides of the method.
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   Example:
   ```java
   class Example
   {
       private enum Enum
       {
           CONSTANT { @Override void renameMe() { } };
           
           abstract void renameMe();  // rename here
       }
       
       
       private interface Interface
       {
           static Interface INSTANCE = new Interface() { @Override public void 
renameMe() { } };
           
           void renameMe();  // rename here        
       }
   
       
       private static abstract class Class
       {
           static final Class INSTANCE = new Class() { @Override void 
renameMe() { } };
           
           void method() { new Class() { @Override void renameMe() { } }; }
   
           abstract void renameMe();  // rename here
       }
   }
   ```
   Renaming the method with Ctrl+R on the lines indicated by "rename here" will 
only rename that occurrence, and not any of the overrides.
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows
   
   ### JDK
   
   JDK 17
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to