I'm trying to split my code using sort of proxies, where I reuse
parametrized RunAsyncCallback class. This class has basically  just
reference to Gin Provider of the real module class. When I use this
for loading one module, it works perfectly, and I'm getting nice and
correct location of split point in report. When I use this second
time, loading different module proxy which uses the same
RunAsyncCallback class, both split points happen to be in Leftovers
code. Yet, split point on my proxies are still listed in report, but
with the same minimal (386) size.

I tried to use inline implementation of RunAsyncCallback instead, and
surprise! Split points worked correctly again.

Here is my parametrized RunAsyncCallback class:

class AsyncLoader implements RunAsyncCallback {

    private ProjectPresenter parent;
    private PlaceManager placeManager;
    private Provider<? extends AbstractLabeledPresenter> real;

    AsyncLoader( ProjectPresenter parent,
                 Provider<? extends AbstractLabeledPresenter> real,
                 PlaceManager placeManager ) {

        this.placeManager = placeManager;
        this.parent = parent;
        this.real = real;
    }

    @Override
    public void onFailure(Throwable reason) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onSuccess() {
        AbstractLabeledPresenter mod = real.get();
        parent.addModule( mod );

        if ( mod.hasToken( History.getToken() ) ) {
            mod.revealDisplay();
            parent.show(mod);
            placeManager.fireCurrentPlace();
        }

    }
}

This is inner class defined in AbstractLabeledPresenter, that's the
same one I'm proxying and loading with GWT.runAsync. @Inject
annotation is not present because injection is done on proxy class
which in turn instatiates AbstractLabeledPresenter$AsyncLoader.

Not sure whether this is bug, but I can't see any linking or any other
rason why that code should end up in Leftovers and have empty, zero
size split points.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to