void (@NotNull final AnActionEvent e) { final InspectionResultsView view = getInvoker(e); final InspectionTree tree = view.getTree(); try { Ref<List<CommonProblemDescriptor[]>> descriptors = Ref.create(); Set<VirtualFile> readOnlyFiles = new HashSet<>(); TreePath[] paths = tree.getSelectionPaths(); if (paths == null) { descriptors.set(List.of()); } else { if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> ReadAction.run(() -> { final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); indicator.setText(InspectionsBundle.message("quick.fix.action.checking.problem.progress")); descriptors.set(tree.getSelectedDescriptorPacks(true, readOnlyFiles, false, paths)); }), InspectionsBundle.message("preparing.for.apply.fix"), true, e.getProject())) { return; } } if (isProblemDescriptorsAcceptable() && !descriptors.get().isEmpty()) { doApplyFix(view.getProject(), descriptors.get(), readOnlyFiles, tree.getContext()); } else { doApplyFix(getSelectedElements(view), view); } view.getTree().removeSelectedProblems(); } finally { view.setApplyingFix(false); } }