if ( !( activity instanceof WorkbenchActivity ) ) {
return;
}
final WorkbenchActivity wbActivity = (WorkbenchActivity) activity;
final ToolBar toolBar = wbActivity.getToolBar();
if ( toolBar == null ) {
return;
}
final ToolBar filteredToolBar = filterToolBarItemsByPermission(toolBar);
if ( !filteredToolBar.getItems().isEmpty() ) {
workbenchContextItems.put(place, filteredToolBar);
view.addToolBar( filteredToolBar );
}
}