Don't request write action for ReplaceExplicitFunctionLiteralParamWithItIntention because it's based on refactoring (KT-12436)
Workaround for exception: Refactorings should not be started inside write action because they start progress inside and any read action from the progress task would cause the deadlock #KT-12436 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
6b001c608b
commit
01a6ce930e
+2
@@ -58,6 +58,8 @@ class ReplaceExplicitFunctionLiteralParamWithItIntention() : PsiElementBaseInten
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun startInWriteAction(): Boolean = false
|
||||||
|
|
||||||
override fun invoke(project: Project, editor: Editor, element: PsiElement) {
|
override fun invoke(project: Project, editor: Editor, element: PsiElement) {
|
||||||
val caretOffset = editor.caretModel.offset
|
val caretOffset = editor.caretModel.offset
|
||||||
val functionLiteral = targetFunctionLiteral(element, editor.caretModel.offset)!!
|
val functionLiteral = targetFunctionLiteral(element, editor.caretModel.offset)!!
|
||||||
|
|||||||
Reference in New Issue
Block a user