Syntax error on token "null", Identifier Expected

340 views
Skip to first unread message

DartmanX

unread,
Apr 19, 2011, 1:01:52 PM4/19/11
to GWTP
I'm having trouble compiling my presenters, using 0.6-SNAPSHOT. Here
is the relevant portion of one of my presenters:

public class MapmakerDisclaimerViewPresenter extends
Presenter<MapmakerDisclaimerViewPresenter.MyView,
MapmakerDisclaimerViewPresenter.MyProxy> {

public interface MyView extends View {
}

@ProxyStandard
@NameToken("disclaimer")
public interface MyProxy extends
Proxy<MapmakerDisclaimerViewPresenter> {
}

@Inject
public MapmakerDisclaimerViewPresenter(EventBus eventBus, MyView
view, MyProxy proxy) {
super(eventBus, view, proxy);
}
}

Here is what the gwt development code is telling me:

00:00:18.670 [ERROR] Errors in 'F:\Programming\Projects
\mapmaker2\target\.generated\org\jason\mapmaker\client\presenter
\StackFeaturesPanelPresenterMyProxyImpl.java'
00:00:18.670 [ERROR] Line 44: Syntax error on token "null", Identifier
expected

Here is the generated code:

public class StackExportPanelPresenterMyProxyImpl extends
com.gwtplatform.mvp.client.proxy.ProxyPlaceImpl<StackExportPanelPresenter>
implements
org.jason.mapmaker.client.presenter.StackExportPanelPresenter.MyProxy,
com.gwtplatform.mvp.client.DelayedBind {

private org.jason.mapmaker.client.ioc.MapmakerGinjector ginjector;

public static class WrappedProxy
extends
com.gwtplatform.mvp.client.proxy.ProxyImpl<StackExportPanelPresenter>
implements com.gwtplatform.mvp.client.DelayedBind {

private org.jason.mapmaker.client.ioc.MapmakerGinjector ginjector;

public WrappedProxy() {
}

@Override
public void delayedBind(Ginjector baseGinjector) {
ginjector =
(org.jason.mapmaker.client.ioc.MapmakerGinjector)baseGinjector;
bind(ginjector.getProxyFailureHandler(),
ginjector.getPlaceManager(),
ginjector.getEventBus());
presenter = new
StandardProvider<StackExportPanelPresenter>( ginjector.null() );
}
}

public StackExportPanelPresenterMyProxyImpl() {
DelayedBindRegistry.register(this);
}

@Override
public void delayedBind(Ginjector baseGinjector) {
ginjector =
(org.jason.mapmaker.client.ioc.MapmakerGinjector)baseGinjector;
bind(ginjector.getProxyFailureHandler(),
ginjector.getPlaceManager(),
ginjector.getEventBus());
WrappedProxy wrappedProxy = GWT.create(WrappedProxy.class);
wrappedProxy.delayedBind( ginjector );
proxy = wrappedProxy;
String nameToken = "stackAdminPanel";
place = new
com.gwtplatform.mvp.client.proxy.PlaceImpl( nameToken );
}
}

The problem seems to be on this line:

presenter = new
StandardProvider<StackExportPanelPresenter>( ginjector.null() );

Can anyone assist?

Philippe Beaudoin

unread,
Apr 19, 2011, 1:07:49 PM4/19/11
to gwt-pl...@googlegroups.com
My guess is you don't have a method that returns a
Provider<StackExportPanelPresenter> in your ginjector. See:
http://code.google.com/p/gwt-platform/wiki/GettingStarted?tm=6#Binding_everything_together
That should be reported by GWTP so there seems to be a bug here. I've
entered an issue for it:
http://code.google.com/p/gwt-platform/issues/detail?id=304

Cheers,

Philippe

DartmanX

unread,
Apr 19, 2011, 1:35:29 PM4/19/11
to GWTP
That did it. I was using @ProxyStandard, but returning AsyncProvider
in my Ginjector class.

On Apr 19, 12:07 pm, Philippe Beaudoin <philippe.beaud...@gmail.com>
wrote:
> My guess is you don't have a method that returns a
> Provider<StackExportPanelPresenter> in your ginjector. See:
>  http://code.google.com/p/gwt-platform/wiki/GettingStarted?tm=6#Bindin...
> That should be reported by GWTP so there seems to be a bug here. I've
> entered an issue for it:
>  http://code.google.com/p/gwt-platform/issues/detail?id=304
>
> Cheers,
>
>      Philippe
>
Reply all
Reply to author
Forward
0 new messages