File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/codegen
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ abstract class CgAbstractRenderer(
360360 override fun visit (element : CgDocRegularStmt ){
361361 if (element.isEmpty()) return
362362
363- print (element.stmt.replace( " \n " , " \n * " ) )
363+ print (" * " + element.stmt )
364364 }
365365 override fun visit (element : CgDocClassLinkStmt ) {
366366 if (element.isEmpty()) return
Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ internal object CgUtilClassConstructor {
2929 id = utilsClassId
3030 documentation = utilClassKind.utilClassDocumentation(codegenLanguage)
3131 body = buildClassBody(utilsClassId) {
32- staticDeclarationRegions + = CgStaticsRegion (" Util methods" , utilMethodProvider.utilMethodIds.map { CgUtilMethod (it) })
32+ staticDeclarationRegions + = CgStaticsRegion (
33+ header = " Util methods" ,
34+ content = utilMethodProvider.utilMethodIds.map { CgUtilMethod (it) })
35+
3336 nestedClassRegions + = CgAuxiliaryNestedClassesRegion (
37+ header = " Util classes" ,
3438 nestedClasses = listOf (
3539 CgAuxiliaryClass (utilMethodProvider.capturedArgumentClassId)
3640 )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ sealed class UtilClassKind(
3636 = CgDocumentationComment (
3737 listOf (
3838 CgDocRegularStmt (" $utilClassKindCommentText \n " ),
39- CgDocRegularStmt (" $UTIL_CLASS_VERSION_COMMENT_PREFIX${utilClassVersion(codegenLanguage)} " ),
39+ CgDocRegularStmt (" $UTIL_CLASS_VERSION_COMMENT_PREFIX${utilClassVersion(codegenLanguage)} \n " ),
4040 )
4141 )
4242
@@ -108,9 +108,9 @@ sealed class UtilClassKind(
108108 codegenLanguage : CodegenLanguage
109109 )
110110 : UtilClassKind ? {
111- return when (comment) {
112- RegularUtUtils (codegenLanguage).utilClassKindCommentText -> RegularUtUtils (codegenLanguage)
113- UtUtilsWithMockito (codegenLanguage).utilClassKindCommentText -> UtUtilsWithMockito (codegenLanguage)
111+ return when {
112+ comment.contains( RegularUtUtils (codegenLanguage).utilClassKindCommentText) -> RegularUtUtils (codegenLanguage)
113+ comment.contains( UtUtilsWithMockito (codegenLanguage).utilClassKindCommentText) -> UtUtilsWithMockito (codegenLanguage)
114114 else -> null
115115 }
116116 }
Original file line number Diff line number Diff line change @@ -426,6 +426,7 @@ object CodeGenerationController {
426426 .map { comment -> comment.text }
427427 .firstOrNull { text -> UtilClassKind .UTIL_CLASS_VERSION_COMMENT_PREFIX in text }
428428 ?.substringAfterLast(UtilClassKind .UTIL_CLASS_VERSION_COMMENT_PREFIX )
429+ ?.substringBefore(" \n " )
429430 ?.trim()
430431 }
431432
You can’t perform that action at this time.
0 commit comments