Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341605

Summary: Leaving "Limit To" empty in C/C++ Search shall not be allowed
Product: [Tools] CDT Reporter: Marko Tomljenovic <marko.tomljenovic>
Component: cdt-coreAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3 CC: yevshif
Version: 7.0.1Keywords: contributed
Target Milestone: 8.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
The updated PDOMSearchPage class
none
Patch for the page class and the properties file containing the externalized strings
none
Patch where the note has the right style mschorn.eclipse: iplog+

Description Marko Tomljenovic CLA 2011-04-01 07:23:55 EDT
Build Identifier: 7.0.1

When the "C/C++ Search" dialog is opened it is allowed to keep all "Limit To" checkboxes unchecked, which will always lead to an empty search result.
This setting does not make sense at al. 

As a cosequence this shall be forbidden by the search dialog.

Reproducible: Always

Steps to Reproduce:
See details
Comment 1 Marko Tomljenovic CLA 2011-04-19 02:36:09 EDT
Created attachment 193544 [details]
The updated PDOMSearchPage class
Comment 2 Marko Tomljenovic CLA 2011-04-19 02:55:47 EDT
What would be nice is to add a hint that the C/C++ search only searches in the active code of the project.

This regularly confuses our users since they assume it searches the whole src files for the respective element.
Comment 3 Markus Schorn CLA 2011-04-20 03:18:32 EDT
(In reply to comment #1)
> Created attachment 193544 [details]
> The updated PDOMSearchPage class

Please provide a patch, your file undos the fix for bug 196479.
Comment 4 Marko Tomljenovic CLA 2011-05-02 08:19:14 EDT
Created attachment 194479 [details]
Patch for the page class and the properties file containing the externalized strings
Comment 5 Markus Schorn CLA 2011-05-11 05:04:21 EDT
Thanks for the patch! The information that the C++ search considers active code branches only is presented in an unusual style. I think it should be sufficient to use a note as for instance on the preference page 'C/C++ - Appearance'.
Comment 6 Marko Tomljenovic CLA 2011-05-11 05:10:47 EDT
(In reply to comment #5)
> Thanks for the patch! The information that the C++ search considers active code
> branches only is presented in an unusual style. I think it should be sufficient
> to use a note as for instance on the preference page 'C/C++ - Appearance'.

Thas was also my idea, but our users were totally confused of the results since they thought the C/C++ search does a "text based search" but only on the C/C++ code and our users typically don't go through the preferences to find some info about certain features.

Who will be hurt if we keep this reminder in the search view? ;)

Greets Marko
Comment 7 Markus Schorn CLA 2011-05-11 05:35:01 EDT
(In reply to comment #6)
> Thas was also my idea, but our users were totally confused of the results since
> they thought the C/C++ search does a "text based search" but only on the C/C++
> code and our users typically don't go through the preferences to find some info
> about certain features.
> Who will be hurt if we keep this reminder in the search view? ;)
> Greets Marko
I think there is a misunderstanding. The reminder is good, however it should be presented in the usual style: '<bold>Note:</bold> ...'. This style is used by all projects including the platform, we need to stick to it.
I mentioned the preference page 'C/C++ - Appearance', because it contains a note in the correct style.
Comment 8 Marko Tomljenovic CLA 2011-05-11 05:56:31 EDT
(In reply to comment #7)
> (In reply to comment #6)
> > Thas was also my idea, but our users were totally confused of the results since
> > they thought the C/C++ search does a "text based search" but only on the C/C++
> > code and our users typically don't go through the preferences to find some info
> > about certain features.
> > Who will be hurt if we keep this reminder in the search view? ;)
> > Greets Marko
> I think there is a misunderstanding. The reminder is good, however it should be
> presented in the usual style: '<bold>Note:</bold> ...'. This style is used by
> all projects including the platform, we need to stick to it.
> I mentioned the preference page 'C/C++ - Appearance', because it contains a
> note in the correct style.

Ahh, ok!
I will provide another patch for that.
Comment 9 Marko Tomljenovic CLA 2011-05-11 11:00:43 EDT
Created attachment 195367 [details]
Patch where the note has the right style
Comment 10 Markus Schorn CLA 2011-05-11 11:22:55 EDT
Thanks Marko,
fixed in 8.0 > 20110511.