You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "dca00 (via GitHub)" <gi...@apache.org> on 2026/10/06 13:06:16 UTC

[I] Rename refactor fails 1/2 on Swing event handlers [netbeans]

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

   ### Apache NetBeans version
   
   Apache NetBeans 31
   
   ### What happened
   
   The rename refactor of Swing controls fails after it had renamed the references to the method but before it renamed the method itself.
   This leaves the undo buffer empty. The only recovery is to be done by manually editing the references or from source control because Netbeans does not offer any other method of renaming event handlers.
   
   ### Language / Project Type / NetBeans Component
   
   Java
   
   ### How to reproduce
   
   Create a Java project
   Add a Swing form
   Add an event handler
   Try to refactor rename it
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Linux
   
   ### JDK
   
   21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   Every time since at least v. 7.2
   
   ### 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: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


Re: [I] Rename refactor fails 1/2 on Swing event handlers [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #9671:
URL: https://github.com/apache/netbeans/issues/9671#issuecomment-6026226711

   seems to be a regression since NB 29. 
   
   getting a NPE while trying to rename a JButton form designer component from within the code editor (no event listeners added). It does work from the Properties window. Tbh I didn't even know that was an option since the generated code is in guarded sections - but the rename action did seem to work until NB 29.
   
   ```
   SEVERE [org.openide.util.Exceptions]
   java.lang.NullPointerException: Cannot invoke "org.netbeans.modules.refactoring.api.AbstractRefactoring.getGBHandlers()" because "refactoring" is null
   	at org.netbeans.modules.refactoring.api.AccessorImpl.getGBHandlers(AccessorImpl.java:39)
   	at org.netbeans.modules.refactoring.spi.RefactoringElementsBag.add(RefactoringElementsBag.java:93)
   	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.createAndAddElements(JavaRefactoringPlugin.java:345)
   	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.createAndAddElements(JavaRefactoringPlugin.java:356)
   	at org.netbeans.modules.refactoring.java.plugins.RenameRefactoringPlugin.prepare(RenameRefactoringPlugin.java:613)
   [catch] at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:417)
   	at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:401)
   	at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:212)
   	at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:1063)
   	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1370)
   	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
   	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
   	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1981)
   ```


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


Re: [I] Rename refactor fails 1/2 on Swing event handlers [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien closed issue #9671: Rename refactor fails 1/2 on Swing event handlers
URL: https://github.com/apache/netbeans/issues/9671


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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