Community
Participate
Working Groups
Using 8.0.0.201101100002 (hudson) int main() { foo(); //note that foo is not declared! return 0; } 1. Initiate Rename refactoring on foo (alt+shift+r) 2. Click on the arrow to reveal menu. 3. Select Open Rename Dialog 4. NPE occurs: java.lang.NullPointerException at org.eclipse.cdt.internal.ui.refactoring.rename.CRenameProcessor.getSaveMode(CRenameProcessor.java:305) at org.eclipse.cdt.internal.ui.refactoring.rename.CRefactory.openDialog(CRefactory.java:136) at org.eclipse.cdt.internal.ui.refactoring.rename.RenameSupport.openDialog(RenameSupport.java:119) at org.eclipse.cdt.internal.ui.refactoring.rename.RenameSupport.openDialog(RenameSupport.java:90) at org.eclipse.cdt.internal.ui.refactoring.rename.RenameLinkedMode.startFullDialog(RenameLinkedMode.java:455) at org.eclipse.cdt.internal.ui.refactoring.rename.RenameInformationPopup$7$3.run(RenameInformationPopup.java:757) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
Fixed in 8.0.2 and master > 20111017.
*** cdt git genie on behalf of Marc-Andre Laperle *** Bug 333839 - NPE opening Rename refactoring dialog [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=432fafe8b9a2e4ee3e74e956b758145da4e4fee9
*** cdt git genie on behalf of Marc-Andre Laperle *** Bug 333839 - NPE opening Rename refactoring dialog [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=3d058369e67a456392f13797a4626c14e1193c5d
(In reply to comment #1) The fix was invalid. I submitted a corrected one.
*** cdt git genie on behalf of Sergey Prigogin *** Bug 333839 - NPE opening Rename refactoring dialog. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=9452859ec8439d87021b698b81e97cc67238ff9c
*** cdt git genie on behalf of Sergey Prigogin *** Bug 333839 - NPE opening Rename refactoring dialog. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=9bf03156220d0c490411afb7bee9658b4428e3a4
(In reply to comment #4) > (In reply to comment #1) > The fix was invalid. I submitted a corrected one. Thanks you for correcting it. I see that it catches the error earlier, that's better. I think it would be great to show the error dialog as soon as Rename is invoked rather than after pressing enter or opening the Rename Dialog.
(In reply to comment #7) > I think it would be great to show the error dialog as soon as Rename is > invoked rather than after pressing enter or opening the Rename Dialog. Agree. All is needed is a call to checkInitialConditions.
Verified in 8.0.2 RC1.