JPanel (@NotNull ListTableModel<?> tableModel) { return ToolbarDecorator .createDecorator(new TableView<>(tableModel)) .disableUpDownActions() .disableAddAction() .disableRemoveAction() .setToolbarPosition(ActionToolbarPosition.RIGHT) .addExtraAction(new DumbAwareActionButton(DiagnosticBundle.message("event.watcher.clear.button.title"), AllIcons.Actions.GC) { @Override public void actionPerformed(@NotNull AnActionEvent e) { Objects.requireNonNull(EventWatcher.getInstanceOrNull()) .reset(); setItems(tableModel, List.of()); } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } }).createPanel(); }