Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 360468
Collapse All | Expand All

(-)a/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java (+16 lines)
Lines 69-74 Link Here
69
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
69
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
70
import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
70
import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
71
import org.eclipse.ui.internal.ide.model.ResourceFactory;
71
import org.eclipse.ui.internal.ide.model.ResourceFactory;
72
import org.eclipse.ui.internal.quickaccess.CamelUtil;
72
import org.eclipse.ui.model.WorkbenchLabelProvider;
73
import org.eclipse.ui.model.WorkbenchLabelProvider;
73
import org.eclipse.ui.statushandlers.StatusManager;
74
import org.eclipse.ui.statushandlers.StatusManager;
74
75
Lines 470-475 Link Here
470
				int s2Dot = s2.lastIndexOf('.');
471
				int s2Dot = s2.lastIndexOf('.');
471
				String n1 = s1Dot == -1 ? s1 : s1.substring(0, s1Dot);
472
				String n1 = s1Dot == -1 ? s1 : s1.substring(0, s1Dot);
472
				String n2 = s2Dot == -1 ? s2 : s2.substring(0, s2Dot);
473
				String n2 = s2Dot == -1 ? s2 : s2.substring(0, s2Dot);
474
				
475
				// If we are doing a camel case search, put shorter camel cases first (Bug 360468)
476
				if (n1.length() > 0 && Character.isUpperCase(n1.charAt(0)) && n2.length() > 0 && Character.isUpperCase(n2.charAt(0))){
477
					int camelCase1 = CamelUtil.getCamelCase(n1).length();
478
					int camelCase2 = CamelUtil.getCamelCase(n2).length();
479
					if (camelCase1 > 0 && camelCase2 > 0){
480
						if (camelCase1 < camelCase2){
481
							return -1;
482
						}
483
						if (camelCase1 > camelCase2){
484
							return 1;
485
						}
486
					}
487
				}
488
				
473
				int comparability = collator.compare(n1, n2);
489
				int comparability = collator.compare(n1, n2);
474
				if (comparability != 0)
490
				if (comparability != 0)
475
					return comparability;
491
					return comparability;

Return to bug 360468