|
Lines 180-186
Link Here
|
| 180 |
IBaseLabelProvider prov = getLabelProvider(); |
180 |
IBaseLabelProvider prov = getLabelProvider(); |
| 181 |
ITableLabelProvider tprov = null; |
181 |
ITableLabelProvider tprov = null; |
| 182 |
ILabelProvider lprov = null; |
182 |
ILabelProvider lprov = null; |
|
|
183 |
ITableColorProvider cprov = null; |
| 183 |
|
184 |
|
|
|
185 |
if (prov instanceof ITableColorProvider) { |
| 186 |
cprov = (ITableColorProvider)prov; |
| 187 |
} |
| 184 |
|
188 |
|
| 185 |
if (prov instanceof ITableLabelProvider) { |
189 |
if (prov instanceof ITableLabelProvider) { |
| 186 |
tprov = (ITableLabelProvider) prov; |
190 |
tprov = (ITableLabelProvider) prov; |
|
Lines 195-200
Link Here
|
| 195 |
// Similar code in TableTreeViewer.doUpdateItem() |
199 |
// Similar code in TableTreeViewer.doUpdateItem() |
| 196 |
String text = "";//$NON-NLS-1$ |
200 |
String text = "";//$NON-NLS-1$ |
| 197 |
Image image = null; |
201 |
Image image = null; |
|
|
202 |
if(cprov != null) { |
| 203 |
ti.setBackground(column, cprov.getBackground(element, column)); |
| 204 |
ti.setForeground(column, cprov.getForeground(element, column)); |
| 205 |
} |
| 198 |
if (tprov != null) { |
206 |
if (tprov != null) { |
| 199 |
text = tprov.getColumnText(element, column); |
207 |
text = tprov.getColumnText(element, column); |
| 200 |
image = tprov.getColumnImage(element, column); |
208 |
image = tprov.getColumnImage(element, column); |
|
Lines 216-231
Link Here
|
| 216 |
} |
224 |
} |
| 217 |
} |
225 |
} |
| 218 |
} |
226 |
} |
|
|
227 |
|
| 219 |
ti.setText(column, text); |
228 |
ti.setText(column, text); |
| 220 |
if (ti.getImage(column) != image) { |
229 |
if (ti.getImage(column) != image) { |
| 221 |
ti.setImage(column, image); |
230 |
ti.setImage(column, image); |
| 222 |
} |
231 |
} |
| 223 |
} |
232 |
} |
| 224 |
if (prov instanceof IColorProvider) { |
233 |
// if (prov instanceof IColorProvider) { |
| 225 |
IColorProvider cprov = (IColorProvider) prov; |
234 |
// IColorProvider cprov = (IColorProvider) prov; |
| 226 |
ti.setForeground(cprov.getForeground(element)); |
235 |
// ti.setForeground(cprov.getForeground(element)); |
| 227 |
ti.setBackground(cprov.getBackground(element)); |
236 |
// ti.setBackground(cprov.getBackground(element)); |
| 228 |
} |
237 |
// } |
| 229 |
if (prov instanceof IFontProvider) { |
238 |
if (prov instanceof IFontProvider) { |
| 230 |
IFontProvider fprov = (IFontProvider) prov; |
239 |
IFontProvider fprov = (IFontProvider) prov; |
| 231 |
ti.setFont(fprov.getFont(element)); |
240 |
ti.setFont(fprov.getFont(element)); |