Skip to content

Commit b10b633

Browse files
committed
Update parameter naming in Compiler
1 parent 9fcc3a7 commit b10b633

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

server/src/main/kotlin/org/javacs/kt/Compiler.kt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ private class CompilationEnvironment(
164164
configFiles = EnvironmentConfigFiles.JVM_CONFIG_FILES
165165
)
166166

167-
// TODO: Update VFS source files dynamically inside the environment using updateClasspath
168-
// and use VirtualFileManager.getInstance instead of using a custom SourcePath/SourceFile mechanism.
169-
// Documentation on the VFS is available here: https://www.jetbrains.org/intellij/sdk/docs/basics/architectural_overview/virtual_file.html
170-
// Virtual files can be manipulated using input-/output-stream-writers. Note that each virtual file has an associated charset.
171-
172-
// environment.addKotlinSourceRoots(workspaceRoots.map { it.toFile() })
173-
174167
val project = environment.project
175168
if (project is MockProject) {
176169
project.registerService(NullableNotNullManager::class.java, KotlinNullableNotNullManager(project))
@@ -231,12 +224,12 @@ enum class CompilationKind {
231224
* Incrementally compiles files and expressions.
232225
* The basic strategy for compiling one file at-a-time is outlined in OneFilePerformance.
233226
*/
234-
class Compiler(workspaceRoots: Set<Path>, classPath: Set<Path>, buildScriptClassPath: Set<Path> = emptySet()) : Closeable {
227+
class Compiler(javaSourcePath: Set<Path>, classPath: Set<Path>, buildScriptClassPath: Set<Path> = emptySet()) : Closeable {
235228
private var closed = false
236229
private val localFileSystem: VirtualFileSystem
237230

238-
private val defaultCompileEnvironment = CompilationEnvironment(workspaceRoots, classPath)
239-
private val buildScriptCompileEnvironment = buildScriptClassPath.takeIf { it.isNotEmpty() }?.let { CompilationEnvironment(workspaceRoots, it) }
231+
private val defaultCompileEnvironment = CompilationEnvironment(javaSourcePath, classPath)
232+
private val buildScriptCompileEnvironment = buildScriptClassPath.takeIf { it.isNotEmpty() }?.let { CompilationEnvironment(emptySet(), it) }
240233
private val compileLock = ReentrantLock() // TODO: Lock at file-level
241234

242235
companion object {

0 commit comments

Comments
 (0)