PackageDependenciesNode (VirtualFile file, PackageDependenciesNode lastParent) { ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); if (file == null || !file.isValid()) return null; if (indicator != null) { update(indicator, false, ((double)myScannedFileCount++) / myTotalFileCount); } boolean isMarked = myMarker != null && myMarker.isMarked(file); if (isMarked) myMarkedFileCount++; if (isMarked || myAddUnmarkedFiles) { PackageDependenciesNode dirNode = !myCompactEmptyMiddlePackages && lastParent != null ? lastParent : getFileParentNode(file); if (myShowFiles) { FileNode fileNode = new FileNode(file, myProject, isMarked); dirNode.add(fileNode); } else { dirNode.addFile(file, isMarked); } return dirNode; } return null; }