Create Test Intention: Fix RuntimeException on attempt to convert generated test class to Kotlin
#KT-12285 Fixed #EA-82281 Fixed
This commit is contained in:
@@ -180,6 +180,10 @@ class KotlinCreateTestIntention : SelfTargetingRangeIntention<KtNamedDeclaration
|
||||
NavigationUtil.activateFileWithPsiElement(existingClass)
|
||||
}
|
||||
else {
|
||||
with(PsiDocumentManager.getInstance(project)) {
|
||||
getDocument(generatedFile)?.let { doPostponedOperationsAndUnblockDocument(it) }
|
||||
}
|
||||
|
||||
JavaToKotlinAction.convertFiles(generatedFile.singletonList(), project, false).singleOrNull()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user