@Override
  public void insertClosingQuote(@NotNull Editor editor, int offset, @NotNull PsiFile file, @NotNull CharSequence closingQuote) {
    PsiElement element = file.findElementAt(offset - 1);
    PsiElement parent = element == null ? null : element.getParent();
    if (parent instanceof JsonStringLiteral) {
      PsiDocumentManager.getInstance(file.getProject()).commitDocument(editor.getDocument());
      TextRange range = parent.getTextRange();
      if (offset - 1 != range.getStartOffset() || !"\"".contentEquals(closingQuote)) {
        int endOffset = range.getEndOffset();
        if (offset < endOffset) return;
        if (offset == endOffset && !StringUtil.isEmpty(((JsonStringLiteral)parent).getValue())) return;
      }
    }
    editor.getDocument().insertString(offset, closingQuote);
    JsonTypedHandler.processPairedBracesComma(closingQuote.charAt(0), editor, file);
  }
@Override
  public void insertClosingQuote(@NotNull Editor editor, int offset, @NotNull PsiFile file, @NotNull CharSequence closingQuote)