private NbGradleModel parseModel(
        FetchedProjectModels projectModels, Map<File, ProjectModelsOfExtensions> extensionModels) {
      Throwable issue = projectModels.getIssue();
      if (issue != null) {
        issues.add(ModelLoadIssues.projectModelLoadError(mainProject, projectModels, null, issue));
      }

      NbGradleMultiProjectDef projectDef =
          new NbGradleMultiProjectDef(projectModels.getProjectDef());
      NbGenericModelInfo genericInfo =
          new NbGenericModelInfo(projectDef, modelFetcher.getSettingsFile());
      NbGradleModel.Builder result = new NbGradleModel.Builder(genericInfo);

      File projectDir = genericInfo.getProjectDir();

      ProjectExtensionModelCache projectCache = cache.tryGetProjectCache(projectDir);

      for (NbGradleExtensionRef extension : extensions) {
        String extensionName = extension.getName();

        CachedModel cachedModel =
            projectCache != null ? projectCache.tryGetModel(extensionName) : null;

        Object extensionModel;
        if (cachedModel != null) {
          extensionModel = cachedModel.model;
        } else {
          ModelLoadResult modelLoadResult = modelLoadResultCache.get(extensionName);
          if (modelLoadResult == null) {
            modelLoadResult = getModelLoadResult(extension, projectDir, extensionModels);
            modelLoadResultCache.put(extensionName, modelLoadResult);
          } else {
            modelLoadResult = modelLoadResult.withMainProject(projectDir);
          }

          ParsedModel<?> parsedModels = extension.parseModel(modelLoadResult);
          extensionModel = parsedModels.getMainModel();

          for (Map.Entry<File, ?> entry : parsedModels.getOtherProjectsModel().entrySet()) {
            cache.getProjectCache(entry.getKey()).addModel(extensionName, entry.getValue());
          }
        }

        result.setModelForExtension(extension, extensionModel);
      }

      return result.create();
    }
    private void addProjectInfoResults(
        FetchedProjectModels projectModels, NbGradleExtensionRef extension, List<Object> results) {

      List<BuilderResult> builderResults =
          projectModels.getProjectInfoResults().get(extension.getName());
      if (builderResults == null) {
        return;
      }

      for (BuilderResult builderResult : builderResults) {
        BuilderIssue issue = builderResult.getIssue();
        if (issue != null) {
          issues.add(ModelLoadIssues.builderError(mainProject, projectModels, extension, issue));
        }

        Object resultObject = builderResult.getResultObject();
        if (resultObject != null) {
          results.add(resultObject);
        }
      }
    }