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

Bug 539670

Summary: [regression][Open Resource] dialog results not sorted by project name
Product: [Eclipse Project] Platform Reporter: Reto Hoehener <reto.hoehener>
Component: IDEAssignee: Andrey Loskutov <loskutov>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: lbullen, loskutov, michael.keppler, mistria, reto.hoehener
Version: 4.8   
Target Milestone: 4.10 M1   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=525974
https://bugs.eclipse.org/bugs/show_bug.cgi?id=532621
https://git.eclipse.org/r/130338
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=a8b84b39af6719611bf70577cbea054a7df0781c
Whiteboard:

Description Reto Hoehener CLA 2018-10-01 02:53:39 EDT
Results were sorted in Oxygen.

We have 100+ projects in our workspace, each containing identically named files. If the results are not sorted alphabetically by project name, it is faster to drill down the project explorer than to use the "Open Resource" dialog.
Comment 1 Michael Keppler CLA 2018-10-01 10:01:09 EDT
For reproduction: Search "pom.xml" in the Open resource dialog of a workspace with many maven projects. Those seem completely unordered.
Comment 2 Andrey Loskutov CLA 2018-10-03 03:24:54 EDT
I guess related to bug 525974 changes.
@Lucas, can you please check this?
Comment 3 Mickael Istria CLA 2018-10-03 03:42:28 EDT
(In reply to Andrey Loskutov from comment #2)
> I guess related to bug 525974 changes.
> @Lucas, can you please check this?

Lucas is back to university and is not likely to contribute to Eclipse Platform until he's finished university and hired to work on Eclipse IDE.
Comment 4 Mickael Istria CLA 2018-10-03 03:47:13 EDT
FilteredResourceSelectionDialog.getItemsComparator() could be the culprit here. It would be nice to migrate it to a fresher Comparator.comparing(...).thenComparing(...) API for easier maintenance.
Comment 5 Andrey Loskutov CLA 2018-10-03 04:53:30 EDT
Both changes to bug 532621 and bug 525974 were related here. I have a trivial fix.
Comment 6 Eclipse Genie CLA 2018-10-03 04:56:34 EDT
New Gerrit change created: https://git.eclipse.org/r/130338
Comment 8 Andrey Loskutov CLA 2018-10-04 04:18:47 EDT
Verified with I20181003-2215