@Override
  public void update(@NotNull AnActionEvent e) {
    final Project project = e.getProject();
    final RunContentDescriptor contentDescriptor = e.getData(LangDataKeys.RUN_CONTENT_DESCRIPTOR);
    final Presentation presentation = e.getPresentation();
    if (contentDescriptor != null && project != null) {
      final ProcessHandler processHandler = contentDescriptor.getProcessHandler();
      final RunningApplicationUpdater updater = findUpdater(project, processHandler);
      if (updater != null) {
        presentation.setEnabled(processHandler.isStartNotified() && !processHandler.isProcessTerminating()
                                && !processHandler.isProcessTerminated());
        presentation.setText(updater.getDescription());
      }
      else {
        presentation.setEnabled(false);
      }
      presentation.setVisible(true);
      return;
    }

    final List<RunningApplicationUpdater> updaters = getAvailableUpdaters(project);
    final boolean enable = !updaters.isEmpty();
    presentation.setEnabledAndVisible(enable);
    if (updaters.size() == 1) {
      presentation.setText(updaters.get(0).getDescription());
    }
    else {
      presentation.setText(ExecutionBundle.messagePointer("action.presentation.UpdateRunningApplicationAction.text"));
    }
  }
@Override
  public void update(@NotNull AnActionEvent e)