Bug 60491 - [Search] Search fails to consider files not opened in the editor
Summary: [Search] Search fails to consider files not opened in the editor
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 2.0.1   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-29 15:26 EDT by James Ciesielski CLA
Modified: 2004-08-12 14:06 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Ciesielski CLA 2004-04-29 15:26:02 EDT
CDT 2.0.0.200404281729
Eclipse (200404281424)

Test Case:
1. Create 2 managed projects, call them ProjA and ProjB.
2. Add a file to ProjA, call it foo.h and insert the following code:
	class foo {
		public:
		foo() {};
	};
3. Copy foo.h from ProjA to ProjB. (You should now have two identical projects
with different names)
4. Close all of the editors.
5. Open the Search dialog and search with the following configuration:
	Scope: Workspace
	Search For: Class/Struct
	Search String: foo
	Limit To: Declarations


RESULT: No results are found.

EXPECTED: I expected to see two matches, one for ProjA and one for ProjB.

NB:  If I open both foo.h files in the editor and re-execute my search, I get
what I want.
Comment 1 John Camelon CLA 2004-04-30 10:34:39 EDT
Sounds like you are only searching the working copies Bogdan ... 
Comment 2 Bogdan Gheorghe CLA 2004-05-05 17:47:58 EDT
This is fixed in head as of May 5. It was a problem with the index enablement 
feature that got put in last week whereby certain paths would neglect to pick 
up the persisted indexer-enabled value.1

BG
Comment 3 James Ciesielski CLA 2004-05-11 15:27:23 EDT
This problem still appears to exists in CDT 200405071349.
Comment 4 James Ciesielski CLA 2004-05-11 15:42:22 EDT
Bogdan, could this be related to 57145?
Comment 5 Bogdan Gheorghe CLA 2004-05-14 19:41:50 EDT
Part of the problem here is that you are trying to search on a header file 
that hasn't been included by anything. Our policy has always been to index 
headers that are included by a source file. If you add a source file that 
includes your header and copy both of those files over to the second project, 
everything works as expected.

But there is a valid point in that search wasn't properly filtering working 
copies. Following your steps exactly you should get no results. I was getting 
a result if the file was open. This is now fixed and in head.

- BG



Comment 6 Pixy CLA 2004-06-03 15:26:24 EDT
Hi,

I reproduced this bug and it needs to be reopened.

Thanks,
Pixy.
Comment 7 John Camelon CLA 2004-06-03 15:32:13 EDT
Thy will be done!
Comment 8 Bogdan Gheorghe CLA 2004-06-03 15:48:40 EDT
This bug is done - refer to Bug 60948 for indexing unincluded headers.

Comment 9 Bogdan Gheorghe CLA 2004-07-16 09:53:57 EDT
Commited to head but should go into 2.0 stream as well...

- BG
Comment 10 Mathieu Lapensée CLA 2004-07-21 12:31:30 EDT
John,  can you change this bug to be in 2.0.1?   Is this one fixed?  Thanks.
Comment 11 Bogdan Gheorghe CLA 2004-07-21 13:23:48 EDT
Fixed in head but I need to put in the 2.0 stream. I'll do that along with my 
other commits today.

- BG
Comment 12 Bogdan Gheorghe CLA 2004-08-12 14:06:27 EDT
Fixed a while back...