Bug 76496 [Dialogs] "Open Resource" folder sorting gets reversed
Build 20041013 1. Press ctrl+shift+r to open the "Open Resource" dialog. 2. Type "plugin.xlm" 3. Notice the typo, delete the last two characters, and then type "ml" to fix the typo. 4. The "In Folders:" area now shows with reversed sorting (!!).
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/ResourceListSelectionDialog.java
}
        if (oldPattern != null && (oldPattern.length() != 0)
                && oldPattern.endsWith("*") && patternString.endsWith("*")) { 
            int matchLength = oldPattern.length() - 1;
            if (patternString.regionMatches(0, oldPattern, 0, matchLength)) {
                 
                
                updateFilterThread.firstMatch = oldThread.firstMatch;
                updateFilterThread.lastMatch = oldThread.lastMatch;
                updateFilterThread.start();
                return;
            }
        }
        
        updateFilterThread.firstMatch = 0;
        updateFilterThread.lastMatch = descriptorsSize - 1;
        updateFilterThread.start();
    }
    /**
     * Use a binary search to get the first match for the patternString.
     * This method assumes the patternString does not contain any '?' 
     * characters and that it contains only one '*' character at the end
     * of the string.
     */
    private int getFirstMatch() {
        int high = descriptorsSize;
        int low = -1;
        boolean match = false;
        ResourceDescriptor desc = new ResourceDescriptor();
        desc.label = patternString.substring(0, patternString.length() - 1);