docs: public static List<WorkItem> collectIncremental(IResourceDelta delta) {
          // XXX deleted packages should be considered to remove markers
          List<WorkItem> result = new ArrayList<>();
          List<IResourceDelta> foldersDelta = new ArrayList<>();
          IResourceDelta affectedChildren[] = delta.getAffectedChildren();
          for (int i = 0; i < affectedChildren.length; i++) {
              IResourceDelta childDelta = affectedChildren[i];
              IResource child = childDelta.getResource();
              if (child.isDerived()) {
                  continue;
              }
              int childType = child.getType();
              int deltaKind = childDelta.getKind();
              if (childType == IResource.FILE) {
                  if ((deltaKind == IResourceDelta.ADDED || deltaKind == IResourceDelta.CHANGED) && Util.isJavaFile(child)) {
                      result.add(new WorkItem(child));
                  }
              } else if (childType == IResource.FOLDER) {
                  if (deltaKind == IResourceDelta.ADDED) {
                      result.add(new WorkItem(child));
                  } else if (deltaKind == IResourceDelta.REMOVED) {
                      // TODO should just remove markers....
                      IContainer parent = child.getParent();
                      if (parent instanceof IProject) {
                          // have to recompute entire project if one of root
                          // folders is removed
                          result.clear();
                          result.add(new WorkItem(parent));
                          return result;
                      }
                      result.add(new WorkItem(parent));
                  } else if (deltaKind != IResourceDelta.REMOVED) {
                      foldersDelta.add(childDelta);
                  }
              }
          }
  
          for (IResourceDelta childDelta : foldersDelta) {
              result.addAll(collectIncremental(childDelta));
          }
          return result;
      }