public static void setupFrameworks(List<? extends DetectedFrameworkDescription> descriptions,
                                     final ModifiableModelsProvider modelsProvider, final ModulesProvider modulesProvider) {
    WriteAction.run(() -> {
      List<DetectedFrameworkDescription> sortedDescriptions = new ArrayList<>();
      //todo perform real sorting
      for (DetectedFrameworkDescription description : descriptions) {
        if (description.getDetector().getUnderlyingFrameworkType() == null) {
          sortedDescriptions.add(description);
        }
      }
      for (DetectedFrameworkDescription description : descriptions) {
        if (description.getDetector().getUnderlyingFrameworkType() != null) {
          sortedDescriptions.add(description);
        }
      }
      for (DetectedFrameworkDescription description : sortedDescriptions) {
        description.setupFramework(modelsProvider, modulesProvider);
      }
    });
  }
public static void setupFrameworks(List<? extends DetectedFrameworkDescription> descriptions,
                                     final ModifiableModelsProvider modelsProvider, final ModulesProvider modulesProvider)