docs: public static Map<IProject, List<WorkItem>> getResourcesPerProject(IStructuredSelection structuredSelection) {
          Map<IProject, List<WorkItem>> projectsMap = new HashMap<>();
          for (Iterator<?> iter = structuredSelection.iterator(); iter.hasNext();) {
              Object element = iter.next();
              WorkItem workItem = getWorkItem(element);
              if (workItem == null) {
                  IWorkingSet wset = Util.getAdapter(IWorkingSet.class, element);
                  if (wset != null) {
                      mapResources(wset, projectsMap);
                      continue;
                  }
  
                  // Support for active changesets
                  ChangeSet set = Util.getAdapter(ChangeSet.class, element);
                  for (WorkItem change : getResources(set)) {
                      mapResource(change, projectsMap, true);
                  }
                  continue;
              }
              mapResource(workItem, projectsMap, false);
          }
          return projectsMap;
      }