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() } }