void (ToolbarDecorator toolbarDecorator) { toolbarDecorator.setAddAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { final VirtualFile[] added = doAddItems(); if (added.length > 0) { setModified(true); } requestDefaultFocus(); setSelectedRoots(added); } }); super.addToolbarButtons(toolbarDecorator); }