@Override
  public void registerErrorQuickFix(@NotNull PsiErrorElement errorElement, @NotNull HighlightInfo.Builder info) {
    if (!(errorElement.getLanguage() instanceof JavaLanguage)) return;
    PsiElement parent = errorElement.getParent();
    String description = errorElement.getErrorDescription();
    List<IntentionAction> registrar = new ArrayList<>();
    if (description.equals(JavaPsiBundle.message("expected.semicolon"))) {
      info.registerFix(new InsertMissingTokenFix(";"), null, null, null, null);
      HighlightFixUtil.registerFixesForExpressionStatement(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);
  }
@Override
  public void registerErrorQuickFix(@NotNull PsiErrorElement errorElement, @NotNull HighlightInfo.Builder info)