Wednesday, March 30, 2011

Doc problem? Renaming Modules section on http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules

The "Renaming Modules" section
(http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules)
has a weird example for renaming. From the text, it looks like the
xml should have <module rename-to="com.foo.WorkingModule.gwt.xml">,
but the example code renames MyModule to MyModule. Is the xml given
in the example just wrong (and should be <module
rename-to="com.foo.WorkingModule.gwt.xml">) or am I missing something?

Here's the section:

Renaming modules

The <module> element supports an optional attribute rename-to that
causes the compiler to behave as though the module had a different
name than the long, fully-qualified name. Renaming a module has two
primary use cases:

to have a shorter module name that doesn't reflect the actual package
structure, this is the most typical and recommended use case
to create a "working module" to speed up development time by
restricting the number of permutations

com.foo.WorkingModule.gwt.xml:

<module rename-to="com.foo.MyModule">
  <inherits name="com.foo.MyModule" />
  <set-property name="user.agent" value="ie6" />
  <set-property name="locale" value="default" />
</module>

When WorkingModule.gwt.xml is compiled, the compiler will produce only
an ie6 variant using the default locale; this will speed up
development compilations. The output from the WorkingModule.gwt.xml
will be a drop-in replacement for MyModule.gwt.xml because the
compiler will generate the output using the alternate name. (Of
course, if com.foo.MyModule was itself renamed, you would just copy
its rename-to attribute.)

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

No comments:

Post a Comment