From be2038c0a7e0bbed7abcedb91eff4c997d8ec1cc Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 2 Oct 2024 09:59:45 +0200 Subject: [PATCH] chore: remove warnings --- src/main/kotlin/io/snyk/plugin/SnykBulkFileListener.kt | 1 - src/main/kotlin/io/snyk/plugin/events/SnykScanListener.kt | 1 - src/main/kotlin/io/snyk/plugin/ui/UIUtils.kt | 2 +- .../io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt | 5 +---- .../io/snyk/plugin/ui/toolwindow/SnykTreeCellRenderer.kt | 1 - src/main/kotlin/snyk/common/SnykCachedResults.kt | 2 -- .../kotlin/snyk/common/lsp/LanguageServerBulkFileListener.kt | 1 - 7 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/io/snyk/plugin/SnykBulkFileListener.kt b/src/main/kotlin/io/snyk/plugin/SnykBulkFileListener.kt index 360ea2e83..ef1298f74 100644 --- a/src/main/kotlin/io/snyk/plugin/SnykBulkFileListener.kt +++ b/src/main/kotlin/io/snyk/plugin/SnykBulkFileListener.kt @@ -2,7 +2,6 @@ package io.snyk.plugin import com.intellij.ide.impl.ProjectUtil import com.intellij.openapi.project.Project -import com.intellij.openapi.roots.ProjectFileIndex import com.intellij.openapi.vfs.VirtualFile import com.intellij.openapi.vfs.isFile import com.intellij.openapi.vfs.newvfs.BulkFileListener diff --git a/src/main/kotlin/io/snyk/plugin/events/SnykScanListener.kt b/src/main/kotlin/io/snyk/plugin/events/SnykScanListener.kt index bc7fdce62..77afd4233 100644 --- a/src/main/kotlin/io/snyk/plugin/events/SnykScanListener.kt +++ b/src/main/kotlin/io/snyk/plugin/events/SnykScanListener.kt @@ -3,7 +3,6 @@ package io.snyk.plugin.events import com.intellij.util.messages.Topic import snyk.common.SnykError import snyk.container.ContainerResult -import snyk.iac.IacResult interface SnykScanListener { companion object { diff --git a/src/main/kotlin/io/snyk/plugin/ui/UIUtils.kt b/src/main/kotlin/io/snyk/plugin/ui/UIUtils.kt index 9ba669abf..656e8ca5e 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/UIUtils.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/UIUtils.kt @@ -155,7 +155,7 @@ fun getReadOnlyClickableHtmlJEditorPaneFixedSize( } fun getStandardLayout(rowCount: Int = 2, columnCount: Int = 2) = - GridLayoutManager(rowCount, columnCount, Insets(5, 5, 5, 5), -1, -1) + GridLayoutManager(rowCount, columnCount, JBUI.insets(5), -1, -1) fun getPanelWithColumns(rowCount: Int, columnCount: Int): JPanel = JPanel().apply { layout = getStandardLayout(rowCount, columnCount) } 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 3d7ac2af1..dc37fba2b 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt @@ -67,17 +67,14 @@ import io.snyk.plugin.ui.wrapWithScrollPane import org.jetbrains.annotations.TestOnly import snyk.common.ProductType import snyk.common.SnykError -import snyk.common.lsp.settings.FolderConfigSettings import snyk.common.lsp.LanguageServerWrapper import snyk.common.lsp.ScanIssue +import snyk.common.lsp.settings.FolderConfigSettings import snyk.container.ContainerIssuesForImage import snyk.container.ContainerResult import snyk.container.ContainerService import snyk.container.ui.ContainerImageTreeNode import snyk.container.ui.ContainerIssueTreeNode -import snyk.iac.IacIssue -import snyk.iac.IacResult -import snyk.iac.ignorableErrorCodes import java.awt.BorderLayout import java.util.Objects.nonNull import javax.swing.JPanel diff --git a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykTreeCellRenderer.kt b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykTreeCellRenderer.kt index 05d668e57..6ef5b51da 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykTreeCellRenderer.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykTreeCellRenderer.kt @@ -9,7 +9,6 @@ import io.snyk.plugin.SnykFile import io.snyk.plugin.getSnykCachedResults import io.snyk.plugin.getSnykCachedResultsForProduct import io.snyk.plugin.pluginSettings -import io.snyk.plugin.ui.PackageManagerIconProvider.Companion.getIcon import io.snyk.plugin.ui.getDisabledIcon import io.snyk.plugin.ui.snykCodeAvailabilityPostfix import io.snyk.plugin.ui.toolwindow.nodes.leaf.SuggestionTreeNode diff --git a/src/main/kotlin/snyk/common/SnykCachedResults.kt b/src/main/kotlin/snyk/common/SnykCachedResults.kt index 308e94575..642626549 100644 --- a/src/main/kotlin/snyk/common/SnykCachedResults.kt +++ b/src/main/kotlin/snyk/common/SnykCachedResults.kt @@ -19,8 +19,6 @@ import snyk.common.lsp.ScanIssue import snyk.common.lsp.SnykScanParams import snyk.container.ContainerResult import snyk.container.ContainerService -import snyk.iac.IacResult -import java.util.concurrent.ConcurrentHashMap @Service(Service.Level.PROJECT) class SnykCachedResults( diff --git a/src/main/kotlin/snyk/common/lsp/LanguageServerBulkFileListener.kt b/src/main/kotlin/snyk/common/lsp/LanguageServerBulkFileListener.kt index 34f0486c6..fee952d07 100644 --- a/src/main/kotlin/snyk/common/lsp/LanguageServerBulkFileListener.kt +++ b/src/main/kotlin/snyk/common/lsp/LanguageServerBulkFileListener.kt @@ -7,7 +7,6 @@ import com.intellij.openapi.application.invokeLater import com.intellij.openapi.project.DumbService import com.intellij.openapi.project.Project import com.intellij.openapi.roots.ProjectFileIndex -import com.intellij.openapi.roots.ProjectRootManager import com.intellij.openapi.vfs.VirtualFile import com.intellij.openapi.vfs.VirtualFileManager import com.intellij.openapi.vfs.readText