Bug 23867 - Search..Find in Files defaults to Directories
Summary: Search..Find in Files defaults to Directories
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: 5.5
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-15 20:42 UTC by Neal
Modified: 2016-06-30 14:18 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 23867 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Neal 2014-10-15 20:42:42 UTC
Michael - as I pointed out to you at Evolve - just wanted to document this case for you.  Select a project in the solution then click Search/Find in Files and it defaults to searching by directories - should be "current project" 

FYI

Neal
Comment 1 Rajneesh Kumar 2014-10-16 01:41:56 UTC
I have checked this issue and able to reproduce this issue. To reproduce this issue I have followed the steps mentioned below:

1. Create any application in XS
2. Right click on project in solution and choose Find in Files option 
3. A Find in Files window will appear
4. Observe that in the "Look In" default option is 'Directories' for searching

Actual result: Defaults to searching by 'Directories'

Aspected result: Defaults to searching should be 'Current project'

Screencast:  http://www.screencast.com/t/wmUbsmyhpaf

Environment Info:

=== Xamarin Studio ===

Version 5.5 (build 227)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/47db868)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000019

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version: 1.10.0.13 (Business Edition)

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.iOS ===

Version: 8.2.0.193 (Business Edition)
Hash: 959c1e4
Branch: 
Build date: 2014-10-03 00:25:37-0400

=== Build Information ===

Release ID: 505000227
Git revision: 7b721eeec7a2fa4c4f4de0ecd2aed4dc25edac95
Build date: 2014-10-02 15:53:38-04
Xamarin addins: 99ed56b428b31eba1efaace4d82188d6f334e6ca

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Lluis Sanchez 2014-11-26 04:45:56 UTC
The problem I see with this change is that we can't do the same when right-clicking on a project folder. We don't have an option for looking for project files in a specific folder. /cc Hilke.
Comment 3 Hylke Bons 2014-11-26 05:38:58 UTC
@lluis can't we? Context menus are all about context. :) Is there some technical reason why it can't happen?

I think this change makes sense.  You would expect the scope to match if you go to Find in Files through the (project) context menu. The same should happen for the whole Solution and directories.

In the new design, we're also searching a Selection by default when you have text highlighted, so everything is going more contextual, so matching this behaviour everywhere is more consistent.
Comment 4 Lluis Sanchez 2014-11-26 06:23:22 UTC
Ok, maybe I didn't explain myself very well.

What the Find in Files command does when used on a project or project folder is to show the Find in Files dialog pre-configured to do the search in that project folder.

When using the command on a project, we can use the Current Project scope. That makes sense. However, when used on a project folder, there isn't any option we can set to limit the search to a specific directory of the project. The current dialog only allows searching on all project files, or searching files in a directory (which may or may not belong to the project). The new design also doesn't consider this scenario, hence my cc.

Another option is to just make the project directory filter implicit, that is, not show it as an option in the find dialog, but use it when doing the search.
Comment 5 Hylke Bons 2014-11-26 07:13:39 UTC
Thanks for explaining.

Searching a project folder is more specific than a project, so I don't think we have to show both Project _and_ project selected. Prefilling the folder should be good enough. Searching a folder may or not be inside a project, but the user has already made that choice beforehand.

Actually in my design I anticipated only folders _inside_ projects.
Hope that makes sense. :)
Comment 6 Lluis Sanchez 2014-11-26 09:17:48 UTC
> Searching a project folder is more specific than a project,
> so I don't think we have to show both Project _and_ project selected

I don't understand what you mean.

> Prefilling the folder should be good enough. Searching a folder may or
> not be inside a project, but the user has already made that choice beforehand

The folder field is only available when "Directories" scope is selected, and this scope includes files which are not explicitly added to the project.
And yes, there are cases in which I want to find such files when using the context menu of a solution, project or project folder.
Comment 7 Hylke Bons 2014-11-26 09:37:53 UTC
We're probably not talking about the same thing. :)

I'll add all possible entry points to the wireframes to make sure we're on the page and we can review.