paste_node_appending (PopUpMenu)

         # File lib/json/editor.rb, line 321
    321:       def paste_node_appending(item)
    322:         if current = selection.selected
    323:           if @clipboard_data
    324:             case current.type
    325:             when 'Array'
    326:               Editor.data2model(@clipboard_data, model, current)
    327:               expand_collapse(current)
    328:             when 'Hash'
    329:               if @clipboard_data.is_a? Hash
    330:                 parent = current.parent
    331:                 hash = Editor.model2data(current)
    332:                 model.remove(current)
    333:                 hash.update(@clipboard_data)
    334:                 Editor.data2model(hash, model, parent)
    335:                 if parent
    336:                   expand_collapse(parent)
    337:                 elsif @expanded
    338:                   expand_all
    339:                 end
    340:                 window.change
    341:               else
    342:                 toplevel.display_status(
    343:                   "Cannot paste non-#{current.type} data into '#{current.type}'!")
    344:               end
    345:             else
    346:               toplevel.display_status(
    347:                 "Cannot paste node below '#{current.type}'!")
    348:             end
    349:           else
    350:             toplevel.display_status("Nothing to paste in clipboard!")
    351:           end
    352:         else
    353:             toplevel.display_status("Append a node into the root first!")
    354:         end
    355:       end