void ( @NotNull BuildController controller, @NotNull BasicGradleProject gradleProject, @NotNull ProjectImportModelProvider modelProvider ) { Set<String> obtainedModels = new HashSet<>(); long startTime = System.currentTimeMillis(); modelProvider.populateProjectModels(controller, gradleProject, new ProjectImportModelProvider.ProjectModelConsumer() { @Override public void consume(@NotNull Object object, @NotNull Class<?> clazz) { obtainedModels.add(clazz.getName()); addProjectModel(gradleProject, object, clazz); } }); myAllModels.logPerformance( "Ran extension " + modelProvider.getName() + " during " + modelProvider.getPhase() + " for project " + gradleProject.getProjectIdentifier().getProjectPath() + " obtained " + obtainedModels.size() + " model(s): " + joinClassNamesToString(obtainedModels), System.currentTimeMillis() - startTime ); }