CSS & DI [message #896283] |
Tue, 17 July 2012 20:57 |
|
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
|
|
|
|
Re: CSS & DI [message #896310 is a reply to message #896286] |
Wed, 18 July 2012 02:03 |
Eclipse User |
|
|
|
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.
|
|
|
Re: CSS & DI [message #896402 is a reply to message #896310] |
Wed, 18 July 2012 09:58 |
Eclipse User |
|
|
|
Sopot Cela wrote on Tue, 17 July 2012 22:03You 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.
|
|
|
Re: CSS & DI [message #896407 is a reply to message #896402] |
Wed, 18 July 2012 10:10 |
Eclipse User |
|
|
|
Brian de Alwis wrote on Wed, 18 July 2012 12:58Sopot Cela wrote on Tue, 17 July 2012 22:03You 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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03717 seconds