public static void collectVariables(Set<? super String> usedVariables, Element classpathElement, final String rootPath) {
    for (Element element : classpathElement.getChildren(EclipseXml.CLASSPATHENTRY_TAG)) {
      String path = element.getAttributeValue(EclipseXml.PATH_ATTR);
      if (path == null) {
        continue;
      }

      String kind = element.getAttributeValue(EclipseXml.KIND_ATTR);
      if (Comparing.strEqual(kind, EclipseXml.VAR_KIND)) {
        createEPathVariable(path, 0);
        String srcPath = element.getAttributeValue(EclipseXml.SOURCEPATH_ATTR);
        if (srcPath != null) {
          createEPathVariable(srcPath, srcVarStart(srcPath));
        }
      }
      else if (Comparing.strEqual(kind, EclipseXml.SRC_KIND) || Comparing.strEqual(kind, EclipseXml.OUTPUT_KIND)) {
        EclipseProjectFinder.LinkedResource linkedResource = EclipseProjectFinder.findLinkedResource(rootPath, path);
        if (linkedResource != null && linkedResource.containsPathVariable()) {
          usedVariables.add(linkedResource.getVariableName());
        }
      }
    }
  }
public static void collectVariables(Set<? super String> usedVariables, Element classpathElement, final String rootPath)