void (final File fromRoot, final String parentPackageName, final Set<? super String> usedPackages, final Set<? super String> selfPackages) { if (isIgnoredName(fromRoot)) { return; } final File[] files = fromRoot.listFiles(); if (files != null) { myProgress.checkCanceled(); boolean includeParentName = false; for (File file : files) { if (file.isDirectory()) { String subPackageName = parentPackageName + (parentPackageName.isEmpty() ? "" : ".") + file.getName(); scanSources(file, subPackageName, usedPackages, selfPackages); } else { if (isSourceFile(file)) { includeParentName = true; scanSourceFile(file, usedPackages); } } } if (includeParentName) { selfPackages.add(myInterner.intern(parentPackageName)); } } }