From 209f97b9b5bfd4815238cb228b9e764d6b5abcb2 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 3 Apr 2024 16:23:54 +0200 Subject: [PATCH 1/2] fix: don't navigate to source on scan finished --- .../kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt | 2 +- .../ui/toolwindow/SnykToolWindowSnykCodeScanListenerLS.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt index b35a4828f..49db6193c 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt @@ -140,7 +140,7 @@ class SnykToolWindowPanel(val project: Project) : JPanel(), Disposable { * */ private var smartReloadMode = false - private var navigateToSourceEnabled = true + var navigateToSourceEnabled = true private val treeNodeStub = object : RootTreeNodeBase("", project) { override fun getSnykError(): SnykError? = null diff --git a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowSnykCodeScanListenerLS.kt b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowSnykCodeScanListenerLS.kt index 85839ec62..8f681a7f6 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowSnykCodeScanListenerLS.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowSnykCodeScanListenerLS.kt @@ -40,8 +40,10 @@ class SnykToolWindowSnykCodeScanListenerLS( override fun scanningSnykCodeFinished(snykCodeResults: Map>) { ApplicationManager.getApplication().invokeLater { + this.snykToolWindowPanel.navigateToSourceEnabled = false displaySnykCodeResults(snykCodeResults) refreshAnnotationsForOpenFiles(project) + this.snykToolWindowPanel.navigateToSourceEnabled = true } } From 5844a59f4a0ee7636520db6b70e4909bab4a833a Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 3 Apr 2024 17:11:55 +0200 Subject: [PATCH 2/2] docs: update CHANGELOG.md --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 992f0617b..523e3f484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,14 @@ # Snyk Security Changelog -## [2.7.14] - -### Added -- Render Snyk Code vulnerabilities using HTML served by the Language Server behind a feature flag. ## [2.7.13] ### Added +- Render Snyk Code vulnerabilities using HTML served by the Language Server behind a feature flag. - (LS Preview) added timeout to commands executed via code lenses +### Fixed +- (LS Preview) don't navigate to source of selected code tree node after scan + ## [2.7.12] ### Added - Mark ignored findings as ignored behind a feature flag.