site.config.focus(currentLayer);
}
}
private void createToolBar() {
IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
mgr.add(new GroupMarker(CHOOSER_MENU_GROUP));
mgr.appendToGroup(CHOOSER_MENU_GROUP, new ControlContribution("none"){ //$NON-NLS-1$
protected Control createControl( Composite parent ) {
configChooser = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
// update the chooser with the currently selected layer
//
updateChooser();
configChooser.addSelectionListener(chooserListener);
// setFocus();
// updateChooser();
/*
* XXX Justin what are you doing?
* PlatformUI.getWorkbench().getDisplay().asyncExec( new Runnable() { public
* void run() { chooserListener.widgetSelected(null); } } );
*/
return configChooser;
}
protected int computeWidth( Control control ) {
return 125;
}
});
mgr.add(new GroupMarker(STYLE_MENU_GROUP));
mgr.appendToGroup(STYLE_MENU_GROUP, new Separator());
mgr.appendToGroup(STYLE_MENU_GROUP, applyAction);
mgr.appendToGroup(STYLE_MENU_GROUP, cancelAction);
mgr.add(new GroupMarker(CONFIG_MENU_GROUP));
mgr.add(new Separator());
}