Mercurial > projects > dwt-samples
comparison jface/FileTreeViewer.d @ 65:a84ba4d1820f
restructure the dsss.conf and resources
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 11 Apr 2008 21:15:36 +0200 |
parents | 59ae5360d98f |
children | 224fe05ea3af |
comparison
equal
deleted
inserted
replaced
64:b2bcc4b13c31 | 65:a84ba4d1820f |
---|---|
100 } | 100 } |
101 | 101 |
102 class FileTreeContentProvider : ITreeContentProvider { | 102 class FileTreeContentProvider : ITreeContentProvider { |
103 public override Object[] getChildren( Object arg0 ){ | 103 public override Object[] getChildren( Object arg0 ){ |
104 try{ | 104 try{ |
105 auto fp = cast(FilePath)arg0; | 105 Object[] res; |
106 Object[] res; | 106 foreach( item; cast(FilePath)arg0 ){ |
107 if( !fp.isFolder()) { | 107 res ~= FilePath.from( item ); |
108 return null; | 108 } |
109 } | 109 return res; |
110 foreach( item; fp ){ | |
111 res ~= FilePath.from( item ); | |
112 } | |
113 | |
114 return res; | |
115 } | 110 } |
116 catch( Exception e ){ | 111 catch( Exception e ){ |
117 ExceptionPrintStackTrace(e); | 112 ExceptionPrintStackTrace(e); |
118 return null; | 113 return null; |
119 } | 114 } |