From 81395910fbaa86194396cd127e3f2020497af2ec Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 28 Aug 2024 17:06:49 +0200 Subject: [PATCH] fix: bulk file listener (#585) --- .../kotlin/io/snyk/plugin/snykcode/SnykCodeBulkFileListener.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/kotlin/io/snyk/plugin/snykcode/SnykCodeBulkFileListener.kt b/src/main/kotlin/io/snyk/plugin/snykcode/SnykCodeBulkFileListener.kt index 315cfa479..498a6e2af 100644 --- a/src/main/kotlin/io/snyk/plugin/snykcode/SnykCodeBulkFileListener.kt +++ b/src/main/kotlin/io/snyk/plugin/snykcode/SnykCodeBulkFileListener.kt @@ -11,7 +11,6 @@ import com.intellij.openapi.vfs.VirtualFileManager import com.intellij.openapi.vfs.newvfs.events.VFileEvent import com.intellij.openapi.vfs.readText import io.snyk.plugin.SnykBulkFileListener -import io.snyk.plugin.getPsiFile import io.snyk.plugin.getSnykCachedResults import io.snyk.plugin.toLanguageServerURL import io.snyk.plugin.toSnykFileSet @@ -60,9 +59,9 @@ class SnykCodeBulkFileListener : SnykBulkFileListener() { virtualFile.readText() ) languageServer.textDocumentService.didSave(param) - virtualFile.getPsiFile(project)?.let { DaemonCodeAnalyzer.getInstance(project).restart(it) } } VirtualFileManager.getInstance().asyncRefresh() + DaemonCodeAnalyzer.getInstance(project).restart() } }