Community
Participate
Working Groups
Build Identifier: M20100909-0800 SWTBotWorkbenchPart.getToolbarButtons() has the following code: --- PartPane obj = ((WorkbenchPartReference) partReference).getPane(); ToolBar toolbar = (ToolBar) obj.getToolBar(); --- But the implementation of getToolbar for EditorPane is: --- public Control getToolBar() { return null; } --- So obviously that can never find any. Something like this in SWTBotWorkbenchPart.getToolbarButtons() allows Editor toolbars to be accessed as well: --- final IToolBarManager toolbarMgr; if (partReference instanceof IEditorReference) { toolbarMgr = ((IEditorReference) partReference).getEditor(false).getEditorSite().getActionBars().getToolBarManager(); } else { toolbarMgr = ((IViewReference) partReference).getView(false).getViewSite().getActionBars().getToolBarManager(); } final ToolItem[] items = ((ToolBarManager) toolbarMgr).getControl().getItems(); --- No doubt there is a more succinct solution, but this does at least appear to work. Reproducible: Always