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(
360
360
override fun visit (element : CgDocRegularStmt ){
361
361
if (element.isEmpty()) return
362
362
363
- print (element.stmt.replace( " \n " , " \n * " ) )
363
+ print (" * " + element.stmt )
364
364
}
365
365
override fun visit (element : CgDocClassLinkStmt ) {
366
366
if (element.isEmpty()) return
Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ internal object CgUtilClassConstructor {
29
29
id = utilsClassId
30
30
documentation = utilClassKind.utilClassDocumentation(codegenLanguage)
31
31
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
+
33
36
nestedClassRegions + = CgAuxiliaryNestedClassesRegion (
37
+ header = " Util classes" ,
34
38
nestedClasses = listOf (
35
39
CgAuxiliaryClass (utilMethodProvider.capturedArgumentClassId)
36
40
)
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ sealed class UtilClassKind(
36
36
= CgDocumentationComment (
37
37
listOf (
38
38
CgDocRegularStmt (" $utilClassKindCommentText \n " ),
39
- CgDocRegularStmt (" $UTIL_CLASS_VERSION_COMMENT_PREFIX${utilClassVersion(codegenLanguage)} " ),
39
+ CgDocRegularStmt (" $UTIL_CLASS_VERSION_COMMENT_PREFIX${utilClassVersion(codegenLanguage)} \n " ),
40
40
)
41
41
)
42
42
@@ -108,9 +108,9 @@ sealed class UtilClassKind(
108
108
codegenLanguage : CodegenLanguage
109
109
)
110
110
: 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)
114
114
else -> null
115
115
}
116
116
}
Original file line number Diff line number Diff line change @@ -426,6 +426,7 @@ object CodeGenerationController {
426
426
.map { comment -> comment.text }
427
427
.firstOrNull { text -> UtilClassKind .UTIL_CLASS_VERSION_COMMENT_PREFIX in text }
428
428
?.substringAfterLast(UtilClassKind .UTIL_CLASS_VERSION_COMMENT_PREFIX )
429
+ ?.substringBefore(" \n " )
429
430
?.trim()
430
431
}
431
432
You can’t perform that action at this time.
0 commit comments