AddFrameworkSupportDialog (@NotNull Module module) { VirtualFile[] roots = ModuleRootManager.getInstance(module).getContentRoots(); if (roots.length == 0) return null; List<FrameworkSupportInModuleProvider> providers = FrameworkSupportUtil.getProviders(module, DefaultFacetsProvider.INSTANCE); if (providers.isEmpty()) return null; return new AddFrameworkSupportDialog(module, roots[0].getPath(), providers); }