Minor: fix formatting
This commit is contained in:
+14
-14
@@ -70,25 +70,25 @@ class KtCompilingExecutor(file: ScratchFile) : ScratchExecutor(file) {
|
|||||||
is KtScratchSourceFileProcessor.Result.Error -> return error(result.message)
|
is KtScratchSourceFileProcessor.Result.Error -> return error(result.message)
|
||||||
is KtScratchSourceFileProcessor.Result.OK -> {
|
is KtScratchSourceFileProcessor.Result.OK -> {
|
||||||
ApplicationManager.getApplication().invokeLater {
|
ApplicationManager.getApplication().invokeLater {
|
||||||
val modifiedScratchSourceFile =
|
val modifiedScratchSourceFile =
|
||||||
KtPsiFactory(file.psiFile.project).createFileWithLightClassSupport("tmp.kt", result.code, file.psiFile)
|
KtPsiFactory(file.psiFile.project).createFileWithLightClassSupport("tmp.kt", result.code, file.psiFile)
|
||||||
|
|
||||||
|
try {
|
||||||
|
val tempDir = compileFileToTempDir(modifiedScratchSourceFile) ?: return@invokeLater
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val tempDir = compileFileToTempDir(modifiedScratchSourceFile) ?: return@invokeLater
|
val handler = CapturingProcessHandler(createCommandLine(module, result.mainClassName, tempDir.path))
|
||||||
|
ProcessOutputParser().parse(handler.runProcess())
|
||||||
try {
|
|
||||||
val handler = CapturingProcessHandler(createCommandLine(module, result.mainClassName, tempDir.path))
|
|
||||||
ProcessOutputParser().parse(handler.runProcess())
|
|
||||||
} finally {
|
|
||||||
tempDir.delete()
|
|
||||||
}
|
|
||||||
} catch (e: Throwable) {
|
|
||||||
log.info(result.code, e)
|
|
||||||
handlers.forEach { it.error(file, e.message ?: "Couldn't compile ${file.psiFile.name}") }
|
|
||||||
} finally {
|
} finally {
|
||||||
handlers.forEach { it.onFinish(file) }
|
tempDir.delete()
|
||||||
}
|
}
|
||||||
|
} catch (e: Throwable) {
|
||||||
|
log.info(result.code, e)
|
||||||
|
handlers.forEach { it.error(file, e.message ?: "Couldn't compile ${file.psiFile.name}") }
|
||||||
|
} finally {
|
||||||
|
handlers.forEach { it.onFinish(file) }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user