void (@NotNull final Editor editor, final boolean disable) { Project project = editor.getProject(); if (ApplicationManager.getApplication().isUnitTestMode() || project == null) return; // need to always invoke later to maintain order of enabling/disabling SwingUtilities.invokeLater(() -> { if (disable) { EditorMouseHoverPopupControl.disablePopups(project); } else { EditorMouseHoverPopupControl.enablePopups(project); } }); }