mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
PY-77160 Poetry/Pipenv modules refactoring
Split pipenv into separate files. Rewrite functions/methods using coroutines. Add `internal` or `@Internal`. Merge-request: IJ-MR-148379 Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com> GitOrigin-RevId: b398d04bfa358ce97bf1d30d59b2113548e7983c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
895a37dc34
commit
f79c7ad550
@@ -4,7 +4,8 @@ import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.roots.ModuleRootManager
|
||||
import com.intellij.openapi.vfs.VfsUtil
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import java.io.File
|
||||
import com.intellij.util.concurrency.annotations.RequiresBackgroundThread
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
|
||||
val Module.rootManager: ModuleRootManager
|
||||
get() = ModuleRootManager.getInstance(this)
|
||||
@@ -17,4 +18,14 @@ val Module.baseDir: VirtualFile?
|
||||
}
|
||||
|
||||
val Module.basePath: String?
|
||||
get() = baseDir?.path
|
||||
get() = baseDir?.path
|
||||
|
||||
@Internal
|
||||
@RequiresBackgroundThread
|
||||
fun findAmongRoots(module: Module, fileName: String): VirtualFile? {
|
||||
for (root in module.rootManager.contentRoots) {
|
||||
val file = root.findChild(fileName)
|
||||
if (file != null) return file
|
||||
}
|
||||
return null
|
||||
}
|
||||
Reference in New Issue
Block a user