@Override
  protected boolean doIsSelected(AnActionEvent e) {
    final DataContext context = e.getDataContext();
    final Pair<MavenProject, String> desc = getTaskDesc(context);
    if (desc != null) {
      final RunManagerEx runManager = (RunManagerEx)getRunManager(context);
      if(runManager == null) return false;
      for (MavenBeforeRunTask each : runManager.getBeforeRunTasks(MavenBeforeRunTasksProvider.ID)) {
        if (each.isFor(desc.first, desc.second)) return true;
      }
    }
    return false;
  }
@Override
  protected boolean doIsSelected(AnActionEvent e)