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
if (element != null) {
                        list.add(element);
                    }
                }
                viewer.setSelection(new StructuredSelection(list));
            }
        }
    }
    /**
     * Restores the linking enabled state.
     */
    private void restoreLinkingEnabled() {
        Integer val = memento
                .getInteger(IWorkbenchPreferenceConstants.LINK_NAVIGATOR_TO_EDITOR);
        if (val != null) {
            linkingEnabled = val.intValue() != 0;
        }
    }
    /**	
     * @see ViewPart#saveState
     */
    public void saveState(IMemento memento) {
        TreeViewer viewer = getTreeViewer();
        if (viewer == null) {
            if (this.memento != null) {
				memento.putMemento(this.memento);
			}
            return;
        }