void (@NotNull PsiErrorElement errorElement, @NotNull HighlightInfo.Builder info) { PsiElement parent = errorElement.getParent(); String description = errorElement.getErrorDescription(); List<IntentionAction> registrar = new ArrayList<>(); if (parent instanceof PsiStatement && description.equals(JavaPsiBundle.message("expected.semicolon"))) { info.registerFix(new InsertMissingTokenFix(";"), null, null, null, null); HighlightFixUtil.registerFixesForExpressionStatement((PsiStatement)parent, registrar); } if (parent instanceof PsiTryStatement && description.equals(JavaPsiBundle.message("expected.catch.or.finally"))) { registrar.add(new AddExceptionToCatchFix(false).asIntention()); registrar.add(new AddFinallyFix((PsiTryStatement)parent).asIntention()); } if (parent instanceof PsiSwitchLabeledRuleStatement && description.equals(JavaPsiBundle.message("expected.switch.rule"))) { IntentionAction action = QuickFixFactory.getInstance().createWrapSwitchRuleStatementsIntoBlockFix((PsiSwitchLabeledRuleStatement)parent); registrar.add(action); } QuickFixAction.registerQuickFixActions(info, null, registrar); }