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

Bug 211977

Summary: [Dialogs] Open Resource does not sort entries correctly
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: helpwanted
Version: 3.4   
Target Milestone: 3.4 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard: hasPatch
Attachments:
Description Flags
Fix none

Description Markus Keller CLA 2007-12-05 05:13:22 EST
I20071204-1547

I opened the Open Resource dialog and types "plugin.xml". The list of matches contained:

plugin.xml - org.eclipse.search.tests
plugin.xml - org.eclipse.search

The sorter should make sure that shorter entries are shown before longer entries with the same prefix, i.e.:

plugin.xml - org.eclipse.search
plugin.xml - org.eclipse.search.tests
Comment 1 Markus Keller CLA 2007-12-06 05:30:38 EST
Created attachment 84621 [details]
Fix

It's interesting that this works fine when FilteredResourcesSelectionDialog.getItemsComparator() uses a java.text.Collator but fails with the ICU collator.

Nevertheless, the correct solution is to compare paths by segments.
Comment 2 Tod Creasey CLA 2008-02-06 16:11:01 EST
Thanks for the patch Markus - this can go into M6.
Comment 3 Tod Creasey CLA 2008-02-12 08:27:34 EST
Patch released for build >20080212
Comment 4 Tod Creasey CLA 2008-03-25 09:13:50 EDT
Verified in I20080325-0100