FIR CLI: fix typos in contentRootToVirtualFile util
This commit is contained in:
committed by
Ilya Kirillov
parent
e790607af5
commit
d2663cfb94
@@ -365,7 +365,6 @@ fun writeOutputs(
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun createSession(
|
fun createSession(
|
||||||
name: String,
|
name: String,
|
||||||
platform: TargetPlatform,
|
platform: TargetPlatform,
|
||||||
@@ -551,18 +550,21 @@ fun createProjectEnvironment(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun contentRootToVirtualFile(
|
private fun contentRootToVirtualFile(
|
||||||
root: JvmContentRootBase, locaFileSystem: VirtualFileSystem, jarFileSystem: VirtualFileSystem, messageCollector: MessageCollector
|
root: JvmContentRootBase,
|
||||||
|
localFileSystem: VirtualFileSystem,
|
||||||
|
jarFileSystem: VirtualFileSystem,
|
||||||
|
messageCollector: MessageCollector,
|
||||||
): VirtualFile? =
|
): VirtualFile? =
|
||||||
when (root) {
|
when (root) {
|
||||||
// TODO: find out why non-existent location is not reported for JARs, add comment or fix
|
// TODO: find out why non-existent location is not reported for JARs, add comment or fix
|
||||||
is JvmClasspathRoot ->
|
is JvmClasspathRoot ->
|
||||||
if (root.file.isFile) jarFileSystem.findJarRoot(root.file)
|
if (root.file.isFile) jarFileSystem.findJarRoot(root.file)
|
||||||
else locaFileSystem.findExistingRoot(root, "Classpath entry", messageCollector)
|
else localFileSystem.findExistingRoot(root, "Classpath entry", messageCollector)
|
||||||
is JvmModulePathRoot ->
|
is JvmModulePathRoot ->
|
||||||
if (root.file.isFile) jarFileSystem.findJarRoot(root.file)
|
if (root.file.isFile) jarFileSystem.findJarRoot(root.file)
|
||||||
else locaFileSystem.findExistingRoot(root, "Java module root", messageCollector)
|
else localFileSystem.findExistingRoot(root, "Java module root", messageCollector)
|
||||||
is JavaSourceRoot ->
|
is JavaSourceRoot ->
|
||||||
locaFileSystem.findExistingRoot(root, "Java source root", messageCollector)
|
localFileSystem.findExistingRoot(root, "Java source root", messageCollector)
|
||||||
else ->
|
else ->
|
||||||
throw IllegalStateException("Unexpected root: $root")
|
throw IllegalStateException("Unexpected root: $root")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user