http://gwt-code-reviews.appspot.com/102801/diff/1/43
File dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode189
Line 189: error("Multiple runASync calls are named " + name);
The error reporting needs to produce something like this in the
TreeLogger:


Multiple runAsync calls are named " foo:
   - Foo.someMethod (Foo.java:23)
   - Bar.method (Bar.java:55)

to clearly indicate where the trouble is.

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode223
Line 223: private static String nameFromClassLiteral(JClassLiteral
classLiteral) {
Why extract this when it's used once?

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode243
Line 243: private void execImpl() throws UnableToCompleteException {
This setup is a no-go.  The behavior of the compiler really should be
that once the AST is set up, the only reason for it to stop is that
there's an internal error.

The place to do up-front validation is in UnitProcessorImpl.process().
The upside of doing it here is that incorrect usage of runAsync() can be
reported like any other compile error (source location, etc) and not as
an internal compiler error.

http://gwt-code-reviews.appspot.com/102801/diff/1/3
File
samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/3#newcode124
Line 124: private static <T> List<T> list(T... elems) {
Replace this with Arrays.asList()

http://gwt-code-reviews.appspot.com/102801/diff/1/39
File
samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/39#newcode35
Line 35: @ShowcaseStyle( {
The eclipse formatter likes to inject an extra leading space with
array-valued annotations.  One trick to ensure consistent reformatting
is to say

@Annotation(value = {....})

http://gwt-code-reviews.appspot.com/102801/diff/1/45
File user/src/com/google/gwt/core/client/prefetch/Prefetcher.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/45#newcode33
Line 33: public static void prefetch(Iterable<? extends
PrefetchableResource> resources) {
Add a singleton convenience method.

http://gwt-code-reviews.appspot.com/102801/diff/1/45#newcode51
Line 51: throw new RuntimeException("Unknown resource type: "
IllegalArgumentException

http://gwt-code-reviews.appspot.com/102801/diff/1/47
File user/src/com/google/gwt/core/client/prefetch/RunAsyncCode.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/47#newcode57
Line 57: public boolean isLoaded() {
Extract this method into the superinterface?

http://gwt-code-reviews.appspot.com/102801/diff/1/44
File
user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/44#newcode146
Line 146: private static List<Integer> list(int... elems) {
Arrays.asList() instead.

http://gwt-code-reviews.appspot.com/102801

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to