private Map getAllPlaceIds()

in server/src/jetbrains/buildServer/staticUIExtensions/PagePlacesCollector.java [46:70]


  private Map<String, PlaceId> getAllPlaceIds() {
    Map<String, PlaceId> res = new TreeMap<>(String::compareToIgnoreCase);
    try {
      Method registeredPlaceIdsMethod = PagePlacesEx.class.getMethod("getRegisteredPlaceIds");
      Object list = registeredPlaceIdsMethod.invoke(myPagePlaces);
      if (list instanceof List) {
        for (Object e: (List)list) {
          if (e instanceof PlaceId) {
            PlaceId id = (PlaceId) e;
            if (!isCustomTab(id)) {
              res.put(id.getAnchor(), id);
            }
          } else {
            LOG.debug("Unexpected object type returned by the PagePlacesEx.getRegisteredPlaceIds() method: " + e.getClass().getName());
          }
        }
      }
    } catch (NoSuchMethodException e) {
      // this version of TeamCity does not allow to register a place id
    } catch (Exception e) {
      LOG.debug("Could not obtain a list of registered PlaceIds", e);
    }

    return res;
  }