18 package org.turro.wd.tree;
20 import java.text.ParseException;
21 import org.turro.wd.files.Directory;
22 import org.turro.wd.files.DirectorySet;
23 import org.turro.wd.files.WorkFile;
24 import org.turro.wd.files.WorkFileSet;
25 import org.turro.wd.files.WorkingDirectory;
26 import org.apache.pivot.wtk.content.TreeNode;
27 import org.apache.pivot.collections.ArrayList;
28 import org.apache.pivot.wtk.content.TreeBranch;
39 this.workingDirectory = workingDirectory;
43 private void createList() throws ParseException {
45 addDirectories(
null, workingDirectory.
getDirs());
46 addFiles(
null, workingDirectory.
getFiles());
49 private void addDirectories(TreeBranch root, DirectorySet dirs)
throws ParseException {
50 for(Directory d : dirs) {
51 TreeDirectory td =
new TreeDirectory();
58 addDirectories(td, d.getDirs());
59 addFiles(td, d.getFiles());
63 private void addFiles(TreeBranch root, WorkFileSet files)
throws ParseException {
64 for(WorkFile f : files) {
65 TreeWorkFile twf =
new TreeWorkFile();
WorkingTreeModel(WorkingDirectory workingDirectory)