private static boolean hasJavaFxDependency(@Nullable Module module) {
    if (module == null || module.isDisposed()) return false;

    return CachedValuesManager.getManager(module.getProject()).getCachedValue(module, () -> {
      boolean hasClass = JavaPsiFacade.getInstance(module.getProject())
                           .findClass(JAVAFX_APPLICATION_APPLICATION, moduleWithDependenciesAndLibrariesScope(module)) != null;
      return CachedValueProvider.Result.create(hasClass, ProjectRootManager.getInstance(module.getProject()));
    });
  }
private static boolean hasJavaFxDependency(@Nullable Module module)