|RE: [eclipse-incubator-e4-dev] Fw: Declarative UI roundup?|
I think we should minimize markup extensions (x:) because they increase the difficulties for the tools to assist the code completion and decrease the clarity of the codes. I have looked at XSWT closely. It is difficult for me to find the consistence in semantic about the element name.
Element name is sometime used as UI element type, sometime used as field/property. I just noticed it could be a method. Here is an example I found somewhere (I don’t know if it is obsolete).
x:p0="Line number foreground"/>
It seems the “add” is a method. It seems to me the XSWT XML is designed to find a way to serialize/deserialize SWT on XML without taking care of the model mapping. I suppose this raise some difficulties to correct with VE since VE relies on JavaBean.
Here is XAML code for the same UI:
<GridData heightHint="100" widthHint="220"/>
< j:String>"Current line highlight"</j:String>
< j:String>"Print margin"</j:String>
< j:String>"Find scope"</j:String>
< j:String>"Linked position"</j:String>
“j” namespace corresponds “java.lang” package. This cods uses “items” property in array of type String.
[mailto:eclipse-incubator-e4-dev-bounces@xxxxxxxxxxx] On Behalf Of David Orme
The original xswt design always required the x:children node so that this ambiguity couldn't exist. I removed that requirement when I realized that the syntax didn't actually clarify anything nearly all of the time. It simply added line noise to read past and keystrokes to type.
Back to the top