Hello

I am trying android now, and i appreciate the simple code generation
of the class 'R'.
For non android user, it allows to associate a graphic element to an
id. The id given in an xml file is automatically generated in java, in
the class R.

I am thinking about an equivalent code generation for the css files in
GWT.

example :

myStyle.css
.style{
...
}
.style-dependentStyle{
...
}
#element {
...
}

would give something like

/* AUTO-GENERATED FILE.  DO NOT MODIFY.*/
public final class Styles {
        public static final class MyStyle {
                public static final String style = "style";
                public static final String style_dependentStyle = 
"dependentStyle";
                public static final String IDelement = "element";
        }
}

which could be used like this:
widget.addStyleName(Styles.MyStyle.style);

widget.addStyleDependentName(Styles.MyStyle.style_dependantStyle);

widget.getElement.setId(Styles.MyStyle.IDelement);


The main advantage is to respect the DRY principle by avoiding boring
manual constants declaration.

This feature could be a part of the new GWT eclipse plugin
http://code.google.com/eclipse/, or a standalone eclipse plugin.

What do you think about it ?

Does anyone is interested in ?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to