String (@NotNull IdeaModule gradleModule, @NotNull ExternalProject externalProject, @Nullable String sourceSetName, @NotNull ProjectResolverContext resolverCtx) { String delimiter; StringBuilder moduleName = new StringBuilder(); String buildSrcGroup = resolverCtx.getBuildSrcGroup(gradleModule); if (resolverCtx.isUseQualifiedModuleNames()) { delimiter = "."; if (StringUtil.isNotEmpty(buildSrcGroup)) { moduleName.append(buildSrcGroup).append(delimiter); } moduleName.append(gradlePathToQualifiedName(gradleModule.getProject().getName(), externalProject.getQName())); } else { delimiter = "_"; if (StringUtil.isNotEmpty(buildSrcGroup)) { moduleName.append(buildSrcGroup).append(delimiter); } moduleName.append(gradleModule.getName()); } if (sourceSetName != null) { assert !sourceSetName.isEmpty(); moduleName.append(delimiter); moduleName.append(sourceSetName); } return PathUtilRt.suggestFileName(moduleName.toString(), true, false); }