public boolean importData(TransferSupport support) {
        if(!canImport(support)) {
            return false;
        }

        // Extract transfer data.
        MutableTreeNode[] nodes = null;
        try {
            Transferable t = support.getTransferable();
            nodes = (MutableTreeNode[])t.getTransferData(nodesFlavor);
        } catch(UnsupportedFlavorException ufe) {
            System.out.println("UnsupportedFlavor: " + ufe.getMessage());
        } catch(java.io.IOException ioe) {
            System.out.println("I/O error: " + ioe.getMessage());
        }

        // Get drop location info.
        JTree.DropLocation dl =
                (JTree.DropLocation)support.getDropLocation();
        int childIndex = dl.getChildIndex();
        TreePath dest = dl.getPath();
        MutableTreeNode parent =
                (MutableTreeNode)dest.getLastPathComponent();
        JTree tree = (JTree)support.getComponent();
        DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
        // Configure for drop mode.
        int index = childIndex;    // DropMode.INSERT
        if(childIndex == -1) {     // DropMode.ON
            index = parent.getChildCount();
        }

        //make a copy of the node and insert it into right place
        for (int i = 0; i < nodes.length; i++) {
            try {
                //make a copy of the node, and set its parent to be correct (or else the hierachy falls apart)
                IExecuteTask deepCopy = (IExecuteTask) JsonReader.jsonToJava(JsonWriter.objectToJson(nodes[i]));
                deepCopy.setParent(parent);
                deepCopy.resetParents();
                model.insertNodeInto(deepCopy, parent, index++);
            } catch (IOException e) {
                System.out.println("Could not make a copy of the node we are moving.");
                e.printStackTrace();
                return false;
            }
        }
        return true;
    }