Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(105)

Issue 90085: Fixed enum binding support (issue #49) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 11 months ago by Aragos
Modified:
16 years, 10 months ago
Reviewers:
Brian_Stoler
CC:
google-gin_googlegroups.com
Base URL:
http://google-gin.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fixes handling of inner enums and enums with custom logic.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Using getEnclosingClass #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -6 lines) Patch
src/com/google/gwt/inject/rebind/binding/BindConstantBinding.java View 1 4 chunks +18 lines, -2 lines 0 comments Download
test/com/google/gwt/inject/client/binding/Color.java View 1 chunk +11 lines, -1 line 0 comments Download
test/com/google/gwt/inject/client/binding/ConstantBindingTest.java View 1 chunk +4 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/Fruit.java View 1 chunk +34 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/FruitGinModule.java View 2 chunks +6 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/client/binding/FruitGinjector.java View 1 chunk +2 lines, -0 lines 0 comments Download
test/com/google/gwt/inject/rebind/binding/BindConstantBindingTest.java View 6 chunks +54 lines, -3 lines 0 comments Download

Messages

Total messages: 3
Aragos
Let me know if I forgot a corner case! :) Peter
16 years, 11 months ago (2009-07-02 04:07:12 UTC) #1
Brian_Stoler
http://codereview.appspot.com/90085/diff/1/8 File src/com/google/gwt/inject/rebind/binding/BindConstantBinding.java (right): http://codereview.appspot.com/90085/diff/1/8#newcode95 Line 95: className = className.substring(0, className.lastIndexOf("$")); Can you just check ...
16 years, 11 months ago (2009-07-02 04:16:03 UTC) #2
Aragos
16 years, 11 months ago (2009-07-02 20:34:57 UTC) #3
Thanks for taking a look so fast! :)

http://codereview.appspot.com/90085/diff/1/8
File src/com/google/gwt/inject/rebind/binding/BindConstantBinding.java (right):

http://codereview.appspot.com/90085/diff/1/8#newcode95
Line 95: className = className.substring(0, className.lastIndexOf("$"));
On 2009/07/02 04:16:03, Brian_Stoler wrote:
> Can you just check if getEnclosingClass is non-null and use that if not?

Using getEnclosingClass instead of substring. I can't use it on the matcher
because it would also match inner enums.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b