It would be cool if someone (bobv) could implement the following ;-)

ImmutableResourceBundle right now offers all that is needed to bundle
the required resources for a widget - except localized constants and
messages.
It would be perfect it the functionality currently provided in the
i18n module would be available in the ImmutableResourceBundle.

Ok, this is only imagination based on the user perspective, but this
is how it could look like:


  /**
   * All resources used by tree table
   */

@DefaultLocale("en_US")
public interface TreeTableResources extends ImmutableResourceBundle {
  /**
   * The css file.
   */
  @Resource("com/google/gwt/gen2/widgetbase/public/TreeTable.css")
  Css css();

  @Resource("treeClosed.gif")
  ImageResource treeClosed();

  @Resource("treeOpen.gif")
  ImageResource treeOpen();

  @Resource("filename")
  StringResource hello();

  @Resource("filename")
  @DefaultText("You have {0} widgets")
  @PluralText({"one", "You have one widget")
  StringResource widgetCount(@PluralCount int count);
}

A StringBundleBuilder needs to collect all the defined StringResources
and grab the content from a propertyfile to generate the appropriate
class.

No idea if this is possible to implement as I've never touched the
generator part of gwt, but from a users perspective this would be
cool.
We could simple pass an instance of this ImmutableResourceBundle to a
widget to completely customize its appearance.
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to