@Override
  public Result preprocessEnter(@NotNull PsiFile file,
                                @NotNull Editor editor,
                                @NotNull Ref<Integer> caretOffsetRef,
                                @NotNull Ref<Integer> caretAdvanceRef,
                                @NotNull DataContext dataContext,
                                EditorActionHandler originalHandler) {
    if (!JsonEditorOptions.getInstance().COMMA_ON_ENTER) {
      return Result.Continue;
    }

    Language language = EnterHandler.getLanguage(dataContext);
    if (!(language instanceof JsonLanguage)) {
      return Result.Continue;
    }

    int caretOffset = caretOffsetRef.get().intValue();
    PsiElement psiAtOffset = file.findElementAt(caretOffset);

    if (psiAtOffset == null) {
      return Result.Continue;
    }

    if (psiAtOffset instanceof LeafPsiElement && handleComma(caretOffsetRef, psiAtOffset, editor)) {
      return Result.Continue;
    }

    JsonValue literal = ObjectUtils.tryCast(psiAtOffset.getParent(), JsonValue.class);
    if (literal != null && (!(literal instanceof JsonStringLiteral) || !((JsonLanguage)language).hasPermissiveStrings())) {
      handleJsonValue(literal, editor, caretOffsetRef);
    }

    return Result.Continue;
  }
@Override
  public Result preprocessEnter(@NotNull PsiFile file,
                                @NotNull Editor editor,
                                @NotNull Ref<Integer> caretOffsetRef,
                                @NotNull Ref<Integer> caretAdvanceRef,
                                @NotNull DataContext dataContext,
                                EditorActionHandler originalHandler)