Joseph Carroll Messages: 156 Registered: May 2012 Location: Milwaukee, WI
Senior Member
Is it possible to have elements from the CSS engine injected? (Like the main toolbar color)
I haven't worked with the rendering engine very much. I have a feeling that it could be possible if the color was stored as some kind of system property. But like I said I still need to work with it much more.
No but you can get the CSSEngine and query that for informations.
Tom
Am 17.07.12 22:57, schrieb Joseph Carroll:
> Is it possible to have elements from the CSS engine injected? (Like the
> main toolbar color)
>
> I haven't worked with the rendering engine very much. I have a feeling
> that it could be possible if the color was stored as some kind of system
> property. But like I said I still need to work with it much more.
>
> Just thought I would check. Thanks,
>
> JD
Sopot Cela Messages: 447 Registered: December 2010
Senior Member
You can inject only what is in the IEclipseContext hierarchy or OSGi Services (and preferences). If you want anything to be available to you for injection, put it in an IEC along with a key, accessible from your context.
You can inject only what is in the IEclipseContext hierarchy or OSGi Services (and preferences). If you want anything to be available to you for injection, put it in an IEC along with a key, accessible from your context.
And one special type of OSGi service is an IContextFunction computes some value given the originating context. So you could obtain the corresponding model element and its widget and then query for its corresponding CSS element.
Sopot Cela Messages: 447 Registered: December 2010
Senior Member
Brian de Alwis wrote on Wed, 18 July 2012 12:58
Sopot Cela wrote on Tue, 17 July 2012 22:03
You can inject only what is in the IEclipseContext hierarchy or OSGi Services (and preferences). If you want anything to be available to you for injection, put it in an IEC along with a key, accessible from your context.
And one special type of OSGi service is an IContextFunction computes some value given the originating context. So you could obtain the corresponding model element and its widget and then query for its corresponding CSS element.
IContextFunction would be even more powerful if it would pass on the
requestor (the target of the injection if one available) like the object
supplier does.
Tom
Am 18.07.12 12:10, schrieb Sopot Cela:
> Brian de Alwis wrote on Wed, 18 July 2012 12:58
>> Sopot Cela wrote on Tue, 17 July 2012 22:03
>> > You can inject only what is in the IEclipseContext hierarchy or OSGi
>> Services (and preferences). If you want anything to be available to
>> you for injection, put it in an IEC along with a key, accessible from
>> your context.
>>
>>
>> And one special type of OSGi service is an IContextFunction computes
>> some value given the originating context. So you could obtain the
>> corresponding model element and its widget and then query for its
>> corresponding CSS element.
>
>
> Yep I think ICF are really powerful. I've done some fancy things with
> them https://github.com/scela/us.icitapled.smc.e4