Bug 179830 - [Navigator] Add Search... context menu item to Package Explorer and Navigator
Summary: [Navigator] Add Search... context menu item to Package Explorer and Navigator
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Search-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 77803 326196 (view as bug list)
Depends on: 241895
Blocks: 443855
  Show dependency tree
 
Reported: 2007-03-28 15:56 EDT by Lawrence Smith CLA
Modified: 2014-09-25 11:25 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lawrence Smith CLA 2007-03-28 15:56:05 EDT
As a Web developer using Eclipse, I'd like to see the Package Explorer and Navigator add a context menu item for "Search..." that would default to "File Search" scoped to the "Selected Resource".  When doing Web development I tend to do a lot of file searching and Eclipse likes to default to search the workspace unless you do the gestures just right.

Thanks.
Comment 1 Juergen Weber CLA 2010-04-19 11:12:51 EDT
Currently there is the counter-intuitive behaviour: you select a project in Package Explorer, then Search -> File -> Enclosing projets. This search is done in the project that contains the file in the editor and not the project you selected in Package Explorer.
To search in another project, it would be great to have a search context entry in Package Explorer.
Comment 2 Dani Megert CLA 2010-04-19 11:23:52 EDT
re comment 1: I cannot reproduce that. Maybe the active part was the editor when you did this. If not, please file a separate bug report against Platform Search with detailed steps to reproduce.
Comment 3 Markus Keller CLA 2010-09-01 10:06:14 EDT
We won't show such an item by default, but we could reconsider if bug 241895 is implemented and we can make the item invisible by default.
Comment 4 Markus Keller CLA 2010-09-01 10:07:19 EDT
*** Bug 77803 has been marked as a duplicate of this bug. ***
Comment 5 Markus Keller CLA 2010-09-01 14:03:02 EDT
*** Bug 77803 has been marked as a duplicate of this bug. ***
Comment 6 Markus Keller CLA 2010-09-01 14:05:53 EDT
People who want this context menu item now can write a dummy plug-in with the following extension in the plugin.xml and then install that into their host:

   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="true"
            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
         <command
               commandId="org.eclipse.search.ui.openFileSearchPage"
               label="File Search..."
               style="push">
            <visibleWhen
                  checkEnabled="true">
            </visibleWhen>
         </command>
      </menuContribution>
   </extension>
Comment 7 Dani Megert CLA 2010-09-27 03:29:43 EDT
*** Bug 326196 has been marked as a duplicate of this bug. ***
Comment 8 Remy Suen CLA 2010-09-27 06:31:13 EDT
(In reply to comment #1)
> Currently there is the counter-intuitive behaviour: you select a project in
> Package Explorer, then Search -> File -> Enclosing projets. This search is done
> in the project that contains the file in the editor and not the project you
> selected in Package Explorer.

Was your 'Package Explorer' detached? If that was the case, when you went back to the main workbench window to click on 'Search', the active part likely was swapped to the editor which would have caused such a change in your search scope.
Comment 9 Juergen Weber CLA 2011-07-14 05:21:36 EDT
(In reply to comment #8)
> (In reply to comment #1)
> > Currently there is the counter-intuitive behaviour: you select a project in
> > Package Explorer, then Search -> File -> Enclosing projets. This search is done
> > in the project that contains the file in the editor and not the project you
> > selected in Package Explorer.
> 
> Was your 'Package Explorer' detached? If that was the case, when you went back
> to the main workbench window to click on 'Search', the active part likely was
> swapped to the editor which would have caused such a change in your search
> scope.

This still does not work in Indigo 20110615-0604.
Package Explorer is in a toplevel window (XP, dual monitor setup) on the second monitor, I select a package, then click directly Search->File in the Eclipse menu on the main monitor, Selected resources and Enclosing projects are greyed out.
I consequence I have to use another tool (jEdit) to search in files, so this is not enhancement but rather major loss of function.
Comment 10 Dani Megert CLA 2011-07-14 05:36:08 EDT
The problem you are facing is a general issue with detached views (not just when it comes to Search). Please see bug 100909 for details.

This enhancement is about adding a context menu. Since it was never there you can't claim it's a loss of function.
Comment 11 Markus Keller CLA 2011-07-14 05:45:44 EDT
(In reply to comment #9)
> Package Explorer is in a toplevel window...

If you have 2 workbench windows (Window > New Window), then of course you have to use the menu bar of the window that contains the selection.

> I consequence I have to use another tool (jEdit) to search in files, so this is
> not enhancement but rather major loss of function.

Just use the shortcut (Ctrl+H).
Comment 12 Juergen Weber CLA 2011-07-14 06:58:20 EDT
(In reply to comment #11)
> (In reply to comment #9)
> > Package Explorer is in a toplevel window...
> 
> If you have 2 workbench windows (Window > New Window), then of course you have
> to use the menu bar of the window that contains the selection.

I don't have two workbench windows, it's rather a toplevel window (view ?) on the second monitor displaying packing explorer (and there is no menu bar on this window)

> Just use the shortcut (Ctrl+H).

Ctrl+H works. But you have to get the idea to click the left arrow beside the tab headers to see the file search tab.