code: private String getProject(CmsObject cms, CmsFavoriteEntry entry) throws CmsException {
  
          String result = m_projectLabels.get(entry.getProjectId());
          if (result == null) {
              result = cms.readProject(entry.getProjectId()).getName();
              m_projectLabels.put(entry.getProjectId(), result);
          }
          return result;
      }
docs: Gets the project name for a favorite entry.
  
  @param cms the CMS context
  @param entry the favorite entry
  @return the project name for the favorite entry
  @throws CmsException if something goes wrong