From b04b7147daa4a15e732618a1841ccbea5c4c8804 Mon Sep 17 00:00:00 2001 From: SeeBasTStick <sebastian.stock@hhu.de> Date: Sat, 31 Oct 2020 11:40:55 +0100 Subject: [PATCH] small clean up --- src/main/kotlin/b/language/server/BDocumentService.kt | 4 ++-- .../b/language/server/proBMangement/prob/ProBKernel.kt | 7 ++++--- .../language/server/proBMangement/prob/WarningListener.kt | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/b/language/server/BDocumentService.kt b/src/main/kotlin/b/language/server/BDocumentService.kt index 1c5cb96..fce2ef4 100644 --- a/src/main/kotlin/b/language/server/BDocumentService.kt +++ b/src/main/kotlin/b/language/server/BDocumentService.kt @@ -42,7 +42,7 @@ class BDocumentService(private val server: ServerInterface, /** * checks a document via prob an the set options - * @param the uri to perform actions on + * @param currentUri the uri to perform actions on */ fun checkDocument(currentUri : String){ @@ -80,7 +80,7 @@ class BDocumentService(private val server: ServerInterface, * @param currentUri the uri of the current main file * @param filesWithProblems uris of files containing problems */ - fun calculateToInvalidate(currentUri : String, filesWithProblems : List<String>) : List<String>{ + private fun calculateToInvalidate(currentUri : String, filesWithProblems : List<String>) : List<String>{ val currentlyDisplayed = issueTracker[currentUri].orEmpty() return currentlyDisplayed.subtract(filesWithProblems).toList() } diff --git a/src/main/kotlin/b/language/server/proBMangement/prob/ProBKernel.kt b/src/main/kotlin/b/language/server/proBMangement/prob/ProBKernel.kt index 4d19fe4..3cbddd8 100644 --- a/src/main/kotlin/b/language/server/proBMangement/prob/ProBKernel.kt +++ b/src/main/kotlin/b/language/server/proBMangement/prob/ProBKernel.kt @@ -55,15 +55,16 @@ class ProBKernel @Inject constructor(private val injector : Injector, val problems = loadMachine(settings, path, factory) - communicator.sendDebugMessage("returning from kernel problems are ${problems.toString()}", MessageType.Info) + communicator.sendDebugMessage("returning from kernel problems are ${problems}", MessageType.Info) return listOf(informationListener.getInformation(), problems).flatten() } /** * Does the main work - * @param newTraceCreator a anonymous function dealing with the state space - * @param settings the settings to be applied + * @param settings the settings of the document + * @param path the path to the document + * @param factory a factory */ private fun loadMachine(settings: ProBSettings, path : String, factory : ModelFactory<*>): List<Diagnostic> { communicator.sendDebugMessage("creating new state space", MessageType.Info) diff --git a/src/main/kotlin/b/language/server/proBMangement/prob/WarningListener.kt b/src/main/kotlin/b/language/server/proBMangement/prob/WarningListener.kt index 7df1aac..683149e 100644 --- a/src/main/kotlin/b/language/server/proBMangement/prob/WarningListener.kt +++ b/src/main/kotlin/b/language/server/proBMangement/prob/WarningListener.kt @@ -7,7 +7,7 @@ import org.eclipse.lsp4j.Diagnostic /** * Custom collector to collect warnings from prob kernel */ -class InformationListener(val fallbackPath : String) : IWarningListener { +class InformationListener(private val fallbackPath : String) : IWarningListener { private val warningList : ArrayList<ErrorItem> = arrayListOf() -- GitLab