void () { ProgressIndicator indicator = new EmptyProgressIndicator(); ProgressManager.getInstance().runProcess(() -> { ProgressIndicatorUtils.checkCancelledEvenWithPCEDisabled(indicator); indicator.cancel(); assertThrows(ProcessCanceledException.class, () -> ProgressIndicatorUtils.checkCancelledEvenWithPCEDisabled(indicator)); Cancellation.computeInNonCancelableSection(() -> { ProgressIndicatorUtils.checkCancelledEvenWithPCEDisabled(indicator); return null; }); assertThrows(ProcessCanceledException.class, () -> ProgressIndicatorUtils.checkCancelledEvenWithPCEDisabled(indicator)); ProgressManager.getInstance().executeNonCancelableSection(() -> { ProgressIndicatorUtils.checkCancelledEvenWithPCEDisabled(indicator); }); assertThrows(ProcessCanceledException.class, () -> ProgressIndicatorUtils.checkCancelledEvenWithPCEDisabled(indicator)); }, indicator); }