private static @Nullable JBPopupFactory getPopupFactory() {
    return ApplicationManager.getApplication() != null ? JBPopupFactory.getInstance() : null;
  }
private static @Nullable JBPopupFactory getPopupFactory()