Don't request write action for ChangeParameterTypeFix because it's based on refactoring
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
This commit is contained in:
committed by
Nikolay Krasko
parent
e3f85653e9
commit
98060d28a8
@@ -47,6 +47,8 @@ class ChangeParameterTypeFix(element: KtParameter, type: KotlinType) : KotlinQui
|
||||
this.isPrimaryConstructorParameter = declaration is KtPrimaryConstructor
|
||||
}
|
||||
|
||||
override fun startInWriteAction(): Boolean = false
|
||||
|
||||
override fun isAvailable(project: Project, editor: Editor?, file: PsiFile): Boolean {
|
||||
return super.isAvailable(project, editor, file) && containingDeclarationName != null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user