mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
IJPL-195942: Do not use projectDir.toUri() to create VirtualFileUrl
(cherry picked from commit 42ad32edbcc05a39dea62bed485f00b6a8ea7b4c) IJ-CR-168380 GitOrigin-RevId: 369c5799bd92014751013c2ad4a36800be591767
This commit is contained in:
committed by
intellij-monorepo-bot
parent
aab7c0613e
commit
7b829382cf
@@ -9,6 +9,7 @@ import com.intellij.platform.workspace.storage.EntityType
|
||||
import com.intellij.platform.workspace.storage.GeneratedCodeApiVersion
|
||||
import com.intellij.platform.workspace.storage.MutableEntityStorage
|
||||
import com.intellij.platform.workspace.storage.WorkspaceEntity
|
||||
import com.intellij.platform.workspace.storage.impl.url.toVirtualFileUrl
|
||||
import com.intellij.platform.workspace.storage.url.VirtualFileUrl
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
import java.nio.file.Path
|
||||
@@ -17,7 +18,7 @@ import java.nio.file.Path
|
||||
@Internal
|
||||
suspend fun registerProjectRoot(project: Project, projectDir: Path) {
|
||||
val workspaceModel = project.serviceAsync<WorkspaceModel>()
|
||||
val projectBaseDirUrl = workspaceModel.getVirtualFileUrlManager().getOrCreateFromUrl(projectDir.toUri().toString())
|
||||
val projectBaseDirUrl = projectDir.toVirtualFileUrl(workspaceModel.getVirtualFileUrlManager())
|
||||
val entity = ProjectRootEntity(projectBaseDirUrl, ProjectRootEntitySource)
|
||||
val newStorage = MutableEntityStorage.create()
|
||||
newStorage.addEntity(entity)
|
||||
|
||||
Reference in New Issue
Block a user