From 2d71718cf0036d91c8bc7a2fd34c748dfe47d518 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 5 Dec 2024 16:31:54 +0300 Subject: [PATCH] Cleanup --- .../org/jacodb/ets/utils/LoadEtsFile.kt | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt index 9b7180523..cb6a057cf 100644 --- a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt +++ b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt @@ -23,13 +23,10 @@ import java.io.FileNotFoundException import java.nio.file.Path import kotlin.io.path.Path import kotlin.io.path.absolute -import kotlin.io.path.createTempDirectory -import kotlin.io.path.div import kotlin.io.path.exists import kotlin.io.path.inputStream import kotlin.io.path.nameWithoutExtension import kotlin.io.path.pathString -import kotlin.io.path.relativeTo import kotlin.time.Duration.Companion.seconds private const val ENV_VAR_ARK_ANALYZER_DIR = "ARKANALYZER_DIR" @@ -81,27 +78,3 @@ fun loadEtsFileAutoConvert(tsPath: Path): EtsFile { return etsFile } } - -fun loadEtsProjectAutoConvert( - path: Path, - loadEntrypoints: Boolean = false, - useArkAnalyzerTypeInference: Int? = 1, -): EtsScene { - val irFolderPath = generateEtsIR( - path, - isProject = true, - loadEntrypoints = loadEntrypoints, - useArkAnalyzerTypeInference = useArkAnalyzerTypeInference, - ) - val files = irFolderPath - .walk() - .filter { it.extension == "json" } - .map { - it.inputStream().use { stream -> - val etsFileDto = EtsFileDto.loadFromJson(stream) - convertToEtsFile(etsFileDto) - } - } - .toList() - return EtsScene(files) -}