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.
When sorting the code template table by column "Abbreviation" under Options -> Editor -> Code Templates, the expanded text of templates shown below the table seems to lose correspondence with the selected row in the table. Reproduce: 1. Go to Options -> Editor -> Code Templates 2. Sort table by Abbreviation by clicking on the column header. 3. Select some row, for example abbreviation "logbps". 4. Observe that the expanded text in the window below does not in fact belong to the selected code template. The expanded text in this case belongs to the "jaxbm" abbreviation, although "logbps" is selected. (5. By closing and reopening the Options window, the correct row is then selected, corresponding to the previously shown expanded text.)
Created attachment 141584 [details] Shows issue Happens also in dev builds. See screenshot Product Version: NetBeans IDE Dev (Build 201310200001) Updates: Updates available Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) User directory: C:\Users\markiewb\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\markiewb\AppData\Local\NetBeans\Cache\dev
Created attachment 142036 [details] Proposed patch Please review and commit the proposed patch. The patches introduces the correct mapping of the currently selected row and the index within the rowmodel.
Created attachment 142037 [details] Patch in action
Oh. Even another small issue in my patch. * Sort by expanded text * Create a new abbreviation -> ACTUAL: new abbreviation is not focused/selected EXPECTED: new abbreviation is focused/selected I will have a look at it too.
Created attachment 142041 [details] Proposed patch v2 (In reply to markiewb from comment #4) > Oh. Even another small issue in my patch. > > * Sort by expanded text > * Create a new abbreviation -> > ACTUAL: new abbreviation is not focused/selected > EXPECTED: new abbreviation is focused/selected > > I will have a look at it too. Fixed. See new patch
Already fixed in NB 8.0 - see issue #240300. *** This bug has been marked as a duplicate of bug 240300 ***