Xcode should always show shortest path to file in jump bar

Number:rdar://37159105 Date Originated:02-Feb-2018 06:34 pm
Status:Open Resolved:
Product:Developer Tools Product Version:9.2 (9C40b)
Classification:UI/Usability Reproducible:Always
Sometimes there are multiple paths through Xcode workspaces and projects to show a path to a file in the Jump Bar. In such cases Xcode usually uses the first path, but the user experience would be better if it used the shortest path.

The situation occurs when using nested Xcode projects matching the dependency tree, but then having a workspace containing the flattened set of projects for easy access.

You can see an example in the screen shot in the attached folder. At the top is what Xcode does when using Quick Open or command clicking to reach a file. At the bottom is the shortest path, which is much easier to read. In this example it’s not too bad, but we have deeper projects where the jump bar becomes very awkward to use because everything is collapsed. The higher up relationship between the projects is not very interesting to show in the jump bar where space is limited.

Steps to Reproduce:
1. Open MyWorkspace in the attached folder.
2. Use Quick Open to open MyFramework.h
3. Look in the Jump Bar

Expected Results:
The path in the Jump Bar should be

My Framework (project) > My Framework > My Framework.h

Actual Results:
The path is

My App (project) > My App > My Framework (project) > My Framework > My Framework.h

9.2 (9C40b)

When you use the Reveal in Project Navigator command, Xcode shows the shortest path to the file in the project navigator, so the path finding code is already in there.


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!