Skip to content

Commit b07601d

Browse files
Remove quickfix icon from buttons on Problems toll window #1386 (#1394)
1 parent c212d32 commit b07601d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/AnalyzeStackTraceFix.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import com.intellij.codeInspection.ProblemDescriptor
55
import com.intellij.icons.AllIcons
66
import com.intellij.openapi.application.ApplicationManager
77
import com.intellij.openapi.project.Project
8+
import com.intellij.openapi.util.Iconable
89
import com.intellij.unscramble.AnalyzeStacktraceUtil
10+
import javax.swing.Icon
911

1012
/**
1113
* Button that launches the built-in "Analyze Stack Trace" action. Displayed as a quick fix.
@@ -16,7 +18,7 @@ import com.intellij.unscramble.AnalyzeStacktraceUtil
1618
class AnalyzeStackTraceFix(
1719
private val exceptionMessage: String,
1820
private val stackTraceLines: List<String>
19-
) : LocalQuickFix {
21+
) : LocalQuickFix, Iconable {
2022

2123
/**
2224
* Without `invokeLater` the [com.intellij.execution.impl.ConsoleViewImpl.myPredefinedFilters] will not be filled.
@@ -42,4 +44,6 @@ class AnalyzeStackTraceFix(
4244
override fun getName() = "Analyze stack trace"
4345

4446
override fun getFamilyName() = name
47+
48+
override fun getIcon(flags: Int): Icon = AllIcons.Actions.Lightning
4549
}

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection/ViewGeneratedTestFix.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import com.intellij.codeInspection.ProblemDescriptor
55
import com.intellij.openapi.editor.LogicalPosition
66
import com.intellij.openapi.fileEditor.FileEditorManager
77
import com.intellij.openapi.project.Project
8+
import com.intellij.openapi.util.Iconable
89
import com.intellij.openapi.vfs.VfsUtil
10+
import com.intellij.util.ui.EmptyIcon
11+
import javax.swing.Icon
912
import org.utbot.common.PathUtil.toPath
1013

1114
/**
@@ -20,7 +23,7 @@ class ViewGeneratedTestFix(
2023
val testFileRelativePath: String,
2124
val lineNumber: Int,
2225
val columnNumber: Int
23-
) : LocalQuickFix {
26+
) : LocalQuickFix, Iconable {
2427

2528
/**
2629
* Navigates the user to the [lineNumber] line of the [testFileRelativePath] file.
@@ -43,4 +46,6 @@ class ViewGeneratedTestFix(
4346
override fun getName() = "View generated test"
4447

4548
override fun getFamilyName() = name
49+
50+
override fun getIcon(flags: Int): Icon = EmptyIcon.ICON_0
4651
}

0 commit comments

Comments
 (0)