Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't navigate to source on scan finished #502

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ class SnykToolWindowSnykCodeScanListenerLS(

override fun scanningSnykCodeFinished(snykCodeResults: Map<SnykCodeFile, List<ScanIssue>>) {
ApplicationManager.getApplication().invokeLater {
this.snykToolWindowPanel.navigateToSourceEnabled = false
displaySnykCodeResults(snykCodeResults)
refreshAnnotationsForOpenFiles(project)
this.snykToolWindowPanel.navigateToSourceEnabled = true
Comment on lines +43 to +46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this kind of toggling is safe if this function is not called multiple times, different threads situation?

}
}

Expand Down
Loading