void (Module module, MavenProject mavenProject, IdeModifiableModelsProvider modifiableModelsProvider) { ModifiableFacetModel model = modifiableModelsProvider.getModifiableFacetModel(module); FACET_TYPE f = findFacet(model); if (f != null) return; f = myFacetType.createFacet(module, myDefaultFacetName, myFacetType.createDefaultConfiguration(), null); model.addFacet(f, MavenRootModelAdapter.getMavenExternalSource()); setupFacet(f, mavenProject); }