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
protected void fillContextMenu(IMenuManager menu) {
        IStructuredSelection selection = (IStructuredSelection) getViewer()
                .getSelection();
        getActionGroup().setContext(new ActionContext(selection));
        getActionGroup().fillContextMenu(menu);
    }
    /*
     * @see IResourceNavigatorPart
     * @since 2.0
     */
    public FrameList getFrameList() {
        return frameList;
    }
    /** 
     * Returns the initial input for the viewer.
     * Tries to convert the page input to a resource, either directly or via IAdaptable.
     * If the resource is a container, it uses that.
     * If the resource is a file, it uses its parent folder.
     * If a resource could not be obtained, it uses the workspace root.
     * 
     * @since 2.0
     */
    protected IAdaptable getInitialInput() {
        IAdaptable input = getSite().getPage().getInput();
        if (input != null) {
            IResource resource = null;
            if (input instanceof IResource) {
                resource = (IResource) input;
            } else {
                resource = (IResource) input.getAdapter(IResource.class);