Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Search opens in java search, not file search.(Why is it that search dialog opens in java search?)
Search opens in java search, not file search. [message #1048270] Wed, 24 April 2013 08:40 Go to next message
Florian F is currently offline Florian F
Messages: 9
Registered: February 2011
Junior Member
(removed, wrong forum)

[Updated on: Wed, 24 April 2013 08:43]

Report message to a moderator

Re: Search opens in java search, not file search. [message #1048491 is a reply to message #1048270] Wed, 24 April 2013 14:44 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3189
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 04/24/2013 02:40 AM, Florian F wrote:
> Hello,
>
> There is one behaviour of Eclipse that is annoying. When I press
> Ctrl-H, it opens the search dialog, but it also switches to the "Java
> Search" tab. As a result it happens regularily that I search for some
> text, and I don't find it because it did a "java search" instead.
>
> Most of the time, I do a text search. So I would like ctrl-H to open
> the search dialog in file search tabl, or in the same tab as it opened
> last time.
>
> The action for "ctrl-H" is "Open search dialog". Is there a good reason
> to assume java search is what is wanted?
> Is there a setting that can disable this behaviour? Or change the
> default tab to file search?
>
> For time being, I customise the search dialog to remove the java search
> tab. But I also need to do a java search sometimes.
>
> Your comments are welcome.

That dialog is configurable. You can change it to "file search" or other
modes, what I do.
Re: Search opens in java search, not file search. [message #1048609 is a reply to message #1048491] Wed, 24 April 2013 18:16 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2266
Registered: July 2009
Senior Member
The initial pane is also affected by the perspective you are in, as well as what is selected when you open the dialog. As Russell mentioned, you can configure the dialog to simply not show tabs you're never interested in.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Search opens in java search, not file search. [message #1049041 is a reply to message #1048609] Thu, 25 April 2013 09:14 Go to previous messageGo to next message
Florian F is currently offline Florian F
Messages: 9
Registered: February 2011
Junior Member
I have seen you can remove the tabs you don't like. But can you define the default tab?

In the meantime I noticed that the tab that opens depends on where the focus is when you hit ctrl-H. If the focus is on a java file, it opens the Java Search. If the focus is on the search results, it open the File Search.

So, is it possible to specify that for a java file, the tab to open is still the file search?
Re: Search opens in java search, not file search. [message #1049267 is a reply to message #1049041] Thu, 25 April 2013 15:42 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3189
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 4/25/2013 3:14 AM, Florian F wrote:
> I have seen you can remove the tabs you don't like. But can you define
> the default tab?
>
> In the meantime I noticed that the tab that opens depends on where the
> focus is when you hit ctrl-H. If the focus is on a java file, it opens
> the Java Search. If the focus is on the search results, it open the
> File Search.
>
> So, is it possible to specify that for a java file, the tab to open is
> still the file search?

It's probably not very sophisticated of me, but I don't find the Java
search and the other tabs all that interesting. I always remove pretty
much all the tabs including the Java one and just use File Search. This
is probably because a) I only write Java code, b) putting *.java in File
name patterns turns it into a Java search as far as I care, and c) I'm
just an old command-line guy who sees this as a slightly more
Eclipse-convenient way of doing what I'd otherwise do:

project-root $ find . -name '*.java' -exec fgrep -H searchstring {} \;

Some day I should sharpen this saw, but it's been over 7 years and
whatever this approach isn't doing for me hasn't irked me yet.

Cheers!
Re: Search opens in java search, not file search. [message #1049791 is a reply to message #1049267] Fri, 26 April 2013 09:16 Go to previous messageGo to next message
Florian F is currently offline Florian F
Messages: 9
Registered: February 2011
Junior Member
Yes, keeping only the File Search is what I ended up doing. And ctrl-shift-G does in fact everything I would need Java Search for.

It just happened that I reinstalled Eclipse and I had Java Search available again and it promptly interferred with my searches. It should be less intrusive out of the box.

I use find and grep on occasions, but my Eclipse runs on windows. And with grep you cannot just click the match to open the corresponding file.
Re: Search opens in java search, not file search. [message #1049923 is a reply to message #1049791] Fri, 26 April 2013 13:05 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3189
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 04/26/2013 03:16 AM, Florian F wrote:
> Yes, keeping only the File Search is what I ended up doing. And
> ctrl-shift-G does in fact everything I would need Java Search for.
>
> It just happened that I reinstalled Eclipse and I had Java Search
> available again and it promptly interferred with my searches. It should
> be less intrusive out of the box.
>
> I use find and grep on occasions, but my Eclipse runs on windows. And
> with grep you cannot just click the match to open the corresponding file.

Eclipse is a lot of wonderfully useful things, but the two that stand
the tallest in my book are:

- Ctrl Shift G
- Refactoring
Previous Topic:Remote Debugging Win7
Next Topic:unzipping eclipse ide for Java Developers
Goto Forum:
  


Current Time: Wed Sep 17 09:43:02 GMT 2014

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

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