mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AddExceptionToThrowsFix: less read-only dialogs (IDEA-CR-16373)
This commit is contained in:
+4
-4
@@ -94,12 +94,12 @@ public class AddExceptionToThrowsFix extends BaseIntentionAction {
|
||||
processSuperMethods = false;
|
||||
}
|
||||
|
||||
if (!FileModificationService.getInstance().prepareFileForWrite(targetMethod.getContainingFile())) return;
|
||||
List<PsiElement> toModify = new ArrayList<>();
|
||||
toModify.add(targetMethod);
|
||||
if (processSuperMethods) {
|
||||
for (PsiMethod superMethod : superMethods) {
|
||||
if (!FileModificationService.getInstance().prepareFileForWrite(superMethod.getContainingFile())) return;
|
||||
}
|
||||
Collections.addAll(toModify, superMethods);
|
||||
}
|
||||
if (!FileModificationService.getInstance().preparePsiElementsForWrite(toModify)) return;
|
||||
WriteAction.run(() -> {
|
||||
processMethod(project, targetMethod, unhandledExceptions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user