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.
Steps to reproduce: 1. Write some code returning a value, for example: Integer.parseInt("10"); 2. Call hint (Alt-Enter or Ctrl-1 if using Eclipse keybinding like me). 3. Select "Assign Return Value To New Variable" (should be the only option). 4. Press Enter to accept it. 5. You will get: int parseInt = Integer.parseInt("10"); with the "parseInt" variable selected. 6. Press Enter again to accept the suggested variable name. Expected result: * variable name accepted, cursor at the end of the current line: int parseInt = Integer.parseInt("10");| Actual result: * variable name deleted leaving the following erroneous code: int = Integer.parseInt("10");
Good point. I'll invoke 'instant rename' after the refactoring; however some systematic support to rename/change generated identifiers/expressions would be nice - tracked as issue #250412. Fixed in jet-main#ea9160bab304
Integrated into 'main-silver', will be available in build *201502280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ea9160bab304 User: Svata Dedic <sdedic@netbeans.org> Log: #249828: instant rename is invoked after refactoring
Verified with Build 201507240001.