void (@NotNull PluginDescriptor pluginDescriptor) { for (FileEditor fileEditor : FileEditorManager.getInstance(myProject).getAllEditors()) { if (fileEditor instanceof TextEditor textEditor) { boolean clearAll = false; VirtualFile file = fileEditor.getFile(); if (file != null) { ClassLoader classLoader = file.getFileType().getClass().getClassLoader(); if (classLoader instanceof PluginAwareClassLoader pluginLoader && pluginLoader.getPluginId().equals(pluginDescriptor.getPluginId())) { clearAll = true; } } Editor editor = textEditor.getEditor(); if (clearAll) { editor.getMarkupModel().removeAllHighlighters(); } else { removeHighlightersOnPluginUnload(editor.getMarkupModel(), pluginDescriptor); } MarkupModel documentMarkupModel = DocumentMarkupModel.forDocument(editor.getDocument(), myProject, false); if (documentMarkupModel != null) { if (clearAll) { documentMarkupModel.removeAllHighlighters(); } else { removeHighlightersOnPluginUnload(documentMarkupModel, pluginDescriptor); } } } } }