Bug 168757 [KeyBindings] Add keybinding for 'collapse all' button in Navigator & Package Explorer
Just a nice to have - would be very handy to assign something like CTRL-minus to the 'collapse all' button in Navigator and Package Explorer views (really, anything w/ a tree view and than button).
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
enabled);
        
        if (enabled) {
            IEditorPart editor = getSite().getPage().getActiveEditor();
            if (editor != null) {
                editorActivated(editor);
            }
        }
    }
    /**
     * Sets the resource sorter.
     * 
     * @param sorter the resource sorter
     * @since 2.0
     * @deprecated as of 3.3, use {@link ResourceNavigator#setComparator(ResourceComparator)}
     */
    public void setSorter(ResourceSorter sorter) {
        TreeViewer viewer = getTreeViewer();
        ViewerSorter viewerSorter = viewer.getSorter();
        viewer.getControl().setRedraw(false);
        if (viewerSorter == sorter) {
            viewer.refresh();
        } else {
            viewer.setSorter(sorter);
        }
        viewer.getControl().setRedraw(true);
        settings.put(STORE_SORT_TYPE, sorter.getCriteria());
        
        updateActionBars((IStructuredSelection) viewer.getSelection());
    }