Skip to content
Snippets Groups Projects
Commit 83c59a1a authored by SeeBasTStick's avatar SeeBasTStick
Browse files

added probcli version

parent 42613c21
No related branches found
No related tags found
No related merge requests found
...@@ -131,6 +131,8 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte ...@@ -131,6 +131,8 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
communicator.sendDebugMessage("creating errorDict $errorDict and errorFile $errorPath", MessageType.Info) communicator.sendDebugMessage("creating errorDict $errorDict and errorFile $errorPath", MessageType.Info)
errorDict.mkdirs() errorDict.mkdirs()
FileWriter(errorPath, false).close() FileWriter(errorPath, false).close()
errorPath.deleteOnExit()
errorDict.deleteOnExit()
return errorDict.exists() && errorPath.exists() return errorDict.exists() && errorPath.exists()
} }
...@@ -218,13 +220,13 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte ...@@ -218,13 +220,13 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
problem problem
} }
} }
.map { problem -> Diagnostic( .map { problem ->
Range( val range = Range(
Position(problem.start.line, problem.start.col), Position(problem.start.line, problem.start.col),
Position(problem.end.line, problem.end.col)), Position(problem.end.line, problem.end.col))
val diagnostic = Diagnostic(
range,
problem.message, problem.message,
when (problem.type) { when (problem.type) {
"error" -> { "error" -> {
DiagnosticSeverity.Error DiagnosticSeverity.Error
...@@ -239,9 +241,12 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte ...@@ -239,9 +241,12 @@ class ProBCommandLineAccess(val communicator : CommunicatorInterface) : ProBInte
DiagnosticSeverity.Hint DiagnosticSeverity.Hint
} }
}, },
problem.file, problem.file
" probcli v.${problem.version}"
) )
diagnostic.relatedInformation =
listOf(DiagnosticRelatedInformation(Location(problem.file, range), "probcli v.${problem.version}"))
diagnostic
} }
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment