void () { Editor editor = myEditor; PsiFile file = myFile; Document document = myDocument; if (editor == null || editor.isDisposed() || file == null || document == null) return; final FileEditorManager fileEditorManager = FileEditorManager.getInstance(myProject); removeHighlighters(); final Map<FileEditor, EditorNotificationPanel> map = file.getCopyableUserData(NOTIFICATION_PANELS); if (map != null) { final VirtualFile vFile = getVirtualFile(file); boolean freeAll = !fileEditorManager.isFileOpen(vFile); file.putCopyableUserData(NOTIFICATION_PANELS, null); for (FileEditor fileEditor : map.keySet()) { if (!freeAll && !isCurrentEditor(fileEditor)) { continue; } fileEditorManager.removeTopComponent(fileEditor, map.get(fileEditor)); } } final DocumentListener documentListener = editor.getUserData(COVERAGE_DOCUMENT_LISTENER); if (documentListener != null) { document.removeDocumentListener(documentListener); editor.putUserData(COVERAGE_DOCUMENT_LISTENER, null); } }