public void extractViewActivities()

in src/net/sourceforge/transparent/CCaseViewsManager.java [312:348]


  public void extractViewActivities() {
    if (CCaseConfig.getInstance(myProject).isOffline()) return;

    //  Sometimes users configure content roots so that several of them correspond
    //  to the same view. Thus we should not repeat the command for the same view
    //  more than one time.
    HashSet<String> completedViews = new HashSet<>();

    activitiesMap.clear();
    for (ViewInfo info : viewsMapByRoot.values()) {
      if (info.isUcm && !completedViews.contains(info.tag)) {
        String output = TransparentVcs
          .cleartoolWithOutput(LIST_ACTIVITY_CMD, ME_ONLY_SWITCH, OBSOLETE_SWITCH, VIEW_SWITCH, info.tag, FORMAT_SWITCH,
                               LIST_ACTIVITY_FORMAT);
        if (TransparentVcs.isServerDownMessage(output)) return;

        completedViews.add(info.tag);
        if (!StringUtil.isEmptyOrSpaces(output)) TransparentVcs.LOG.debug(output);

        //  Reset values so that we can always determine that we did not manage
        //  to correctly parse "lsactivity" command's output.
        info.currentActivity = null;

        String[] lines = LineTokenizer.tokenize(output, false);
        for (String line : lines) {
          ActivityInfo actInfo = parseActivities(line);
          if (actInfo != null) //  successful parse?
          {
            activitiesMap.put(actInfo.name, actInfo);
            associateActivityWithView(actInfo);
          }
        }
      }
    }

    logActivities();
  }