Community
Participate
Working Groups
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.
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.
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.
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.
*** Bug 77803 has been marked as a duplicate of this bug. ***
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>
*** Bug 326196 has been marked as a duplicate of this bug. ***
(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.
(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.
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.
(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).
(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.