Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » CSS & DI
CSS & DI [message #896283] Tue, 17 July 2012 16:57 Go to next message
Eclipse UserFriend
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 #896286 is a reply to message #896283] Tue, 17 July 2012 17:10 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: CSS & DI [message #896310 is a reply to message #896286] Tue, 17 July 2012 22:03 Go to previous messageGo to next message
Eclipse UserFriend
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 05:58 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: CSS & DI [message #896407 is a reply to message #896402] Wed, 18 July 2012 06:10 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: CSS & DI [message #896414 is a reply to message #896407] Wed, 18 July 2012 06:36 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: CSS & DI [message #896418 is a reply to message #896414] Wed, 18 July 2012 06:45 Go to previous messageGo to next message
Eclipse UserFriend
+1 for that.

[Updated on: Wed, 18 July 2012 06:48] by Moderator

Re: CSS & DI [message #896462 is a reply to message #896414] Wed, 18 July 2012 08:57 Go to previous message
Eclipse UserFriend
Should I submit a feature request?

Thanks, for all of the replies, I have something new to play with! Smile
Previous Topic:start application window from osgi console
Next Topic:Toolbar for RCP apps: change location of perspective bar, remove/move Quick Access
Goto Forum:
  


Current Time: Wed Jul 23 13:47:21 EDT 2025

Powered by FUDForum. Page generated in 0.06047 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top