From cffd2b1c7ec72088c3bdca27020a64e3523c8935 Mon Sep 17 00:00:00 2001 From: RedNesto Date: Fri, 13 Sep 2024 13:57:55 +0200 Subject: [PATCH] Fix internal API usage in external annotations resolver In later versions findLibraryEntity becomes internal, resolve seems to be the correct method to use here --- .../TranslationExternalAnnotationsArtifactsResolver.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/kotlin/translations/identification/TranslationExternalAnnotationsArtifactsResolver.kt b/src/main/kotlin/translations/identification/TranslationExternalAnnotationsArtifactsResolver.kt index afc9b0f42..095bb84c7 100644 --- a/src/main/kotlin/translations/identification/TranslationExternalAnnotationsArtifactsResolver.kt +++ b/src/main/kotlin/translations/identification/TranslationExternalAnnotationsArtifactsResolver.kt @@ -46,7 +46,6 @@ import com.intellij.platform.workspace.jps.entities.LibraryRootTypeId import com.intellij.platform.workspace.jps.entities.modifyEntity import com.intellij.platform.workspace.storage.MutableEntityStorage import com.intellij.workspaceModel.ide.impl.legacyBridge.library.LibraryBridge -import com.intellij.workspaceModel.ide.impl.legacyBridge.library.ProjectLibraryTableBridgeImpl.Companion.findLibraryEntity import org.jetbrains.concurrency.AsyncPromise import org.jetbrains.concurrency.Promise import org.jetbrains.concurrency.resolvedPromise @@ -83,7 +82,7 @@ class TranslationExternalAnnotationsArtifactsResolver : ExternalAnnotationsArtif val annotationsPath = findAnnotationsPath(false) ?: findAnnotationsPath(true) ?: return false - val libraryEntity = diff.findLibraryEntity(library) ?: return true + val libraryEntity = diff.resolve(library.libraryId) ?: return true val vfUrlManager = WorkspaceModel.getInstance(project).getVirtualFileUrlManager() val newUrl = annotationsPath.toVirtualFileUrl(vfUrlManager) val annotationsRootType = LibraryRootTypeId(AnnotationOrderRootType.ANNOTATIONS_ID)