|
|
Re: Overriding getBackground in the generated itemprovider [message #426578 is a reply to message #426577] |
Wed, 14 January 2009 12:53 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Ben,
I should mention too, that AdapterFactoryLabelProvider of course has
convenient methods to hide all the details...
Ed Merks wrote:
> Ben,
>
> Comments below.
>
>
> Ben wrote:
>> I am overriding the ItemProviderAdapter.getBackground() method in my
>> generated itemprovider and I would like to know if there is a way to
>> access it via the EObject adapter like when one want to access the
>> getText and getImage methods.
>>
>> IItemLabelProvider itemLabelProvider =
>> (IItemLabelProvider)adapterFactory.adapt(object,
>> IItemLabelProvider.class);
>> itemLabelProvider.getImage(object)
>>
>>
>> In other words, is there way I can obtain the ItemProviderAdapter the
>> same way as shown above for the IItemLabelProvider?
> Like IItemColorProvider. Note that in the GenModel's Edit properties
> you can enable Color Providers (not to mention Font and Table). This
> should update the registration in the plugin.xml but since that
> doesn't merge, you have to update it manual or delete it and
> regenerate it...
>>
>> TIA!
>>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03079 seconds