mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
[external system api][IDEA-347061] Do not refresh VFS from LibraryDataService
This action seems unnecessary because the Workspace Model and Indexes should take care of synchronizing the files between disk and VFS. GitOrigin-RevId: 3131e5c8406a582e1216a6e8f8a8a03fde86a40e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
12e1eb0436
commit
2c871b531d
@@ -32,7 +32,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
|
||||
@ApiStatus.Internal
|
||||
@@ -108,17 +107,6 @@ public final class LibraryDataService extends AbstractProjectDataService<Library
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void refreshVfsFiles(Collection<? extends File> files) {
|
||||
VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
|
||||
for (File file : files) {
|
||||
Path path = file.toPath();
|
||||
// search for jar file first otherwise lib root won't be found!
|
||||
if (virtualFileManager.findFileByNioPath(path) == null) {
|
||||
virtualFileManager.refreshAndFindFileByNioPath(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static @NotNull Map<OrderRootType, Collection<File>> prepareLibraryFiles(@NotNull LibraryData data) {
|
||||
Map<OrderRootType, Collection<File>> result = new HashMap<>();
|
||||
for (LibraryPathType pathType: LibraryPathType.values()) {
|
||||
@@ -131,7 +119,6 @@ public final class LibraryDataService extends AbstractProjectDataService<Library
|
||||
continue;
|
||||
}
|
||||
List<File> files = ContainerUtil.map(paths, File::new);
|
||||
refreshVfsFiles(files);
|
||||
result.put(orderRootType, files);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user