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.

Bug 188185 - "Find in Projects" returns duplicate results in the "Search Results" window
Summary: "Find in Projects" returns duplicate results in the "Search Results" window
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: PC All
: P2 normal (vote)
Assignee: Victor Vasilyev
URL:
Keywords: USABILITY
: 172664 184428 186955 187010 187979 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-29 07:31 UTC by alin.costea
Modified: 2010-09-15 03:06 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
<no description> (23.37 KB, image/png)
2010-06-29 07:33 UTC, alin.costea
Details
File twice in search result (display detail of ".form" or ".java" file) (71.02 KB, image/png)
2010-09-06 15:54 UTC, lcourtin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alin.costea 2010-06-29 07:31:15 UTC
When searching for a keyword in an Enterprise Application Project the "Search Results" list shows duplicate entries for each file containing the keyword(same file, same line, same column))
Steps to reproduce:

Edit -> Find in Projects -> Enter search term -> Hit Find

Product Version = NetBeans IDE 6.9 (Build 201006101454)
Operating System = Linux version 2.6.32-22-generic running on amd64
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) 64-Bit Server VM 16.3-b01
Comment 1 alin.costea 2010-06-29 07:33:56 UTC
Created attachment 100474 [details]
<no description>
Comment 2 lcourtin 2010-09-06 15:54:02 UTC
Created attachment 101896 [details]
File  twice in search result (display  detail of ".form" or ".java" file)

Files done with GUI builder are showed twice in search result.
Depending of the file :
   * the .java is displayed twice.
   * the .java is display twice but the result is from the .form (click on + button)
By cons this is always the file .java that is open but with the line number  .form in the last case.
Comment 3 lcourtin 2010-09-06 16:05:41 UTC
I have forget to say that we use Netbeans 6.9.1 of Windows 7 with Java 1.6.0_21.

I think this is a major issue, I move to P2 (I don't know if I can do this)
Comment 4 Victor Vasilyev 2010-09-09 15:37:25 UTC
Causes of this bug are the following:
Implementations of the NB projects, including Java Project implementation, have started to use of new API interface SearchInfo.Files
(http://bits.netbeans.org/dev/javadoc/org-openidex-util/org/openidex/search/SearchInfo.Files.html)
The interface SearchInfo.Files is based on FileObjects.
Nevertheless, current implementation of the Search uses the DataObjects in many of parts.
Using of the DataObjects is ambiguous and provokes incorrect result in the search window if specified FileObject is not a primary file in the DataObject.
We can see such behavior in a case of GUI Java file when two files (i.e. java file and a form file) are associated to a single DataObject.

Implementation of the Search should be revised to avoid ambiguous identification of the files.
Comment 5 Victor Vasilyev 2010-09-14 11:33:08 UTC
Fixed in the main trunk
http://hg.netbeans.org/main/rev/057787c55f52
Comment 6 Victor Vasilyev 2010-09-14 11:41:05 UTC
*** Bug 184428 has been marked as a duplicate of this bug. ***
Comment 7 Victor Vasilyev 2010-09-14 11:41:51 UTC
*** Bug 187010 has been marked as a duplicate of this bug. ***
Comment 8 Victor Vasilyev 2010-09-14 11:42:42 UTC
*** Bug 187979 has been marked as a duplicate of this bug. ***
Comment 9 Victor Vasilyev 2010-09-14 11:43:35 UTC
*** Bug 172664 has been marked as a duplicate of this bug. ***
Comment 10 Victor Vasilyev 2010-09-14 11:46:18 UTC
*** Bug 186955 has been marked as a duplicate of this bug. ***
Comment 11 Quality Engineering 2010-09-15 03:06:22 UTC
Integrated into 'main-golden', will be available in build *201009150000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/057787c55f52
User: Victor G. Vasilyev <vvg@netbeans.org>
Log: #188185 -  "Find in Projects" returns duplicate results in the "Search Results" window.
The FileObject is used instead of DataObject as the basic object in the Search implementation to be more applicable to the interface SearchInfo.Files, and to avoid of ambiguous search results.