Switch to side-by-side view

--- a/tool/src/main/actions.java
+++ b/tool/src/main/actions.java
@@ -25,6 +25,8 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.swing.JTree;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreePath;
 import script.log;
 import spdxlib.SPDXfile;
 
@@ -114,6 +116,12 @@
         // create a tree based on folder tree on disk
         findFolders(core.getProductsFolder(), 25, softwareNode);
         
+        
+        // we use this value for later showing the products (SPDX) node
+        // fully expanded
+        core.temp.put(is.products, softwareNode.getUID());
+        
+       // swingUtils.setSelectedNode(softwareNode.getUID());
     }
     
     /**
@@ -198,116 +206,5 @@
         return count;
       }
     
-//     /**
-//     * This is a critical method. It will look for all SPDX files inside a given
-//     * folder and them as tree nodes
-//     * @param tree 
-//     */
-//    public static void addTreeSPDXOld(JTree tree) {
-//        // only find the SPDX documents with .SPDX extension
-//        ArrayList<File> initialFileList = utils.files
-//                .findFilesFiltered(core.getProductsFolder(), ".spdx", 25);
-//        
-//        if(initialFileList.isEmpty()){
-//            // no need to continue, just leave here
-//            return;
-//        }
-//        
-//        // this is used for filtering duplicate folders in the initial indexing
-//        ArrayList<File> tempFolderList = new ArrayList();
-//        // where are our spdx files stored?
-//        String baseFolder = core.getProductsFolder().getAbsolutePath();
-//        // get the root node where we have our treeview
-//        TreeNodeSPDX rootNode = swingUtils.getRootNode(tree);
-//        
-//        // where we place all results after being filtered
-//        ArrayList<File> fileList = new ArrayList();
-//        // iterate all files in our array that were found as products
-//        for(File file: initialFileList){
-//            // now we need to filter what we don't want to have in our array
-//            String filename = file.getName();
-//            // we don't need SVN files, ignore them completely
-//            if(filename.endsWith(".svn-base")){
-//                continue;
-//            }
-//            // add this file to our final list
-//            fileList.add(file);
-//            // now take care of the folder where this file was placed
-//            // get only the folder base, be careful with path separators here
-//            String folderName = file.getParent().replace(baseFolder, "");
-//            // no need to add in case the folder is the root
-//            if(folderName.isEmpty()){
-//                continue;
-//            }
-//            File folder = file.getParentFile();
-//            // no need to continue in case this folder was already added before
-//            if(tempFolderList.contains(folder)){
-//                continue;
-//            }
-//            // add it up
-//            tempFolderList.add(folder);
-//        }
-//        
-//         // create the node for hosting our list of SPDX documents
-//        TreeNodeSPDX softwareNode = nodeCreate(
-//                "Software (" + fileList.size() + ")"
-//                , NodeType.other, rootNode);
-//        // add the identification to this tag
-//        softwareNode.id = "Software";
-//        softwareNode.setIcon("box.png");
-//        
-//        // we need to map a list of spdx folders and files
-//        HashMap<File, TreeNodeSPDX> folderList = new HashMap();
-//        // first pass to add up all nodes and folders
-//        for(File folder : tempFolderList){
-//            TreeNodeSPDX node = new TreeNodeSPDX(folder.getName());
-//            node.setIcon("envelope.png");
-//            folderList.put(folder, node);
-//        }
-//       
-//        
-//        
-//        // second pass to add them all up on the tree view
-//        for(File folder : folderList.keySet()){
-//            TreeNodeSPDX node = folderList.get(folder);
-//            softwareNode.add(node);
-//        }
-//        
-//                
-//      
-//        //System.exit(-1981);
-//    }  
-//        
-       
-//        
-//        // iterate through the final list, build the folder list, add tree nodes
-//        for(File file: fileList){
-//            // get only the folder base, be careful with path separators here
-//            String folderName = file.getParent().replace(baseFolder, "");
-//            // no need to add in case the folder is the root
-//            if(folderName.isEmpty()){
-//                continue;
-//            }
-//            // no need to continue in case this folder was already added before
-//            if(folderList.containsKey(folderName)){
-//                continue;
-//            }
-//            
-//            String simpleFolderName = file.getParentFile().getName();
-//            
-//            // create the node for hosting our list of SPDX documents
-//            TreeNodeSPDX node = nodeCreate(
-//                    simpleFolderName // get the normal name (no path components)
-//                    , NodeType.folder // just a normal folder
-//                    , rootNode); // add 
-//        // add the identification to this tag
-//        softwareNode.id = "";
-//            
-//            // build up our list of folders
-//            System.err.println(folderName);
-//            folderList.put(folderName, rootNode);
-//        }             
-            
-  
     
 }