We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 904f50c commit e8d8875Copy full SHA for e8d8875
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/CodeGenerationController.kt
@@ -338,7 +338,12 @@ object CodeGenerationController {
338
*/
339
private val PsiFile.utilClassVersionOrNull: String?
340
get() = runReadAction {
341
- childrenOfType<PsiComment>()
+ val utilClass = (this as? PsiClassOwner)
342
+ ?.classes
343
+ ?.firstOrNull()
344
+ ?: return@runReadAction null
345
+
346
+ utilClass.childrenOfType<PsiComment>()
347
.map { comment -> comment.text }
348
.firstOrNull { text -> UTBOT_VERSION_PREFIX in text }
349
?.substringAfterLast(UTBOT_VERSION_PREFIX)
0 commit comments