public void expandPath(TreePath path) {
        for(Object node : path.getPath()){
            TreeItem parentItem = (TreeItem) node;
            if(parentItem != path.getLastPathComponent() && !isExpanded(new TreePath(parentItem.getPath()))){
                return;
            }
        }
        super.expandPath(path);
    }