Mercurial > projects > dwt-addons
comparison dwtx/jface/viewers/StructuredViewer.d @ 40:da5ad8eedf5d
debug prints, dwt.dwthelper restructure, ...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 10 Apr 2008 08:59:39 +0200 |
parents | 644f1334b451 |
children | ea8ff534f622 |
comparison
equal
deleted
inserted
replaced
39:644f1334b451 | 40:da5ad8eedf5d |
---|---|
68 import dwtx.jface.util.OpenStrategy; | 68 import dwtx.jface.util.OpenStrategy; |
69 import dwtx.jface.util.SafeRunnable; | 69 import dwtx.jface.util.SafeRunnable; |
70 | 70 |
71 import dwt.dwthelper.utils; | 71 import dwt.dwthelper.utils; |
72 import dwt.dwthelper.Runnable; | 72 import dwt.dwthelper.Runnable; |
73 import tango.util.log.Trace; | |
73 | 74 |
74 /** | 75 /** |
75 * Abstract base implementation for structure-oriented viewers (trees, lists, | 76 * Abstract base implementation for structure-oriented viewers (trees, lists, |
76 * tables). Supports custom sorting, filtering, and rendering. | 77 * tables). Supports custom sorting, filtering, and rendering. |
77 * <p> | 78 * <p> |
2051 * @param properties | 2052 * @param properties |
2052 * the properties that have changed, or <code>null</code> to | 2053 * the properties that have changed, or <code>null</code> to |
2053 * indicate unknown | 2054 * indicate unknown |
2054 */ | 2055 */ |
2055 protected void internalUpdate(Widget widget, Object element, String[] properties) { | 2056 protected void internalUpdate(Widget widget, Object element, String[] properties) { |
2057 Trace.formatln( "{} {}:", __FILE__, __LINE__ ); | |
2056 bool needsRefilter_ = false; | 2058 bool needsRefilter_ = false; |
2057 if (properties !is null) { | 2059 if (properties !is null) { |
2058 for (int i = 0; i < properties.length; ++i) { | 2060 for (int i = 0; i < properties.length; ++i) { |
2059 needsRefilter_ = needsRefilter(element, properties[i]); | 2061 needsRefilter_ = needsRefilter(element, properties[i]); |
2060 if (needsRefilter_) { | 2062 if (needsRefilter_) { |
2158 * Build a label up for the element using the supplied label provider. | 2160 * Build a label up for the element using the supplied label provider. |
2159 * @param updateLabel The ViewerLabel to collect the result in | 2161 * @param updateLabel The ViewerLabel to collect the result in |
2160 * @param element The element being decorated. | 2162 * @param element The element being decorated. |
2161 */ | 2163 */ |
2162 protected void buildLabel(ViewerLabel updateLabel, Object element){ | 2164 protected void buildLabel(ViewerLabel updateLabel, Object element){ |
2165 Trace.formatln( "{} {}:", __FILE__, __LINE__ ); | |
2163 | 2166 |
2164 if ( auto vlp = cast(IViewerLabelProvider)getLabelProvider() ) { | 2167 if ( auto vlp = cast(IViewerLabelProvider)getLabelProvider() ) { |
2165 IViewerLabelProvider itemProvider = cast(IViewerLabelProvider) getLabelProvider(); | 2168 IViewerLabelProvider itemProvider = cast(IViewerLabelProvider) getLabelProvider(); |
2166 itemProvider.updateLabel(updateLabel, element); | 2169 itemProvider.updateLabel(updateLabel, element); |
2167 | 2170 |
2195 * @param updateLabel The ViewerLabel to collect the result in | 2198 * @param updateLabel The ViewerLabel to collect the result in |
2196 * @param element The element being decorated. | 2199 * @param element The element being decorated. |
2197 * @param labelProvider ILabelProvider the labelProvider for the receiver. | 2200 * @param labelProvider ILabelProvider the labelProvider for the receiver. |
2198 */ | 2201 */ |
2199 void buildLabel(ViewerLabel updateLabel, Object element, IViewerLabelProvider labelProvider){ | 2202 void buildLabel(ViewerLabel updateLabel, Object element, IViewerLabelProvider labelProvider){ |
2203 Trace.formatln( "{} {}:", __FILE__, __LINE__ ); | |
2200 | 2204 |
2201 labelProvider.updateLabel(updateLabel, element); | 2205 labelProvider.updateLabel(updateLabel, element); |
2202 | 2206 |
2203 colorAndFontCollector.setUsedDecorators(); | 2207 colorAndFontCollector.setUsedDecorators(); |
2204 | 2208 |
2221 * @param updateLabel The ViewerLabel to collect the result in | 2225 * @param updateLabel The ViewerLabel to collect the result in |
2222 * @param elementPath The path of the element being decorated. | 2226 * @param elementPath The path of the element being decorated. |
2223 * @param labelProvider ILabelProvider the labelProvider for the receiver. | 2227 * @param labelProvider ILabelProvider the labelProvider for the receiver. |
2224 */ | 2228 */ |
2225 void buildLabel(ViewerLabel updateLabel, TreePath elementPath,ITreePathLabelProvider labelProvider){ | 2229 void buildLabel(ViewerLabel updateLabel, TreePath elementPath,ITreePathLabelProvider labelProvider){ |
2230 Trace.formatln( "{} {}:", __FILE__, __LINE__ ); | |
2226 | 2231 |
2227 labelProvider.updateLabel(updateLabel, elementPath); | 2232 labelProvider.updateLabel(updateLabel, elementPath); |
2228 | 2233 |
2229 colorAndFontCollector.setUsedDecorators(); | 2234 colorAndFontCollector.setUsedDecorators(); |
2230 | 2235 |
2247 * @param updateLabel The ViewerLabel to collect the result in | 2252 * @param updateLabel The ViewerLabel to collect the result in |
2248 * @param element The element being decorated. | 2253 * @param element The element being decorated. |
2249 * @param labelProvider ILabelProvider the labelProvider for the receiver. | 2254 * @param labelProvider ILabelProvider the labelProvider for the receiver. |
2250 */ | 2255 */ |
2251 void buildLabel(ViewerLabel updateLabel, Object element,ILabelProvider labelProvider){ | 2256 void buildLabel(ViewerLabel updateLabel, Object element,ILabelProvider labelProvider){ |
2257 Trace.formatln( "{} {}:", __FILE__, __LINE__ ); | |
2252 updateLabel.setText(labelProvider.getText(element)); | 2258 updateLabel.setText(labelProvider.getText(element)); |
2253 updateLabel.setImage(labelProvider.getImage(element)); | 2259 updateLabel.setImage(labelProvider.getImage(element)); |
2254 } | 2260 } |
2255 | 2261 |
2256 /** | 2262 /** |