// Path: archetypes/mgwt-basic-swipemenu/src/main/java/gov/wa/wsdot/apps/mgwt/client/activities/MenuActivity.java
// public class MenuActivity extends MGWTAbstractActivity implements
// 		MenuView.Presenter {
// 
// 	private final ClientFactory clientFactory;
// 	private MenuView view;
//     private EventBus eventBus;
// 	
// 	public MenuActivity(ClientFactory clientFactory) {
// 		this.clientFactory = clientFactory;
// 	}
// 	
// 	@Override
// 	public void start(AcceptsOneWidget panel, final EventBus eventBus) {
// 		view = clientFactory.getMenuView();
// 		this.eventBus = eventBus;
// 		view.setPresenter(this);
// 		view.render(createTopicsList());
// 		
// 		panel.setWidget(view);
// 	}
// 
// 	@Override
// 	public void onStop() {
// 		view.setPresenter(null);
// 	}
// 
// 	@Override
// 	public void onItemSelected(int index) {
// 		if (index == 0) {
// 		    clientFactory.getSwipeMenu().close(false);
// 			//clientFactory.getPlaceController().goTo(new MenuItemOnePlace());
// 			return;
// 		}
// 		if (index == 1) {
// 		    clientFactory.getSwipeMenu().close(false);
//             //clientFactory.getPlaceController().goTo(new MenuItemTwoPlace());
// 		    return;
// 		}
// 		if (index == 2) {
// 		    clientFactory.getSwipeMenu().close(false);
// 			//clientFactory.getPlaceController().goTo(new MenuItemThreePlace());
// 			return;
// 		}		
// 	}
// 	
//     @Override
//     public void onAboutButtonPressed() {
//         clientFactory.getSwipeMenu().close(false);
//         clientFactory.getPlaceController().goTo(new AboutPlace());
//     }
// 	
// 	private List<Topic> createTopicsList() {
// 		ArrayList<Topic> list = new ArrayList<Topic>();
// 		
// 		list.add(new Topic("Menu Item One"));
// 		list.add(new Topic("Menu Item Two"));
// 		list.add(new Topic("Menu Item Three"));
// 		
// 		return list;
// 	}
// 
// }
// 
// Path: archetypes/mgwt-basic-swipemenu/src/main/java/gov/wa/wsdot/apps/mgwt/client/activities/home/HomePlace.java
// public class HomePlace extends Place {
// 
// 	public static class HomePlaceTokenizer implements PlaceTokenizer<HomePlace> {
// 
// 		@Override
// 		public HomePlace getPlace(String token) {
// 			return new HomePlace();
// 		}
// 
// 		@Override
// 		public String getToken(HomePlace place) {
// 			return "";
// 		}
// 
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return 3;
// 	}
// 
// 	@Override
// 	public boolean equals(Object other) {
// 		if (other == this) {
// 			return true;
// 		}
// 
// 		if (other == null) {
// 			return false;
// 		}
// 		
// 		if (other instanceof HomePlace) {
// 			return true;
// 		}
// 		
// 		return false;
// 	}
// }


import gov.wa.wsdot.apps.mgwt.client.activities.MenuActivity;
import gov.wa.wsdot.apps.mgwt.client.activities.home.HomePlace;
import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;
package gov.wa.wsdot.apps.mgwt.client;


public class AppNavActivityMapper implements ActivityMapper {

	private final ClientFactory clientFactory;

	public AppNavActivityMapper(ClientFactory clientFactory) {
		this.clientFactory = clientFactory;
	}

	private MenuActivity menuActivity;

	private Activity getMenuActivity() {
		if (menuActivity == null) {
			menuActivity = new MenuActivity(clientFactory);
		}
		return menuActivity;
	}

	@Override
	public Activity getActivity(Place place) {
// Path: archetypes/mgwt-basic-swipemenu/src/main/java/gov/wa/wsdot/apps/mgwt/client/activities/MenuActivity.java
// public class MenuActivity extends MGWTAbstractActivity implements
// 		MenuView.Presenter {
// 
// 	private final ClientFactory clientFactory;
// 	private MenuView view;
//     private EventBus eventBus;
// 	
// 	public MenuActivity(ClientFactory clientFactory) {
// 		this.clientFactory = clientFactory;
// 	}
// 	
// 	@Override
// 	public void start(AcceptsOneWidget panel, final EventBus eventBus) {
// 		view = clientFactory.getMenuView();
// 		this.eventBus = eventBus;
// 		view.setPresenter(this);
// 		view.render(createTopicsList());
// 		
// 		panel.setWidget(view);
// 	}
// 
// 	@Override
// 	public void onStop() {
// 		view.setPresenter(null);
// 	}
// 
// 	@Override
// 	public void onItemSelected(int index) {
// 		if (index == 0) {
// 		    clientFactory.getSwipeMenu().close(false);
// 			//clientFactory.getPlaceController().goTo(new MenuItemOnePlace());
// 			return;
// 		}
// 		if (index == 1) {
// 		    clientFactory.getSwipeMenu().close(false);
//             //clientFactory.getPlaceController().goTo(new MenuItemTwoPlace());
// 		    return;
// 		}
// 		if (index == 2) {
// 		    clientFactory.getSwipeMenu().close(false);
// 			//clientFactory.getPlaceController().goTo(new MenuItemThreePlace());
// 			return;
// 		}		
// 	}
// 	
//     @Override
//     public void onAboutButtonPressed() {
//         clientFactory.getSwipeMenu().close(false);
//         clientFactory.getPlaceController().goTo(new AboutPlace());
//     }
// 	
// 	private List<Topic> createTopicsList() {
// 		ArrayList<Topic> list = new ArrayList<Topic>();
// 		
// 		list.add(new Topic("Menu Item One"));
// 		list.add(new Topic("Menu Item Two"));
// 		list.add(new Topic("Menu Item Three"));
// 		
// 		return list;
// 	}
// 
// }
// 
// Path: archetypes/mgwt-basic-swipemenu/src/main/java/gov/wa/wsdot/apps/mgwt/client/activities/home/HomePlace.java
// public class HomePlace extends Place {
// 
// 	public static class HomePlaceTokenizer implements PlaceTokenizer<HomePlace> {
// 
// 		@Override
// 		public HomePlace getPlace(String token) {
// 			return new HomePlace();
// 		}
// 
// 		@Override
// 		public String getToken(HomePlace place) {
// 			return "";
// 		}
// 
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return 3;
// 	}
// 
// 	@Override
// 	public boolean equals(Object other) {
// 		if (other == this) {
// 			return true;
// 		}
// 
// 		if (other == null) {
// 			return false;
// 		}
// 		
// 		if (other instanceof HomePlace) {
// 			return true;
// 		}
// 		
// 		return false;
// 	}
// }


// Path: archetypes/mgwt-basic-swipemenu/src/main/java/gov/wa/wsdot/apps/mgwt/client/AppNavActivityMapper.java
import gov.wa.wsdot.apps.mgwt.client.activities.MenuActivity;
import gov.wa.wsdot.apps.mgwt.client.activities.home.HomePlace;
import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;

package gov.wa.wsdot.apps.mgwt.client;


public class AppNavActivityMapper implements ActivityMapper {

	private final ClientFactory clientFactory;

	public AppNavActivityMapper(ClientFactory clientFactory) {
		this.clientFactory = clientFactory;
	}

	private MenuActivity menuActivity;

	private Activity getMenuActivity() {
		if (menuActivity == null) {
			menuActivity = new MenuActivity(clientFactory);
		}
		return menuActivity;
	}

	@Override
	public Activity getActivity(Place place) {
		if (place instanceof HomePlace) {