KT-38841 Remove redundant preparePsiElementForWrite call
- This call breaks Intention Preview for all intentions that extend `SelfTargetingIntention` - This check is actually already performed by the platform before the intention invocation - There are many other intentions which redundantly use this call, but most of them implement `LocalQuickFix`, which means that they are inspection based. Currently Intention Preview does not seem to support this kind of intentions
This commit is contained in:
@@ -99,7 +99,6 @@ abstract class SelfTargetingIntention<TElement : PsiElement>(
|
||||
final override fun invoke(project: Project, editor: Editor?, file: PsiFile) {
|
||||
editor ?: return
|
||||
val target = getTarget(editor, file) ?: return
|
||||
if (!FileModificationService.getInstance().preparePsiElementForWrite(target)) return
|
||||
applyTo(target, editor)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user