mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-85781 "Cancel" for "Scanning files" does nothing
This commit is contained in:
@@ -117,7 +117,7 @@ public class DirectoryIndexComponent extends DirectoryIndexImpl {
|
||||
VirtualFile f = file.findFileByRelativePath(rel);
|
||||
if (f != null) {
|
||||
if (state == originalState) state = state.copy();
|
||||
state.fillMapWithModuleContent(f, eachModule, f);
|
||||
state.fillMapWithModuleContent(f, eachModule, f, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class DirectoryIndexComponent extends DirectoryIndexImpl {
|
||||
}
|
||||
|
||||
if (state == originalState) state = state.copy();
|
||||
state.fillMapWithModuleContent(file, module, parentInfo.contentRoot);
|
||||
state.fillMapWithModuleContent(file, module, parentInfo.contentRoot, null);
|
||||
|
||||
String parentPackage = state.myDirToPackageName.get(parent);
|
||||
|
||||
|
||||
+5
-2
@@ -263,12 +263,15 @@ public class DirectoryIndexImpl extends DirectoryIndex {
|
||||
return info;
|
||||
}
|
||||
|
||||
void fillMapWithModuleContent(VirtualFile root, final Module module, final VirtualFile contentRoot) {
|
||||
void fillMapWithModuleContent(VirtualFile root, final Module module, final VirtualFile contentRoot, @Nullable final ProgressIndicator progress) {
|
||||
|
||||
VfsUtilCore.visitChildrenRecursively(root, new DirectoryVisitor() {
|
||||
|
||||
@Override
|
||||
protected DirectoryInfo updateInfo(VirtualFile file) {
|
||||
if (progress != null) {
|
||||
progress.checkCanceled();
|
||||
}
|
||||
if (isExcluded(contentRoot, file)) return null;
|
||||
if (isIgnored(file)) return null;
|
||||
|
||||
@@ -332,7 +335,7 @@ public class DirectoryIndexImpl extends DirectoryIndex {
|
||||
}
|
||||
|
||||
for (final VirtualFile contentRoot : contentRoots) {
|
||||
fillMapWithModuleContent(contentRoot, module, contentRoot);
|
||||
fillMapWithModuleContent(contentRoot, module, contentRoot, progress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user