@NotNull
  @Override
  public <F extends Facet, C extends FacetConfiguration> List<? extends DetectedFrameworkDescription> createDetectedFacetDescriptions(@NotNull FacetBasedFrameworkDetector<F, C> detector,
                                                                                                                                      @NotNull Collection<? extends VirtualFile> files) {
    final List<ModuleDescriptor> descriptors = getModuleDescriptors();
    MultiMap<ModuleDescriptor, VirtualFile> filesByModule = new MultiMap<>();
    for (VirtualFile file : files) {
      final File ioFile = VfsUtilCore.virtualToIoFile(file);
      ModuleDescriptor descriptor = findDescriptorByFile(descriptors, ioFile);
      if (descriptor != null) {
        filesByModule.putValue(descriptor, file);
      }
    }

    final List<DetectedFrameworkDescription> result = new ArrayList<>();
    final FacetType<F,C> facetType = detector.getFacetType();
    for (ModuleDescriptor module : filesByModule.keySet()) {
      if (!facetType.isSuitableModuleType(module.getModuleType())) {
        continue;
      }

      final List<Pair<C, Collection<VirtualFile>>> pairs =
        detector.createConfigurations(filesByModule.get(module), Collections.emptyList());
      for (Pair<C, Collection<VirtualFile>> pair : pairs) {
        result.add(new FacetBasedDetectedFrameworkDescriptionInWizard<>(module, detector, pair.getFirst(),
                                                                        new HashSet<>(pair.getSecond())));
      }
    }
    return result;
  }
@NotNull
  @Override
  public <F extends Facet, C extends FacetConfiguration> List<? extends DetectedFrameworkDescription> createDetectedFacetDescriptions(@NotNull FacetBasedFrameworkDetector<F, C> detector,
                                                                                                                                      @NotNull Collection<? extends VirtualFile> files)