});
fModeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
Object selection = ((IStructuredSelection) event.getSelection()).getFirstElement();
CoolBarMode mode = (CoolBarMode) selection;
fPreferences.putInteger(DefaultPreferences.TOOLBAR_MODE, mode.ordinal());
}
});
fModeViewer.setInput(CoolBarAdvisor.CoolBarMode.values());
fModeViewer.setSelection(new StructuredSelection(CoolBarMode.values()[fPreferences.getInteger(DefaultPreferences.TOOLBAR_MODE)]));