Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » file search
file search [message #221817] Tue, 12 August 2008 14:02 Go to next message
Robert Brusa is currently offline Robert BrusaFriend
Messages: 55
Registered: July 2009
Member
Hi
when doing a file search with Eclipse (with C/C++ Dev. stuff installed), I
would expect that when specifying "workspace" as search area, that the
search goes through all subfolders in workspace. Obviously this is not the
case, because when searching for a string that I copied from a file deeply
rooted in a folder in workspace there is no hit.

Worse: Even when searching for a string copied from e. g.
workspace/myfile.c there is no hit. Do I get it wrong or is this a bug?

Let me add that when using "remote Search" - and the subfolders-box
checked - there are hits. I this "remote search" the only method to search
through a folder and optionally its subfolders?

Robert
Re: file search [message #221923 is a reply to message #221817] Wed, 13 August 2008 11:57 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Robert wrote:

> Hi
> when doing a file search with Eclipse (with C/C++ Dev. stuff installed), I
> would expect that when specifying "workspace" as search area, that the
> search goes through all subfolders in workspace. Obviously this is not the
> case, because when searching for a string that I copied from a file deeply
> rooted in a folder in workspace there is no hit.

> Worse: Even when searching for a string copied from e. g.
> workspace/myfile.c there is no hit. Do I get it wrong or is this a bug?

> Let me add that when using "remote Search" - and the subfolders-box
> checked - there are hits. I this "remote search" the only method to search
> through a folder and optionally its subfolders?

> Robert
I never experienced any problems with the file search. Are you sure you
selected the corrected file type? Did you select 'regular expression' or
'case sensitive'? Is the text your are seraching in a derived file?

Are we talking about the search window that is invoked when you press
CTRL-H (in the menu select Search->File..)? (See
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.user/gettingStarted/qs-36a.htm)
I have never seen the option "remote search".

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: file search [message #221945 is a reply to message #221923] Wed, 13 August 2008 14:23 Go to previous messageGo to next message
Robert Brusa is currently offline Robert BrusaFriend
Messages: 55
Registered: July 2009
Member
Axel Müller wrote:

> Robert wrote:

>> Hi
>> when doing a file search with Eclipse (with C/C++ Dev. stuff installed), I
>> would expect that when specifying "workspace" as search area, that the
>> search goes through all subfolders in workspace. Obviously this is not the
>> case, because when searching for a string that I copied from a file deeply
>> rooted in a folder in workspace there is no hit.

>> Worse: Even when searching for a string copied from e. g.
>> workspace/myfile.c there is no hit. Do I get it wrong or is this a bug?

>> Let me add that when using "remote Search" - and the subfolders-box
>> checked - there are hits. Is this "remote search" the only method to search
>> through a folder and optionally its subfolders?

>> Robert
> I never experienced any problems with the file search. Are you sure you
> selected the corrected file type? Did you select 'regular expression' or
> 'case sensitive'? Is the text your are seraching in a derived file?

> Are we talking about the search window that is invoked when you press
> CTRL-H (in the menu select Search->File..)? (See
>
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.user/gettingStarted/qs-36a.htm)
> I have never seen the option "remote search".

> Axel

Yes - the menu entry Search->File.. and in the same menu I also have the
entry Search->Remote..

I had copied my search string for this test from the file
/home/rwb/ecosws/arm_install/include/cyg/io/serial.h
where ecosws is the current workspace of Eclipse.
Then I called Search->File.., pasted my string - did NOT select regular
expression nor case sensitive, specified the file as *.h, selected scope
workspace and clicked search. Result: 0 hits -- strange.

Robert
Re: file search [message #221959 is a reply to message #221945] Thu, 14 August 2008 06:23 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Robert wrote:

> Axel Müller wrote:

>> Robert wrote:

>>> Hi
>>> when doing a file search with Eclipse (with C/C++ Dev. stuff installed), I
>>> would expect that when specifying "workspace" as search area, that the
>>> search goes through all subfolders in workspace. Obviously this is not the
>>> case, because when searching for a string that I copied from a file deeply
>>> rooted in a folder in workspace there is no hit.

>>> Worse: Even when searching for a string copied from e. g.
>>> workspace/myfile.c there is no hit. Do I get it wrong or is this a bug?

>>> Let me add that when using "remote Search" - and the subfolders-box
>>> checked - there are hits. Is this "remote search" the only method to
search
>>> through a folder and optionally its subfolders?

>>> Robert
>> I never experienced any problems with the file search. Are you sure you
>> selected the corrected file type? Did you select 'regular expression' or
>> 'case sensitive'? Is the text your are seraching in a derived file?

>> Are we talking about the search window that is invoked when you press
>> CTRL-H (in the menu select Search->File..)? (See
>>
>
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.user/gettingStarted/qs-36a.htm)
>> I have never seen the option "remote search".

>> Axel

> Yes - the menu entry Search->File.. and in the same menu I also have the
> entry Search->Remote..

> I had copied my search string for this test from the file
> /home/rwb/ecosws/arm_install/include/cyg/io/serial.h
> where ecosws is the current workspace of Eclipse.
> Then I called Search->File.., pasted my string - did NOT select regular
> expression nor case sensitive, specified the file as *.h, selected scope
> workspace and clicked search. Result: 0 hits -- strange.

> Robert
Is the file arm_install/include/cyg/io/serial.h or any parent folder
marked as derived (look at the properties)? By default, derived ressources
are excluded from search. In Eclipse 3.4 there is an option to include
derived ressources in the search.
If it still does not work then I guess it is a bug and you should file in
a bug report.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: file search [message #221980 is a reply to message #221959] Thu, 14 August 2008 14:38 Go to previous messageGo to next message
Robert Brusa is currently offline Robert BrusaFriend
Messages: 55
Registered: July 2009
Member
Axel Müller wrote:

> Is the file arm_install/include/cyg/io/serial.h or any parent folder
> marked as derived (look at the properties)? By default, derived ressources
> are excluded from search. In Eclipse 3.4 there is an option to include
> derived ressources in the search.
> If it still does not work then I guess it is a bug and you should file in
> a bug report.

> Axel

HEUREKA! It works. One has to check the "consider derived resources" and
then it finds the stuff. I simply had not checked the meaning of the term
"derived resources".

In fact, I still do not grasp the accurate meaning of this term. In my
case - the target file with the searched string was in a
sub-sub-...-folder of a folder in my current workspace. And the this
folder (with all its subfolders) was generated there by the ecos
configuration software. Derived resources? Certainly not derived by
Eclipse.. Anywhy - I am happy I now know how to do such searches. :-)

Robert
Re: file search [message #221985 is a reply to message #221980] Thu, 14 August 2008 15:03 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Robert wrote:

> Axel Müller wrote:

>> Is the file arm_install/include/cyg/io/serial.h or any parent folder
>> marked as derived (look at the properties)? By default, derived ressources
>> are excluded from search. In Eclipse 3.4 there is an option to include
>> derived ressources in the search.
>> If it still does not work then I guess it is a bug and you should file in
>> a bug report.

>> Axel

> HEUREKA! It works. One has to check the "consider derived resources" and
> then it finds the stuff. I simply had not checked the meaning of the term
> "derived resources".

> In fact, I still do not grasp the accurate meaning of this term. In my
> case - the target file with the searched string was in a
> sub-sub-...-folder of a folder in my current workspace. And the this
> folder (with all its subfolders) was generated there by the ecos
> configuration software. Derived resources? Certainly not derived by
> Eclipse.. Anywhy - I am happy I now know how to do such searches. :-)

> Robert
The "derived" option informs Eclipse that this folder consists of
generated resources that should not be directly edited. E.g. these
resources are automagically created for every build (or new build) and do
not go to CVS.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Allow save during build
Next Topic:Standard build issues
Goto Forum:
  


Current Time: Wed Sep 18 21:52:04 GMT 2024

Powered by FUDForum. Page generated in 0.03613 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top