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 abda14d commit 65b34daCopy full SHA for 65b34da
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/CodeGenerationController.kt
@@ -346,7 +346,12 @@ object CodeGenerationController {
346
*/
347
private val PsiFile.utilClassVersionOrNull: String?
348
get() = runReadAction {
349
- childrenOfType<PsiComment>()
+ val utilClass = (this as? PsiClassOwner)
350
+ ?.classes
351
+ ?.firstOrNull()
352
+ ?: return@runReadAction null
353
+
354
+ utilClass.childrenOfType<PsiComment>()
355
.map { comment -> comment.text }
356
.firstOrNull { text -> UTBOT_VERSION_PREFIX in text }
357
?.substringAfterLast(UTBOT_VERSION_PREFIX)
0 commit comments