void (final @Nls String message) { Editor textEditor = myEditor; PsiFile file = myFile; ApplicationManager.getApplication().invokeLater(() -> { if (textEditor == null || textEditor.isDisposed() || file == null) return; final FileEditorManager fileEditorManager = FileEditorManager.getInstance(myProject); final VirtualFile vFile = file.getVirtualFile(); assert vFile != null; Map<FileEditor, EditorNotificationPanel> map = file.getCopyableUserData(NOTIFICATION_PANELS); if (map == null) { map = new HashMap<>(); file.putCopyableUserData(NOTIFICATION_PANELS, map); } final FileEditor[] editors = fileEditorManager.getAllEditors(vFile); for (final FileEditor editor : editors) { if (isCurrentEditor(editor)) { final EditorNotificationPanel panel = new EditorNotificationPanel(editor, EditorNotificationPanel.Status.Warning) { { myLabel.setIcon(AllIcons.General.ExclMark); myLabel.setText(message); } }; panel.createActionLabel(CoverageBundle.message("link.label.close"), () -> fileEditorManager.removeTopComponent(editor, panel)); map.put(editor, panel); fileEditorManager.addTopComponent(editor, panel); break; } } }); }