ArcBees/GWTP — pull request #106 by kuhnroyal (2013-01-12 12:55:08+00:00)
Title: Pre bootstrap hook

I added a pre bootstrap hook that allows to do something like https://github.com/ArcBees/GWTP/issues/103. Also to simplify the generator a default bootstrapper has been added that is used if no custom implementation is found.

Example:
```java
@PreBootstrap
public class PreBootstrapperImpl implements PreBootstrapper {
@Override
public void onPreBootstrap() {
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
@Override
public void onUncaughtException(final Throwable e) {
Window.alert(e.getMessage());
}
});
}
}
```

The generated ApplicationController if a pre bootstrapper is found:
```java
public class ApplicationControllerImpl implements ApplicationController {
@Override
public void init() {
new PreBootstrapperImpl().onPreBootstrap();

Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
DelayedBindRegistry.bind(com.gwtplatform.mvp.client.ClientGinjector.SINGLETON);

com.gwtplatform.mvp.client.ClientGinjector.SINGLETON.getBootstrapperImpl().onBootstrap();
}
});
}
}
```

The generated ApplicationController if no pre bootstrapper is found:
```java
public class ApplicationControllerImpl implements ApplicationController {
@Override
public void init() {
DelayedBindRegistry.bind(com.gwtplatform.mvp.client.ClientGinjector.SINGLETON);

com.gwtplatform.mvp.client.ClientGinjector.SINGLETON.getBootstrapperImpl().onBootstrap();
}
}
```