DefaultActionGroup () { DefaultActionGroup defaultGroup = super.createToolbarActions(); if (myDeletableFiles) { AnAction deleteAction = new DeleteAction(null, null, IconUtil.getRemoveIcon()) { @Override public void actionPerformed(@NotNull AnActionEvent e) { super.actionPerformed(e); myFileList.rebuildTree(); } }; ActionUtil.mergeFrom(deleteAction, IdeActions.ACTION_DELETE); deleteAction.registerCustomShortcutSet(getFileList(), null); defaultGroup.add(deleteAction); } return defaultGroup; }