docs: private static void mapResource(WorkItem resource, Map<IProject, List<WorkItem>> projectsMap, boolean checkJavaProject) {
  
          IProject project = resource.getProject();
          if (checkJavaProject && !ProjectUtilities.isJavaProject(project)) {
              // non java projects: can happen only for changesets
              return;
          }
          List<WorkItem> resources = projectsMap.get(project);
          if (resources == null) {
              resources = new ArrayList<>();
              projectsMap.put(project, resources);
          }
          // do not need to check for duplicates, cause user cannot select
          // the same element twice
          if (!containsParents(resources, resource)) {
              resources.add(resource);
          }
      }