Make copy-paste resolve task modal to avoid invalid psi elements
Due to background formatting pasted PSI elements become invalid quite soon and it is not possible to make resolve #KT-37414 Fixed
This commit is contained in:
@@ -312,7 +312,7 @@ class KotlinCopyPasteReferenceProcessor : CopyPastePostProcessor<BasicKotlinRefe
|
||||
file: KtFile,
|
||||
findReferenceProvider: (indicator: ProgressIndicator) -> List<ReferenceToRestoreData>
|
||||
) {
|
||||
val task: Task.Backgroundable = object : Task.Backgroundable(project, "Resolve pasted references", true) {
|
||||
val task = object : Task.Modal(project, "Resolving pasted references ...", true) {
|
||||
override fun run(indicator: ProgressIndicator) {
|
||||
assert(!ApplicationManager.getApplication().isWriteAccessAllowed) {
|
||||
"Resolving references on dispatch thread leads to live lock"
|
||||
|
||||
Reference in New Issue
Block a user