Preserve annotation arguments in "Add use-site target" intention

So #KT-23634 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-04-06 05:04:26 +03:00
committed by Mikhail Glukhikh
parent a5aad22fe7
commit 1cbaab1531
4 changed files with 23 additions and 1 deletions
@@ -141,6 +141,6 @@ private fun KtAnnotationEntry.applicableUseSiteTargets(): List<AnnotationUseSite
private fun KtAnnotationEntry.addUseSiteTarget(useSiteTarget: AnnotationUseSiteTarget, project: Project) {
project.executeWriteCommand("Add use-site target") {
replace(KtPsiFactory(this).createAnnotationEntry("@${useSiteTarget.renderName}:$shortName"))
replace(KtPsiFactory(this).createAnnotationEntry("@${useSiteTarget.renderName}:$shortName${valueArgumentList?.text ?: ""}"))
}
}