From 2c871b531dc7dbd0fdb95e25e5b86b17c53f4d79 Mon Sep 17 00:00:00 2001 From: "Alexander.Glukhov" Date: Mon, 14 Oct 2024 11:18:17 +0200 Subject: [PATCH] [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 --- .../service/project/manage/LibraryDataService.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/LibraryDataService.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/LibraryDataService.java index 9761bd518ca3..2e64ccaa1e2e 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/LibraryDataService.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/LibraryDataService.java @@ -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 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> prepareLibraryFiles(@NotNull LibraryData data) { Map> result = new HashMap<>(); for (LibraryPathType pathType: LibraryPathType.values()) { @@ -131,7 +119,6 @@ public final class LibraryDataService extends AbstractProjectDataService files = ContainerUtil.map(paths, File::new); - refreshVfsFiles(files); result.put(orderRootType, files); } return result;