Do not request write action for MoveDeclarationToSeparateFileIntention (EA-81511)
There's nothing but delegation to move refactoring. This started to fail in br146 because of this commit: https://github.com/JetBrains/intellij-community/commit/334772b7a8dfe3afb32665c09ff8e27781a01512
This commit is contained in:
+3
@@ -60,6 +60,8 @@ class MoveDeclarationToSeparateFileIntention :
|
||||
return TextRange(startOffset, endOffset)
|
||||
}
|
||||
|
||||
override fun startInWriteAction() = false
|
||||
|
||||
override fun applyTo(element: KtClassOrObject, editor: Editor?) {
|
||||
if (editor == null) throw IllegalArgumentException("This intention requires an editor")
|
||||
val file = element.getContainingKtFile()
|
||||
@@ -108,6 +110,7 @@ class MoveDeclarationToSeparateFileIntention :
|
||||
|
||||
val move = { MoveKotlinDeclarationsProcessor(project, moveOptions).run() }
|
||||
val optimizeImports = { OptimizeImportsProcessor(project, file).run() }
|
||||
|
||||
move.runRefactoringWithPostprocessing(project, MoveKotlinDeclarationsProcessor.REFACTORING_ID, optimizeImports)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user