RR : Make @url and gwt-image work with nested ClientBundles

11 views
Skip to first unread message

bo...@google.com

unread,
Dec 15, 2009, 12:19:56 AM12/15/09
to rj...@google.com, google-web-tool...@googlegroups.com
Reviewers: Ray Ryan,

Message:
Review requested.

Description:
This patch makes @url and the gwt-image property of @sprite blocks
accept dot-path values so that they can be used with nested
ClientBundles.

http://code.google.com/p/google-web-toolkit/issues/detail?id=4341

Please review this at http://gwt-code-reviews.appspot.com/126802

Affected files:
M dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java
M user/src/com/google/gwt/resources/css/Spriter.java
M user/src/com/google/gwt/resources/css/SubstitutionReplacer.java
M user/src/com/google/gwt/resources/css/ast/CssNodeCloner.java
M user/src/com/google/gwt/resources/css/ast/CssProperty.java
M user/src/com/google/gwt/resources/css/ast/CssSprite.java
M user/src/com/google/gwt/resources/css/ast/CssUrl.java
M user/src/com/google/gwt/resources/ext/ResourceGeneratorUtil.java
M user/src/com/google/gwt/resources/rg/CssResourceGenerator.java
M user/test/com/google/gwt/resources/client/CSSResourceTest.java
M user/test/com/google/gwt/resources/client/test.css


rj...@google.com

unread,
Dec 15, 2009, 12:37:46 AM12/15/09
to bo...@google.com, google-web-tool...@googlegroups.com

http://gwt-code-reviews.appspot.com/126802/diff/1/2
File dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java
(right):

http://gwt-code-reviews.appspot.com/126802/diff/1/2#newcode462
Line 462: return getFlattenedSuperTypeHierarchy(this);
Just FYI:

I could use this in UiBinder if I had some control over its ordering. My
specific need is "breadth first", with myself and my interfaces at the
head of the list, and then the same treatment for each super class and
super interface. That is:

com.google.gwt.uibinder.rebind.UiBinderWriter.getClassHierarchyBreadthFirst(JClassType)

http://gwt-code-reviews.appspot.com/126802/diff/1/9
File user/src/com/google/gwt/resources/ext/ResourceGeneratorUtil.java
(right):

http://gwt-code-reviews.appspot.com/126802/diff/1/9#newcode312
Line 312: public static JMethod getMethodByPath(TreeLogger logger,
JClassType rootType,
Perhaps this could be an instance method on JClassType, where the
receiver is the rootType?

http://gwt-code-reviews.appspot.com/126802/diff/1/9#newcode328
Line 328: throw new NotFoundException();
Rather than doing your own logging, why not define your own exception
type and let callers decide what to do wrt logs and the exception's
message? Or perhaps stick with NotFoundException and promise a decent
message?

Signed,
Potential Caller

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

rj...@google.com

unread,
Dec 15, 2009, 12:44:34 AM12/15/09
to bo...@google.com, google-web-tool...@googlegroups.com
Also, getMethodByPath needs a unit test. (I feel just fine asking for
such things now that I know how to create test CompilationStates.)

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

rj...@google.com

unread,
Dec 15, 2009, 12:55:44 AM12/15/09
to bo...@google.com, google-web-tool...@googlegroups.com
Like this (we need to stop copy/pasting createCompileLogger(), though)

private static TreeLogger createCompileLogger() {
PrintWriterTreeLogger logger = new PrintWriterTreeLogger(new
PrintWriter(
System.err, true));
logger.setMaxDetail(TreeLogger.ERROR);
return logger;
}

CompilationState state = CompilationStateBuilder.buildFrom(
createCompileLogger(), JavaResourceBase.getStandardResources());


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

bo...@google.com

unread,
Dec 15, 2009, 2:12:22 AM12/15/09
to rj...@google.com, google-web-tool...@googlegroups.com

rj...@google.com

unread,
Dec 22, 2009, 6:45:54 PM12/22/09
to bo...@google.com, google-web-tool...@googlegroups.com
Believe I already re-reviewed this, but for the record: LGTM

Did it get submitted?

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

Reply all
Reply to author
Forward
0 new messages