User: rednesto Date: 04 Jul 23 07:32 Revision: af4d95cbe1f4e7698d75bdc795d99012b15c9a18 Summary: Attempt to fix minecraft-dev/mcdev-error-report#1059 and fix minecraft-dev/mcdev-error-report#1053 TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=8584&personal=false Index: src/main/kotlin/platform/mixin/inspection/addedMembers/AddedMembersNameFormatInspection.kt =================================================================== --- src/main/kotlin/platform/mixin/inspection/addedMembers/AddedMembersNameFormatInspection.kt (revision ae9c8eaadd07e2fbf5c0a283d618234baebbd251) +++ src/main/kotlin/platform/mixin/inspection/addedMembers/AddedMembersNameFormatInspection.kt (revision af4d95cbe1f4e7698d75bdc795d99012b15c9a18) @@ -35,6 +35,7 @@ import com.intellij.ide.util.SuperMethodWarningUtil import com.intellij.openapi.editor.Editor import com.intellij.openapi.module.Module +import com.intellij.openapi.project.DumbService import com.intellij.openapi.project.Project import com.intellij.openapi.ui.ComboBox import com.intellij.openapi.ui.ComponentValidator @@ -299,23 +300,29 @@ if (isMethod) { val method = startElement as? PsiMethod ?: return if (editor != null) { + DumbService.getInstance(project).smartInvokeLater { - SuperMethodWarningUtil.checkSuperMethod(method, { md -> - RenameProcessor(project, md, newName, false, false).run() - true - }, editor) + SuperMethodWarningUtil.checkSuperMethod(method, { md -> + RenameProcessor(project, md, newName, false, false).run() + true + }, editor) + } } else { + DumbService.getInstance(project).smartInvokeLater { - val superMethod = method.findDeepestSuperMethods().firstOrNull() - for (md in listOfNotNull(superMethod, method)) { - RenameProcessor(project, md, newName, false, false).run() - } - } + val superMethod = method.findDeepestSuperMethods().firstOrNull() + for (md in listOfNotNull(superMethod, method)) { + RenameProcessor(project, md, newName, false, false).run() + } + } + } } else { if (!FileModificationService.getInstance().prepareFileForWrite(file)) { return } + DumbService.getInstance(project).smartInvokeLater { - RenameProcessor(project, startElement, newName, false, false).run() - } - } + RenameProcessor(project, startElement, newName, false, false).run() + } + } + } override fun startInWriteAction() = isMethod }