ActionButton () { PopupState<Balloon> state = PopupState.forBalloon(); AnAction showStoragePathAction = new DumbAwareAction() { @Override public void actionPerformed(@NotNull AnActionEvent e) { if (!state.isRecentlyHidden()) manageStorageFileLocation(state); } }; Presentation presentation = new Presentation(ExecutionBundle.message("run.configuration.manage.file.location")); presentation.setIcon(GEAR_WITH_DROPDOWN_ICON); presentation.setDisabledIcon(GEAR_WITH_DROPDOWN_DISABLED_ICON); return new ActionButton(showStoragePathAction, presentation, ActionPlaces.TOOLBAR, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE); }