mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[mod-commands] Use expireWith(project)
GitOrigin-RevId: 9f5bc7bd8f2488cd739147e246b8dd021eb025bb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d8175c6e01
commit
e663f8c86f
+1
-1
@@ -211,7 +211,7 @@ public class ShowIntentionActionsHandler implements CodeInsightActionHandler {
|
||||
ActionContext actionContext = ActionContext.from(editor, psiFile);
|
||||
ThrowableComputable<Boolean, RuntimeException> computable =
|
||||
() -> ReadAction.nonBlocking(() -> modCommand.getPresentation(actionContext) != null)
|
||||
.expireWhen(() -> project.isDisposed())
|
||||
.expireWith(project)
|
||||
.executeSynchronously();
|
||||
return ProgressManager.getInstance().runProcessWithProgressSynchronously(
|
||||
computable, LangBundle.message("command.check.availability.for", modCommand.getFamilyName()), true, project);
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ public final class CleanupInspectionUtilImpl implements CleanupInspectionUtil {
|
||||
if (batchFix instanceof ModCommandBatchQuickFix modCommandBatchQuickFix) {
|
||||
ThrowableComputable<ModCommand, RuntimeException> actionComputable =
|
||||
() -> ReadAction.nonBlocking(() -> modCommandBatchQuickFix.perform(myProject, myBatchModeDescriptors))
|
||||
.expireWhen(() -> myProject.isDisposed())
|
||||
.expireWith(myProject)
|
||||
.executeSynchronously();
|
||||
ModCommand command = ProgressManager.getInstance().runProcessWithProgressSynchronously(
|
||||
actionComputable, LangBundle.message("apply.fixes"), true, myProject);
|
||||
|
||||
Reference in New Issue
Block a user