void (@NotNull Document document, @NotNull Project project, @NotNull Segment range) { if (IntentionPreviewUtils.isIntentionPreviewActive()) return; ThreadingAssertions.assertEventDispatchThread(); MarkupModel model = DocumentMarkupModel.forDocument(document, project, false); if (model == null) return; for (RangeHighlighter highlighter : model.getAllHighlighters()) { if (TextRange.areSegmentsEqual(range, highlighter)) { model.removeHighlighter(highlighter); } } }