diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a22e02fe..4202712a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Snyk Changelog +## [2.6.1] +### Fixed +- remove more intellij-specific code and configuration + ## [2.6.1] ### Fixed - don't use kotlin library on non-kotlin IDEs diff --git a/build.gradle.kts b/build.gradle.kts index efb390f6c..d4bfdf8a2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -70,7 +70,8 @@ dependencies { // read more: https://github.com/JetBrains/gradle-intellij-plugin intellij { version.set(properties("platformVersion")) - + // https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type + // type.set("GO") downloadSources.set(properties("platformDownloadSources").toBoolean()) // plugin dependencies: uses `platformPlugins` property from the gradle.properties file. 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 91bdf833f..3b54352a7 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykTreeCellRenderer.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykTreeCellRenderer.kt @@ -24,7 +24,6 @@ import io.snyk.plugin.ui.toolwindow.nodes.root.RootSecurityIssuesTreeNode import io.snyk.plugin.ui.toolwindow.nodes.secondlevel.ErrorTreeNode import io.snyk.plugin.ui.toolwindow.nodes.secondlevel.FileTreeNode import io.snyk.plugin.ui.toolwindow.nodes.secondlevel.SnykCodeFileTreeNode -import org.jetbrains.kotlin.idea.base.util.letIf import snyk.common.ProductType import snyk.common.SnykError import snyk.container.ContainerIssue @@ -73,10 +72,12 @@ class SnykTreeCellRenderer : ColoredTreeCellRenderer() { append(fileVulns.sanitizedTargetFile) append(ProductType.OSS.getCountText(value.childCount)) } - text = toolTipText.letIf(toolTipText.length > MAX_FILE_TREE_NODE_LENGTH) { - "..." + it.substring( - it.length - MAX_FILE_TREE_NODE_LENGTH, it.length - ) + text = toolTipText.apply { + if (toolTipText.length > MAX_FILE_TREE_NODE_LENGTH) { + "..." + this.substring( + this.length - MAX_FILE_TREE_NODE_LENGTH, this.length + ) + } } val snykCachedResults = getSnykCachedResults(value.project) @@ -111,10 +112,12 @@ class SnykTreeCellRenderer : ColoredTreeCellRenderer() { append(productType.getCountText(value.childCount)) } - text = toolTipText.letIf(toolTipText.length > MAX_FILE_TREE_NODE_LENGTH) { - "..." + it.substring( - it.length - MAX_FILE_TREE_NODE_LENGTH, it.length - ) + text = toolTipText.apply { + if (toolTipText.length > MAX_FILE_TREE_NODE_LENGTH) { + "..." + this.substring( + this.length - MAX_FILE_TREE_NODE_LENGTH, this.length + ) + } } nodeIcon = file.icon @@ -137,10 +140,12 @@ class SnykTreeCellRenderer : ColoredTreeCellRenderer() { append(ProductType.IAC.getCountText(value.childCount)) } - text = toolTipText.letIf(toolTipText.length > MAX_FILE_TREE_NODE_LENGTH) { - "..." + it.substring( - it.length - MAX_FILE_TREE_NODE_LENGTH, it.length - ) + text = toolTipText.apply { + if (toolTipText.length > MAX_FILE_TREE_NODE_LENGTH) { + "..." + this.substring( + this.length - MAX_FILE_TREE_NODE_LENGTH, this.length + ) + } } val snykCachedResults = getSnykCachedResults(value.project)