Xcode: Selection should be preserved when filter is removed from Project Navigator

Originator:jalkut
Number:rdar://19859730 Date Originated:2/17/2015
Status:Open Resolved:
Product:Xcode Product Version:6.2
Classification:UI/Usability Reproducible:Always
 
Summary:
When the filter field is used to filter the contents of the Project Navigator, any selection made in the context of the filtered view should be preserved when removing the filter.

The obvious use case for this in the desire to locate a specific item within the navigator, but then wanting to focus on and work with that item in the context other (unfiltered) files in the hierarchy.

In my experience the selection will be preserved ONLY if the item in question happened to be visible as an uncollapsed item in the hierarchy before the filter was applied. This defeats the value of using the filter to dig out some item from deep in the collapsed hierarchy.

Steps to Reproduce:
You can reproduce this using any Xcode project, but for precision, I'll describe the steps starting from a scratch project based on an Xcode template:

1. Create a new, "Application" based Xcode project, called "Test".

2. Collapse the top-most project element in the Project Navigator, so that only the single "Test" xcodeproj item is visible in the Navigator.

3. Type "xib" into the filter box to filter the visual results to the hierarchy leading to MainMenu.xib

4. Click the MainMenu.xib file in the filtered results.

5. Click the "x" icon in the filter text field to remove the filter.


Expected Results:
The MainMenu.xib file should remain selected, and if necessary (for less contrived, longer/deeper project hierarchies), should be scrolled to visible in the outline view.

Actual Results:
Upon removing the filter, the previously selected item DOES remain expanded, so that it is theoretically visible (and in this contrived case, is in fact visible). However, the item does not remain selected, and possibly most importantly in less contrived situations, is not scrolled to visible. This makes hunting for the item a tedious chore of scrolling and visually scanning for the item in question.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!