void (@NotNull TextEditor textEditor) { if (!(textEditor.getFile() instanceof VirtualFileWithId fileWithId)) { return; } boolean replaced = myResurrectedZombies.replace(fileWithId.getId(), false, true); if (!replaced) { // no zombie or zombie already disposed return; } List<RangeHighlighter> toRemove = null; MarkupModel markupModel = DocumentMarkupModel.forDocument(textEditor.getEditor().getDocument(), myProject, false); if (markupModel != null) { for (RangeHighlighter highlighter : markupModel.getAllHighlighters()) { if (isZombieMarkup(highlighter)) { if (toRemove == null) { toRemove = new ArrayList<>(); } toRemove.add(highlighter); } } } if (toRemove == null) { return; } if (LOG.isDebugEnabled()) { LOG.debug("removing " + toRemove.size() + " markups for " + textEditor + "; dumb=" + DumbService.getInstance(myProject).isDumb()); } for (RangeHighlighter highlighter : toRemove) { highlighter.dispose(); } }