It seems to look like what i dreamt.
It is not code generation, but a java view of the CSS ressource
(retrieved as an image Bundle)

http://code.google.com/p/google-web-toolkit-incubator/wiki/CssResourceCookbook

CssResource will use method names as CSS class names to obfuscate at
runtime.

interface MyCss extends CssResource {
  String className();
}

interface MyResources extends ImmutableResourceBundle {
  @Resource("my.css")
  MyCss css();
}
All instances of a selector with .className will be replaced with an
obfuscated symbol when the CSS is compiled. To use the obfuscated
name:

MyResources resources = GWT.create(MyResources.class);
Label l = new Label("Some text");
l.addStyleName(resources.css().className());
If you have class names in your css file that are not legal Java
identifiers, you can use the @ClassName annotation on the accessor
method:

interface MyCss extends CssResource {
  @ClassName("some-other-name")
  String someOtherName();
}


It allows to link java to css. but it is still a rewrite.
If it alert you about an error at compile time (as the imageBundle
do), it is still an enhancement.

I take it!

Thank you Vador ;)
--~--~---------~--~----~------------~-------~--~----~
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