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.
Product Version: NetBeans IDE 6.0 RC1 (Build 200711080000) Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b03 System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb) Description: ============ have j2se project with form class 1. insert jButton and do double click to generate action handler for it 2. select this button and set visible code card instead properties one which is opened as default 3. change variable name of this button using contextual menu invoked on node in inspector 4. switch to source code 5. invoke rename - refactoring on button's variable in source code 6. switch to design to check if all variable occurrences were correctly changed (node in inspec should be changed, variable name on code card as well)- should be OK 7. switch to source and do refactoring undo 8. switch to design to check if all variable occurrences were correctly changed - should be OK as well 9. switch to source and do refactoring redo 10. switch to design to check if all variable occurrences were correctly changed - see button's node in inspector is not updated and doesn't correspond with variable name in source Then is sufficient to rename variable in source again and from this point, form class is unstable. Button is not possible to delete because in every case when is selected, an exception is thrown. Log file is enclosed as attachment. If form is reopened then button can be deleted from design but it's declaration remains in source code which causes NPE StackTraces: ============ SEVERE [global] java.lang.IllegalArgumentException: A node selection cannot contain nodes ([JFrame]) not underneath the root (Form NewJFrame). at org.openide.explorer.ExplorerManager.checkUnderRoot(ExplorerManager.java:555) at org.openide.explorer.ExplorerManager.access$300(ExplorerManager.java:89) at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.checkArgumentIsValid(ExplorerManager.java:233) at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.run(ExplorerManager.java:286) at org.openide.util.Mutex.readAccess(Mutex.java:318) java.lang.NullPointerException at org.netbeans.modules.form.FormEditorSupport$JavaEditorTopComponent.componentShowing(FormEditorSupport.java:1202) at org.netbeans.core.multiview.MultiViewPeer.peerComponentShowing(MultiViewPeer.java:198) at org.netbeans.core.multiview.MultiViewCloneableTopComponent.componentShowing(MultiViewCloneableTopComponent.java:119) at org.openide.windows.WindowManager.componentShowing(WindowManager.java:330)
Created attachment 52711 [details] message log
Created attachment 52712 [details] form file
Created attachment 52713 [details] java file
Product Version: NetBeans IDE 6.0 RC1 (Build 200711090000) Java: 1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb) I am sorry, I am not able to reproduce this issue. I followed the steps twice and everything worked as designed. Are you still able to reproduce it?
yes I can reproduce it again and on both jdk. But I can say, sometimes I have to the steps 7-9 more then twice. Then form reaches the state when rename of variable is not done on all places
The described test case doesn't always lead to the described problem. The test case is also long and artificial => lowering priority.