package placebooks.client;

import placebooks.client.resources.Resources;
import placebooks.client.ui.PlaceBookHome;
import placebooks.client.ui.PlaceBookPreview;

import com.google.gwt.activity.shared.ActivityManager;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.place.shared.PlaceHistoryHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.SimpleEventBus;

public class PlaceBookEditor implements EntryPoint
{
	private SimplePanel appWidget = new SimplePanel();

	@Override
	public void onModuleLoad()
	{
		Resources.INSTANCE.style().ensureInjected();

		final EventBus eventBus = new SimpleEventBus();
		final PlaceController placeController = new PlaceController((com.google.gwt.event.shared.EventBus) eventBus);

		// Start ActivityManager for the main widget with our ActivityMapper
		final ActivityMapper activityMapper = new PlaceBookActivityMapper(placeController);
		final ActivityManager activityManager = new ActivityManager(activityMapper, (com.google.gwt.event.shared.EventBus) eventBus);
		activityManager.setDisplay(appWidget);

		// Start PlaceHistoryHandler with our PlaceHistoryMapper
		final PlaceBookHistoryMapper historyMapper = GWT.create(PlaceBookHistoryMapper.class);
		final PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);

		Place defaultPlace = new PlaceBookHome();

		if (GWT.getHostPageBaseURL().endsWith("/a/view/"))
		{
			defaultPlace = new PlaceBookPreview(null, Window.Location.getPath()
					.substring(Window.Location.getPath().lastIndexOf('/') + 1));
		}

		historyHandler.register(placeController, (com.google.gwt.event.shared.EventBus) eventBus, defaultPlace);

		RootPanel.get().add(appWidget);
		// Goes to the place represented on URL else default place
		historyHandler.handleCurrentHistory();
	}
}
@@ -361,16 +361,114 @@
 t.GWT;%0D%0A
+import com.google.gwt.event.shared.EventBus;%0D%0Aimport com.google.gwt.event.shared.SimpleEventBus;%0D%0A
 import c
@@ -498,24 +498,24 @@
 red.Place;%0D%0A
-
 import com.g
@@ -758,122 +758,8 @@
 el;%0D
-%0Aimport com.google.web.bindery.event.shared.EventBus;%0D%0Aimport com.google.web.bindery.event.shared.SimpleEventBus;%0D
 %0A%0D%0Ap
@@ -1079,47 +1079,8 @@
 ler(
-(com.google.gwt.event.shared.EventBus) 
 even
@@ -1244,24 +1244,24 @@
 ntroller);%0D%0A
+
 %09%09final Acti
@@ -1329,47 +1329,8 @@
 per,
- (com.google.gwt.event.shared.EventBus)
  eve

Fix for EventBus type ...