public void applyExpensions(){
        for(TreeItem item : tree.getItems()){
            FilePathTreeItem pathItem = (FilePathTreeItem) item;
            try{
                if(expanded.get(pathItem.getFilePath())){
                    tree.setItemExpanded(pathItem, true);
                }
            }
            catch(NullPointerException e){
                
            }
        }
    }