From 39a33ae2264ecdb10f6463c86c118b83fbdf04af Mon Sep 17 00:00:00 2001 From: "Vassiliy.Kudryashov" Date: Thu, 17 Nov 2022 17:20:25 +0300 Subject: [PATCH] Remove quickfix icon from buttons on Problems toll window #1386 --- .../intellij/plugin/inspection/AnalyzeStackTraceFix.kt | 6 +++++- .../intellij/plugin/inspection/ViewGeneratedTestFix.kt | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/AnalyzeStackTraceFix.kt b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/AnalyzeStackTraceFix.kt index 0ebb9a5c8e..434f24399c 100644 --- a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/AnalyzeStackTraceFix.kt +++ b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/AnalyzeStackTraceFix.kt @@ -5,7 +5,9 @@ import com.intellij.codeInspection.ProblemDescriptor import com.intellij.icons.AllIcons import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.project.Project +import com.intellij.openapi.util.Iconable import com.intellij.unscramble.AnalyzeStacktraceUtil +import javax.swing.Icon /** * Button that launches the built-in "Analyze Stack Trace" action. Displayed as a quick fix. @@ -16,7 +18,7 @@ import com.intellij.unscramble.AnalyzeStacktraceUtil class AnalyzeStackTraceFix( private val exceptionMessage: String, private val stackTraceLines: List -) : LocalQuickFix { +) : LocalQuickFix, Iconable { /** * Without `invokeLater` the [com.intellij.execution.impl.ConsoleViewImpl.myPredefinedFilters] will not be filled. @@ -42,4 +44,6 @@ class AnalyzeStackTraceFix( override fun getName() = "Analyze stack trace" override fun getFamilyName() = name + + override fun getIcon(flags: Int): Icon = AllIcons.Actions.Lightning } \ No newline at end of file diff --git a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/ViewGeneratedTestFix.kt b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/ViewGeneratedTestFix.kt index d0c4605e76..0261677e7d 100644 --- a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/ViewGeneratedTestFix.kt +++ b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/ViewGeneratedTestFix.kt @@ -5,7 +5,10 @@ import com.intellij.codeInspection.ProblemDescriptor import com.intellij.openapi.editor.LogicalPosition import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.project.Project +import com.intellij.openapi.util.Iconable import com.intellij.openapi.vfs.VfsUtil +import com.intellij.util.ui.EmptyIcon +import javax.swing.Icon import org.utbot.common.PathUtil.toPath /** @@ -20,7 +23,7 @@ class ViewGeneratedTestFix( val testFileRelativePath: String, val lineNumber: Int, val columnNumber: Int -) : LocalQuickFix { +) : LocalQuickFix, Iconable { /** * Navigates the user to the [lineNumber] line of the [testFileRelativePath] file. @@ -43,4 +46,6 @@ class ViewGeneratedTestFix( override fun getName() = "View generated test" override fun getFamilyName() = name + + override fun getIcon(flags: Int): Icon = EmptyIcon.ICON_0 } \ No newline at end of file