File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/inspection Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ import com.intellij.codeInspection.ProblemDescriptor
5
5
import com.intellij.icons.AllIcons
6
6
import com.intellij.openapi.application.ApplicationManager
7
7
import com.intellij.openapi.project.Project
8
+ import com.intellij.openapi.util.Iconable
8
9
import com.intellij.unscramble.AnalyzeStacktraceUtil
10
+ import javax.swing.Icon
9
11
10
12
/* *
11
13
* Button that launches the built-in "Analyze Stack Trace" action. Displayed as a quick fix.
@@ -16,7 +18,7 @@ import com.intellij.unscramble.AnalyzeStacktraceUtil
16
18
class AnalyzeStackTraceFix (
17
19
private val exceptionMessage : String ,
18
20
private val stackTraceLines : List <String >
19
- ) : LocalQuickFix {
21
+ ) : LocalQuickFix, Iconable {
20
22
21
23
/* *
22
24
* Without `invokeLater` the [com.intellij.execution.impl.ConsoleViewImpl.myPredefinedFilters] will not be filled.
@@ -42,4 +44,6 @@ class AnalyzeStackTraceFix(
42
44
override fun getName () = " Analyze stack trace"
43
45
44
46
override fun getFamilyName () = name
47
+
48
+ override fun getIcon (flags : Int ): Icon = AllIcons .Actions .Lightning
45
49
}
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ import com.intellij.codeInspection.ProblemDescriptor
5
5
import com.intellij.openapi.editor.LogicalPosition
6
6
import com.intellij.openapi.fileEditor.FileEditorManager
7
7
import com.intellij.openapi.project.Project
8
+ import com.intellij.openapi.util.Iconable
8
9
import com.intellij.openapi.vfs.VfsUtil
10
+ import com.intellij.util.ui.EmptyIcon
11
+ import javax.swing.Icon
9
12
import org.utbot.common.PathUtil.toPath
10
13
11
14
/* *
@@ -20,7 +23,7 @@ class ViewGeneratedTestFix(
20
23
val testFileRelativePath : String ,
21
24
val lineNumber : Int ,
22
25
val columnNumber : Int
23
- ) : LocalQuickFix {
26
+ ) : LocalQuickFix, Iconable {
24
27
25
28
/* *
26
29
* Navigates the user to the [lineNumber] line of the [testFileRelativePath] file.
@@ -43,4 +46,6 @@ class ViewGeneratedTestFix(
43
46
override fun getName () = " View generated test"
44
47
45
48
override fun getFamilyName () = name
49
+
50
+ override fun getIcon (flags : Int ): Icon = EmptyIcon .ICON_0
46
51
}
You can’t perform that action at this time.
0 commit comments