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.
NetBeans IDE 6.0 Preview (M9, build 070501) 1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03 Windows XP version 5.1 running on x86 en_GB (nb); Cp1252 Description: ============ If some changes are made in guarded blocks after searching, then search result are not displayed correctly in detail (selected in source editor) test case: ========== have project with jFrame and insert some components in it. 1. invoke search and replace dialog (ctrl-shift-p) and try to find e. g. component's variable name 2. all occurrences are displayed in search/result win. Check that all results are correctly displayed in editor after double click (are highlighted) 3. insert another component and save form 4. then check previous occurrences again as it is described in step. 2 see that results are not correctly highlighted in editor and different code is mark. workaround: do the search again ...
simpler way to reproduce: 1.) search for a string and doubleclick on some item from the hitlist - the searched string will be highlighted in the editor 2.) now move the cursor to a position before the highlighted text and hit enter 3.) doubleclick the same item in the hitlist org.netbeans.modules.search.TextDetail has a Line object which is referencing the line number the searched text was found at. Unfortunately, the column number (also held by TextDetail) doesn't exist in that line anymore.
In general the search results become obsolete once you modified source code. Currently (for java) results are valid until you modified exactly the line with the appearance (Tomas usecase). Nevertheless, IDE could do better job here by trying to match old results to the new sources.
It is not always possible to match old results with new document content, but current release (7.0.1) does quite a good job trying it.