/** * This does the same thing as IColorProvider.getBackground, * it fetches the foreground color specific to this object instance. */ public Object getBackground(Object object) { if (object instanceof EList<?>) { for (Object child : (EList<?>)object) { return getBackground(child); } return null; } else { IItemColorProvider itemFontProvider = (IItemColorProvider)adapterFactory.adapt(object, IItemColorProvider.class); return itemFontProvider != null ? itemFontProvider.getBackground(object) : null; } }