void (@NotNull final AnActionEvent e) { super.update(e); ImageComponentDecorator decorator = e.getData(ImageComponentDecorator.DATA_KEY); e.getPresentation().setEnabled(decorator != null && decorator.isEnabledForActionPlace(e.getPlace())); e.getPresentation().setText(isSelected(e) ? IdeBundle.message("action.text.hide.chessboard") : IdeBundle.message("action.text.show.chessboard")); }