Skip to content

Commit 4365e93

Browse files
committed
refactor: replace forceHintsUpdateOnNextPass with DaemonCodeAnalyzer.restart
1 parent 9df5f56 commit 4365e93

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

marker/src/main/kotlin/spp/jetbrains/marker/plugin/SourceInlayHintProvider.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class SourceInlayHintProvider : InlayHintsProvider<NoSettings> {
7979
it.update()
8080
}
8181

82-
InlayHintsPassFactory.forceHintsUpdateOnNextPass()
82+
event.sourceMark.sourceFileMarker.refresh()
8383
}
8484
}
8585

@@ -91,7 +91,7 @@ class SourceInlayHintProvider : InlayHintsProvider<NoSettings> {
9191
disposeInlayIfNecessary(it, event.sourceMark)
9292
}
9393

94-
InlayHintsPassFactory.forceHintsUpdateOnNextPass()
94+
event.sourceMark.sourceFileMarker.refresh()
9595
}
9696
}
9797
}

marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/SourceMark.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717
package spp.jetbrains.marker.source.mark.api
1818

19-
import com.intellij.codeInsight.hints.InlayHintsPassFactory
2019
import com.intellij.lang.Language
2120
import com.intellij.openapi.Disposable
2221
import com.intellij.openapi.application.ReadAction
@@ -222,9 +221,7 @@ interface SourceMark : JBPopupListener, MouseMotionListener, VisibleAreaListener
222221
}
223222
})
224223
} else {
225-
project.invokeLater {
226-
InlayHintsPassFactory.forceHintsUpdateOnNextPass()
227-
}
224+
sourceFileMarker.refresh()
228225
}
229226
}
230227
}

0 commit comments

Comments
 (0)