List<IntentionAction> (Editor editor, PsiFile file) { List<IntentionAction> actions = ContainerUtil.filter(CodeInsightTestFixtureImpl.getAvailableIntentions(editor, file), myPolicy::mayInvokeIntention); if (actions.isEmpty()) return Collections.emptyList(); // skip only after checking intentions for applicability, to catch possible exceptions from them int offset = editor.getCaretModel().getOffset(); if (MadTestingUtil.isAfterError(file, offset) || MadTestingUtil.isAfterError(file, offset - 1)) { return Collections.emptyList(); } return actions; }