On Wed, Jun 22, 2011 at 4:57 AM, Thomas Broyer <[email protected]> wrote:
> I'm trying to add a unit test for issue 5926 and I don't know how to deal
> with the TypeTokenResolver to easily run the test from within Eclipse.
> I enabled the requestfactory-apt.jar annotation processor on the gwt-user
> project and it generates a Java file that cannot be compiled, because it
> uses binary names for classes instead of source names, e.g.
> addTypeToken("6GWlio0rpqSic5Nce0g_FPANjqc=",
> com.google.web.bindery.requestfactory.server.BoxesAndPrimitivesJreTest$ProxyMismatchedGetterA.class.getName());
> addTypeToken("6TPopfzq37rZzVxkFiyvasCck2Q=",
> com.google.web.bindery.requestfactory.server.RequestFactoryInterfaceValidatorTest$LocatorEntityProxy.class.getName());

I'll fix the code-gen for this.

When you added the annotation processor to Eclipse, are you seeing a
new classpath entry for .apt_generated in the package explorer? I'm
seeing different behaviors between different Eclipse installations as
to whether or not the apt source paths show up in the package
explorer.  In all cases, the generated type is available through the
"Open Type" dialog, but it's not causing a red-X to show compilation
failure.

> How do you run RF tests in Eclipse? (and are you doing it? or always running
> them through Ant?)

I usually run the RequestFactoryJreSuite in Eclipse as a regular JUnit
test for fast turnarounds and then use ant for the GWT-based tests.

> Why is it using class literals rather than just strings? to fail early if
> one of the classes cannot be found? (rather than failing only when
> InProcessRequestContext#createProxy resolves the type token)

Yes.

> instead of just processing interfaces annotated with @ProxyFor or
> @ProxyForName (roundEnv.getElementsAnnotatedWith), given that proxies have
> to be annotated to be used with RF?

That would be faster, will change this as well.  Originally RfApt was
going to look for RequestFactory interfaces.

> Am I missing something?

Nope.

-- 
Bob Vawter
Google Web Toolkit Team

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

Reply via email to