void (@NotNull AnActionEvent e) { DataContext context = e.getDataContext(); SearchSession search = SearchSession.KEY.getData(context); boolean replaceMode = search != null && search.getFindModel().isReplaceState(); Presentation presentation = e.getPresentation(); presentation.setIcon(replaceMode ? AllIcons.General.ChevronDown : AllIcons.General.ChevronRight); presentation.setText(FindBundle.message(replaceMode ? "find.tooltip.switch.to.find" : "find.tooltip.switch.to.replace")); }