Bug 157495 [Viewers] public subclasses of ViewerSorter should be changed to ViewerComparator
The following 3 classes in the ui should be changed to be subclasses of ViewerComparator: ResourceSorter WorkbenchViewerSorter FileViewerSorter This will involve deprecating old classes and methods, and adding new classes and methods for each of these classes and to classes that reference these sorter classes in their API.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
}
    /**
     * Converts the given selection into a form usable by the viewer,
     * where the elements are resources.
     */
    private StructuredSelection convertSelection(ISelection selection) {
        ArrayList list = new ArrayList();
        if (selection instanceof IStructuredSelection) {
            IStructuredSelection ssel = (IStructuredSelection) selection;
            for (Iterator i = ssel.iterator(); i.hasNext();) {
                Object o = i.next();
                IResource resource = null;
                if (o instanceof IResource) {
                    resource = (IResource) o;
                } else {
                    if (o instanceof IAdaptable) {
                        resource = (IResource) ((IAdaptable) o)
                                .getAdapter(IResource.class);
                    }
                }
                if (resource != null) {
                    list.add(resource);
                }
            }
        }
        return new StructuredSelection(list);
    }
    /* (non-Javadoc)
     * Method declared on IWorkbenchPart.
     */