diff --git a/src/main/kotlin/b/language/server/proBMangement/probCli/ProBCommandLineAccess.kt b/src/main/kotlin/b/language/server/proBMangement/probCli/ProBCommandLineAccess.kt index 4e30a66b6c3d5c7024779675acde2a22e6c603a2..3f18caef3e27d7d90c0c172086729431926c4e88 100644 --- a/src/main/kotlin/b/language/server/proBMangement/probCli/ProBCommandLineAccess.kt +++ b/src/main/kotlin/b/language/server/proBMangement/probCli/ProBCommandLineAccess.kt @@ -70,6 +70,7 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte "PERFORMANCE_INFO" + //voiding stdout and stderr val outputSink = if(System.getProperty("os.name").toLowerCase().contains("win")){ File("NUL") }else{ @@ -156,16 +157,6 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte val process: Process = command.start() - //just void error and output - communicator.sendDebugMessage("clearing input stream", MessageType.Info) - - readAndVoid(process.inputStream) - communicator.sendDebugMessage("clearing error stream", MessageType.Info) - - readAndVoid(process.errorStream) - - - communicator.sendDebugMessage("waiting for process to return", MessageType.Info) // process.waitFor() //we must wait here to ensure correct behavior when reading an error @@ -174,46 +165,6 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte } - private fun readAndVoid(stream: InputStream) { - stream.readAllBytes() - } - - private fun readFromStream(stream: InputStream) : String{ - return "" - - // stream.readAllBytes() - -/* val reader = BufferedReader(InputStreamReader(stream)) - - val builder = StringBuilder() - var line: String? - - - - var currentLine = reader.readLine() - while (currentLine != null){ - communicator.sendDebugMessage("current line $currentLine", MessageType.Info) - communicator.sendDebugMessage("reading next line ", MessageType.Info) - currentLine = reader.readLine() - communicator.sendDebugMessage("checking line", MessageType.Info) - } - -*/ - /* - while (reader.readLine().also { line = it } != null) { - communicator.sendDebugMessage("read line", MessageType.Info) - - builder.append(line) - builder.append(System.getProperty("line.separator")) - communicator.sendDebugMessage("Line Contains, $line and ${line!!.length} symboles", MessageType.Info) - } - communicator.sendDebugMessage("returning", MessageType.Info) - - - */ - // return builder.toString() - } - /** * Reads the errors and transforms them to java objects