Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,14 @@ class AddPathVariableQuickFix(psiMethod: PsiMethod, private val methodName: Stri

val stringType = PsiType.getJavaLangString(psiManager, GlobalSearchScope.projectScope(project))
val newArgument = elementFactory.createParameter(methodName, stringType)
psiMethod.parameterList.add(newArgument)

editor?.let { PsiDocumentManager.getInstance(project).doPostponedOperationsAndUnblockDocument(it.document) }

val action = AddAnnotationModCommandAction(SpringWebClasses.PATH_VARIABLE, newArgument)
val psiParameter = psiMethod.parameterList.parameters.last()
val action = AddAnnotationModCommandAction(SpringWebClasses.PATH_VARIABLE, psiParameter)
action.asIntention().invoke(project, editor, file)

psiMethod.parameterList.add(newArgument)
}

}
Loading