Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Dup event call bug #238

Open
wants to merge 2 commits into
base: NG
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class InitializationService(private val project: Project) {
private fun updatePythonBasePath(project: Project, version: String) {
if(checkIfCheckovUpdateNeeded(version)){
updateCheckovPip(project)
return
}

val os = System.getProperty("os.name").lowercase()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,10 @@ class CheckovToolWindowManagerPanel(val project: Project) : SimpleToolWindowPane
}

private fun createIconForLineErrors(firstRow: Int, results: List<BaseCheckovResult>, markup: MarkupModel, document: Document) {
val rangeHighlighter: RangeHighlighter = markup.addLineHighlighter(firstRow, HighlighterLayer.ERROR, null)
val iconLocation = if(firstRow >= document.lineCount) document.getLineStartOffset(firstRow) else document.getLineStartOffset(firstRow + 1)
val gutterIconRenderer = CheckovGutterErrorIcon(results, iconLocation, markup, firstRow)
val rowInFile = if(firstRow > 0) firstRow - 1 else firstRow
val rangeHighlighter: RangeHighlighter = markup.addLineHighlighter(rowInFile, HighlighterLayer.ERROR, null)
val bubbleLocation = if(rowInFile >= document.lineCount) document.getLineStartOffset(rowInFile) else document.getLineStartOffset(rowInFile + 1)
val gutterIconRenderer = CheckovGutterErrorIcon(results, bubbleLocation, markup, rowInFile)
rangeHighlighter.gutterIconRenderer = gutterIconRenderer
rangeHighlighter.putUserData(key, true)
}
Expand Down