File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
marker/src/main/kotlin/spp/jetbrains/marker/plugin Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ abstract class SourceInlayHintProvider : InlayHintsProvider<NoSettings> {
6666 when (event.eventCode) {
6767 VIRTUAL_TEXT_UPDATED , INLAY_MARK_VISIBLE , INLAY_MARK_HIDDEN -> {
6868 ApplicationManager .getApplication().invokeLater {
69+ if (event.sourceMark.project.isDisposed) {
70+ log.warn(" Project is disposed, ignoring event: ${event.eventCode} " )
71+ return @invokeLater
72+ }
73+
6974 FileEditorManager .getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel
7075 // todo: smaller range
7176 ?.getInlineElementsInRange(0 , Integer .MAX_VALUE )?.forEach {
@@ -83,8 +88,14 @@ abstract class SourceInlayHintProvider : InlayHintsProvider<NoSettings> {
8388 }
8489 }
8590 }
91+
8692 MARK_REMOVED -> {
8793 ApplicationManager .getApplication().invokeLater {
94+ if (event.sourceMark.project.isDisposed) {
95+ log.warn(" Project is disposed, ignoring event: ${event.eventCode} " )
96+ return @invokeLater
97+ }
98+
8899 FileEditorManager .getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel
89100 // todo: smaller range
90101 ?.getBlockElementsInRange(0 , Integer .MAX_VALUE )?.forEach {
You can’t perform that action at this time.
0 commit comments