private static void fixCommasOnPaste(@NotNull Project project, @NotNull Editor editor, @NotNull RangeMarker bounds) {
    if (!JsonEditorOptions.getInstance().COMMA_ON_PASTE) return;

    if (!isJsonEditor(project, editor)) return;

    final PsiDocumentManager manager = PsiDocumentManager.getInstance(project);
    manager.commitDocument(editor.getDocument());
    final PsiFile psiFile = manager.getPsiFile(editor.getDocument());
    if (psiFile == null) return;
    fixTrailingComma(bounds, psiFile, manager);
    fixLeadingComma(bounds, psiFile, manager);
  }
private static void fixCommasOnPaste(@NotNull Project project, @NotNull Editor editor, @NotNull RangeMarker bounds)