private static void disableMouseHoverPopups(@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
    if (Registry.is(DataViewsConfigurableUi.DEBUGGER_VALUE_TOOLTIP_AUTO_SHOW_KEY)) {
      SwingUtilities.invokeLater(() -> {
        if (disable) {
          EditorMouseHoverPopupControl.disablePopups(project);
        }
        else {
          EditorMouseHoverPopupControl.enablePopups(project);
        }
      });
    }
  }
private static void disableMouseHoverPopups(@NotNull final Editor editor, final boolean disable)