Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336277

Summary: [client][search] Show multiple files with same name on Open Resource
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ClientAssignee: Kris De Volder <kdevolder>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kdevolder, mamacdon
Version: 0.2Flags: john.arthorne: review+
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2011-02-03 14:55:33 EST
0.2 M5

Create a workspace containing two files called "script.js"
In the navigator, click "Open Resource", type "script.js"

-> Only one result is shown. If I wanted the other file with the same name, there is no way to find/open it.

It should show the full path for any file that has duplicates in the search result (like Open Resource in desktop Eclipse).
Comment 1 Kris De Volder CLA 2012-01-24 19:33:35 EST
I've got a fix here that I'm going to submit a 'pull request' for shortly.

It looks to me that, in fact, all results, even multiple files with same name where already being shown. However... it seems to take quite a bit of time before newly created files get added to the search index, so in initial testing I thought that it was not showing the duplicates.

I am *not* fixing the search indexing issues.

What I am fixing is the UI, so that paths are added for those entries that are duplicated... so we can at least tell which file is which.
Comment 2 Kris De Volder CLA 2012-01-24 20:01:07 EST
I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.

The current tip of my fix branch is here:

https://github.com/kdvolder/orion.client/commit/b76946505ba9f60af1aea2020d59a51b1021c6ff

The branch itself is here:
https://github.com/kdvolder/orion.client/tree/Bug_336277_paths_in_open_resource_dialog

The branch is fully merged with master branch on orion main git repo.
Comment 3 John Arthorne CLA 2012-01-25 15:46:53 EST
I will take a look at reviewing this one.
Comment 4 John Arthorne CLA 2012-01-27 14:46:28 EST
Thanks Kris, I have released this:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=bc39b867e55372e8f6e76842d62d48caf0b6391a

I fixed two issues:

- With long paths this could cause the file paths to be wider than the search popup. I switched to floating width rather than fixed width, and now it seems to grow to fit the content nicely. Verified on Chrome 16, Firefox 9, and IE 9.

- With this in place, it really looked goofy that we didn't sort the search results by name. If you have two files with the same name they could appear in quite different places in the list. I added sort by name for these places where we are showing results listed by file name. See bug 370000 for that.