boolean (Project project, ModHighlight highlight) { VirtualFile file = actualize(highlight.virtualFile()); if (file == null) return false; FileEditor fileEditor = FileEditorManager.getInstance(project).getSelectedEditor(file); if (!(fileEditor instanceof TextEditor textEditor)) return false; Editor editor = textEditor.getEditor(); HighlightManager manager = HighlightManager.getInstance(project); for (ModHighlight.HighlightInfo info : highlight.highlights()) { manager.addRangeHighlight(editor, info.range().getStartOffset(), info.range().getEndOffset(), info.attributesKey(), info.hideByTextChange(), null); } WindowManager.getInstance().getStatusBar(project).setInfo(RefactoringBundle.message("press.escape.to.remove.the.highlighting")); return true; }