How to propagate Eclipse 4 IStylingEngine in Scout [message #1249579] |
Tue, 18 February 2014 11:48 |
Daniel Branco Messages: 14 Registered: January 2014 |
Junior Member |
|
|
Hello Everyone,
We have a requirement to implement a "ThemeManager". The old product (developed in pure Eclipse 3.x) has its implementation where uses a XML to obtain colors and images.
Now that we are working and migrating to Scout 3.9 which uses e4, we thought in substitute the "ThemeManager" for a CSS style, which is an easy way to work with SWT and RAP (despite the limitations in SWT).
Investigating how e4 works with CSS we found this:
Eclipse4 CSS with Vogella
What we need then in our application is a simple IStylingEngine in order to inject ID and ClassNames to our components, but the problem is that the injection only works if the components are created by e4 and not manually instantiated.
Further investigation made us realise that using ContextInjectionFactory.make to instantiate our components can be used to inject the style, but it can give us some problems, so we think if there is a way to have the IStylingEngine available for example in our SWT Environment or something like that.
My questions are, has anyone used the CSS in Scout SWT? Is there any other way to set ID and ClassNames to our components? If not, Any suggestion to have that @Inject IStylingEngine available "automagically" resolve by e4?
Thanks in advance and Kind regards,
Daniel Branco
|
|
|
|
Re: How to propagate Eclipse 4 IStylingEngine in Scout [message #1251873 is a reply to message #1251859] |
Thu, 20 February 2014 17:49 |
Daniel Branco Messages: 14 Registered: January 2014 |
Junior Member |
|
|
Hello Jeremie,
We are doing that, so far these are our comments:
1. IStylingEngine is not needed to be used you can assign IDs and Classes to the components using the following label.setData("org.eclipse.e4.ui.css.id", "SeparatorLabel"); check: Eclipsopedia CSS Setting class and ID SWT
2. The CSS is upto now under changes and being tested, the documentation is very poor but with some effort we are doing something. When having a decent CSS I will post it with some comments to be a reference.
3. The CSS even that is in incubation phase has its advantages, we strongly recommend it, I will post what's needed to make it run.
4. The CSS in Kepler do not support import url in order to have a base style and extend, this will become available in eclipse Luna.
5. For some study about this it can be checked Eclipse Chrome Style, this is a plug-in project that using the eclipse 4 and redifining a lot it is capable of customize a lot of colors etc, in our case we took the CSS built from there and try to customize it to our needs.
Kind regards,
Daniel Branco
[Updated on: Thu, 20 February 2014 17:51] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04776 seconds