private void refreshRec(DataEditorMap dataEditorMap, DatabaseTreeItem parentItem, Map<Integer, TreeItem> itemsById){
        for(DataEditorBase data : dataEditorMap.children){
            
            DatabaseTreeItem item = null;
            
            //System.out.println(data.name);
            if(itemsById == null){
                item = new DatabaseTreeItem(this, data.name, null, null, (DataEditorTreeItem) data);
            }
            else{
                item = (DatabaseTreeItem) itemsById.get(data.id);
            }
            
            //DatabaseTreeItem item = generateItem(null, data);
            //addItem(item, parentItem, false);
            parentItem.addChild(item, false);
            

            
            refreshRec((DataEditorMap) data, item, itemsById);
            DataEditorTreeItem dataTree = (DataEditorTreeItem) item.editorData;
            
            if(dataTree.expanded){
                setItemExpanded(item, true);
            }
            
        }
        
    }