IColorProvider colorProvider = (IColorProvider)adapterFactory.adapt(object, IColorProvider.class);
if( colorProvider!=null ){
return colorProvider.getForeground(object);
}
IItemLabelProvider itemLabelProvider = (IItemLabelProvider)adapterFactory.adapt(object, IItemLabelProvider.class);
if( itemLabelProvider instanceof IColorProvider ){
colorProvider=(IColorProvider) itemLabelProvider;
return colorProvider.getForeground(object);
}
return null;