Skip to content

Commit 6c7e8e0

Browse files
committed
refactor: remove gutter mark if finished
1 parent ddf7b31 commit 6c7e8e0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugin/src/main/kotlin/spp/jetbrains/sourcemarker/instrument/InstrumentEventWindowService.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import com.intellij.ui.content.ContentManagerEvent
2727
import com.intellij.ui.content.ContentManagerListener
2828
import com.intellij.xdebugger.impl.ui.ExecutionPointHighlighter
2929
import spp.jetbrains.icons.PluginIcons
30+
import spp.jetbrains.marker.SourceMarker
31+
import spp.jetbrains.marker.SourceMarkerKeys
3032
import spp.jetbrains.marker.service.ArtifactNamingService
3133
import spp.jetbrains.sourcemarker.instrument.breakpoint.ui.BreakpointHitTab
3234
import spp.jetbrains.sourcemarker.instrument.ui.InstrumentEventTab
@@ -176,6 +178,13 @@ class InstrumentEventWindowService(val project: Project) : Disposable {
176178
content.isCloseable = true
177179
contentManager.addContent(content)
178180
contentManager.setSelectedContent(content)
181+
182+
//remove gutter mark if finished
183+
if (overview.isFinished) {
184+
SourceMarker.getInstance(project).getGutterMarks()
185+
.find { it.getUserData(SourceMarkerKeys.INSTRUMENT_ID) == overview.instrumentId }
186+
?.dispose()
187+
}
179188
}
180189

181190
fun showInstrumentEvents(instrumentId: String) {

0 commit comments

Comments
 (0)