[gwt-contrib] Re: Issue 6040: Editor framework does not support is / has methods (issue1359804)

2011-02-19 Thread t . broyer


I noticed that JBeanMethod (and BeanMethod) treat java.lang.Boolean the
same as boolean, contrary to my first patch, hence the changes to the
unit test between the two patch sets.


http://gwt-code-reviews.appspot.com/1359804/diff/1/3
File user/src/com/google/gwt/editor/rebind/model/EditorModel.java
(right):

http://gwt-code-reviews.appspot.com/1359804/diff/1/3#newcode504
user/src/com/google/gwt/editor/rebind/model/EditorModel.java:504: String
getterName = camelCase(get, parts[i]);
On 2011/02/18 14:43:47, bobv wrote:

Use JBeanMethod from the autobean rebind package instead.  Build up

something

like a memoized MapClass, MapString, JMethod for any method

matched by

JBeanMethod.GET (which understands is/has), using the inferName()

method to

extract the property name.



There's also an associated BeanMethod in autobean.server.impl that has

the same

setup, if you ever need to do something similar with reflection-based

code.

Done.

In the end, I almost completely rewrote the method. I find it more
readable now (for instance, it no longer deals with removing the last
added thing to StringBuilders, it instead doesn't append in the first
place when on the last path), hope you'll agree.

http://gwt-code-reviews.appspot.com/1359804/show

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


[gwt-contrib] Re: Issue 6040: Editor framework does not support is / has methods (issue1359804)

2011-02-18 Thread bobv


http://gwt-code-reviews.appspot.com/1359804/diff/1/3
File user/src/com/google/gwt/editor/rebind/model/EditorModel.java
(right):

http://gwt-code-reviews.appspot.com/1359804/diff/1/3#newcode504
user/src/com/google/gwt/editor/rebind/model/EditorModel.java:504: String
getterName = camelCase(get, parts[i]);
Use JBeanMethod from the autobean rebind package instead.  Build up
something like a memoized MapClass, MapString, JMethod for any
method matched by JBeanMethod.GET (which understands is/has), using the
inferName() method to extract the property name.

There's also an associated BeanMethod in autobean.server.impl that has
the same setup, if you ever need to do something similar with
reflection-based code.

http://gwt-code-reviews.appspot.com/1359804/show

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


[gwt-contrib] Re: Issue 6040: Editor framework does not support is / has methods (issue1359804)

2011-02-18 Thread t . broyer

http://gwt-code-reviews.appspot.com/1359804/show

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