Add AnnotationBuilder#createAnnotation to be able to handle on-fly diagnostic

GitOrigin-RevId: d2279169eacca378ea018bdaf3be3635afc06f79
This commit is contained in:
Vladimir Dolzhenko
2021-02-07 22:14:35 +01:00
committed by intellij-monorepo-bot
parent f32acc0356
commit 763126e0c6

View File

@@ -104,9 +104,8 @@ class AnnotationPresentationInfo(
it.problemGroup(KotlinSuppressableWarningProblemGroup(diagnostic.factory))
}
}
.create()
@Suppress("UNCHECKED_CAST")
(holder as? List<Annotation>)?.last()?.let(consumer::invoke)
.createAnnotation()
.also(consumer)
}
private fun getMessage(diagnostic: Diagnostic): String {