DefaultGradleSourceSetModel (@NotNull Project project) { ProjectIdentifier projectIdentifier = GradleProjectUtil.getProjectIdentifier(project); DefaultGradleSourceSetModel sourceSetModel = allSourceSetModels.get(projectIdentifier); if (sourceSetModel == null) { context.getMessageReporter().createMessage() .withGroup(Messages.SOURCE_SET_CACHE_GET_GROUP) .withTitle("Source set model isn't found") .withText( "Source sets for " + GradleNegotiationUtil.getProjectDisplayName(project) + " wasn't collected. " + "All source sets should be collected during " + GradleModelFetchPhase.PROJECT_SOURCE_SET_PHASE + "." ) .withStackTrace() .withKind(Message.Kind.ERROR) .reportMessage(project); return new DefaultGradleSourceSetModel(); } return sourceSetModel; }