Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » CSS & DI
CSS & DI [message #896283] Tue, 17 July 2012 20:57 Go to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
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.

Just thought I would check. Thanks,

JD
Re: CSS & DI [message #896286 is a reply to message #896283] Tue, 17 July 2012 21:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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] Wed, 18 July 2012 02: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 09: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 10: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 10:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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 10:45 Go to previous messageGo to next message
Eclipse UserFriend
+1 for that.

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

Report message to a moderator

Re: CSS & DI [message #896462 is a reply to message #896414] Wed, 18 July 2012 12:57 Go to previous message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

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: Fri Apr 19 13:50:03 GMT 2024

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

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

Back to the top