Skip to content

Commit

Permalink
Fix internal API usage in external annotations resolver
Browse files Browse the repository at this point in the history
In later versions findLibraryEntity becomes internal, resolve seems to
 be the correct method to use here
  • Loading branch information
RedNesto committed Sep 13, 2024
1 parent 51342fb commit cffd2b1
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cffd2b1

Please sign in to comment.