Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] CSS to SWT mapping

Hi,

I just had a look at the CSS part in e4 and came across the mapping between CSS and SWT (http://wiki.eclipse.org/E4/CSS/SWT_Mapping). I'd like to suggest to remove that indirection. If we instead had a general function to map between CSS properties and the corresponding setters in the widgets (e.g. foo <-> setFoo) , it would be much easier for users to see what's configurable, just by looking at the widget class. Also the properties would become available from the CSS- language as soon as I introduce a setter method. In addition we could implement tooling providing content assist, compile checks, navigation and rename refactoring.

This would basically result in writing :
"""
import org.eclipse.swt.widgets.*

Text {
   background :  #FF0000; //because it's Text.setBackground(Color)
}
"""

instead of :

"""
Text {
   back-ground :  #FF0000;
}
"""

What do you think?

Cheers,
Sven





Back to the top