Updates the code museum to use HostedMode instead of GWTShell, and adds a war/ directory.

Patch by: jlabanca
Review by: jgw



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5628 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/eclipse/reference/code-museum/DefaultMuseum.launch b/eclipse/reference/code-museum/DefaultMuseum.launch
index 11a82895..da51d1f 100644
--- a/eclipse/reference/code-museum/DefaultMuseum.launch
+++ b/eclipse/reference/code-museum/DefaultMuseum.launch
@@ -17,8 +17,8 @@
 <listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;code-museum&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
 </listAttribute>
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.GWTShell"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www com.google.gwt.museum.DefaultMuseum/DefaultMuseum.html"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.HostedMode"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-startupUrl DefaultMuseum.html&#10;com.google.gwt.museum.DefaultMuseum"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="code-museum"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dgwt.devjar=${gwt_devjar}&quot;"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea&#13;&#10;-Xmx256M&#10;-Dgwt.devjar=${gwt_devjar}&quot;"/>
 </launchConfiguration>
diff --git a/eclipse/reference/code-museum/SingleIssue.launch b/eclipse/reference/code-museum/SingleIssue.launch
new file mode 100644
index 0000000..93f86ed
--- /dev/null
+++ b/eclipse/reference/code-museum/SingleIssue.launch
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/code-museum"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;code-museum&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/code-museum/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-user/core/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-dev-linux/core/src&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-user/core/super&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/gwt-dev-linux/core/super&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;code-museum&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.HostedMode"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-startupUrl SingleIssue.html&#10;com.google.gwt.museum.SingleIssue"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="code-museum"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea&#13;&#10;-Xmx256M&#10;-Dgwt.devjar=${gwt_devjar}&quot;"/>
+</launchConfiguration>
diff --git a/reference/code-museum/src/com/google/gwt/museum/public/Museum.html b/eclipse/reference/code-museum/war/DefaultMuseum.html
similarity index 73%
rename from reference/code-museum/src/com/google/gwt/museum/public/Museum.html
rename to eclipse/reference/code-museum/war/DefaultMuseum.html
index fa19fea..b8a5257 100644
--- a/reference/code-museum/src/com/google/gwt/museum/public/Museum.html
+++ b/eclipse/reference/code-museum/war/DefaultMuseum.html
@@ -2,7 +2,7 @@
 <html>
 	<head>
 		<title>Museum</title>
-		<script language='javascript' src='com.google.gwt.museum.Museum.nocache.js'></script>
+		<script language='javascript' src='defaultmuseum/defaultmuseum.nocache.js'></script>
 	</head>
 
 	<body>
diff --git a/reference/code-museum/src/com/google/gwt/museum/public/SingleIssue.html b/eclipse/reference/code-museum/war/SingleIssue.html
similarity index 74%
rename from reference/code-museum/src/com/google/gwt/museum/public/SingleIssue.html
rename to eclipse/reference/code-museum/war/SingleIssue.html
index ae5679b..eeccf6a 100644
--- a/reference/code-museum/src/com/google/gwt/museum/public/SingleIssue.html
+++ b/eclipse/reference/code-museum/war/SingleIssue.html
@@ -2,7 +2,7 @@
 <html>
 	<head>
 		<title>Single issue from Museum</title>
-		<script language='javascript' src='com.google.gwt.museum.SingleIssue.nocache.js'></script>
+		<script language='javascript' src='singleissue/singleissue.nocache.js'></script>
 	</head>
 
 	<body>
diff --git a/eclipse/reference/code-museum/war/WEB-INF/classes/marker b/eclipse/reference/code-museum/war/WEB-INF/classes/marker
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/eclipse/reference/code-museum/war/WEB-INF/classes/marker
diff --git a/eclipse/reference/code-museum/war/WEB-INF/web.xml b/eclipse/reference/code-museum/war/WEB-INF/web.xml
new file mode 100644
index 0000000..a41b0bc
--- /dev/null
+++ b/eclipse/reference/code-museum/war/WEB-INF/web.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app>
+
+  <!-- Default page to serve -->
+  <welcome-file-list>
+    <welcome-file>DefaultMuseum.html</welcome-file>
+  </welcome-file-list>
+
+</web-app>
diff --git a/reference/code-museum/src/com/google/gwt/museum/DefaultMuseum.gwt.xml b/reference/code-museum/src/com/google/gwt/museum/DefaultMuseum.gwt.xml
index cb8cede..0a10e5c 100644
--- a/reference/code-museum/src/com/google/gwt/museum/DefaultMuseum.gwt.xml
+++ b/reference/code-museum/src/com/google/gwt/museum/DefaultMuseum.gwt.xml
@@ -1,4 +1,4 @@
-<module>
+<module rename-to="defaultmuseum">
     
     <!-- Inherit the core Web Toolkit stuff.                  -->
     <inherits name='com.google.gwt.museum.Museum'/>
diff --git a/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml b/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml
index 3814d6a..cf72db5 100644
--- a/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml
+++ b/reference/code-museum/src/com/google/gwt/museum/Museum.gwt.xml
@@ -1,4 +1,4 @@
-<module>
+<module rename-to="museum">
     
     <!-- Inherit the core Web Toolkit stuff.                  -->
     <inherits name='com.google.gwt.user.User'/>
diff --git a/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml b/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
index 5de3c03..84ab025 100644
--- a/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
+++ b/reference/code-museum/src/com/google/gwt/museum/SingleIssue.gwt.xml
@@ -1,4 +1,4 @@
-<module>
+<module rename-to="singleissue">
     
     <!-- Inherit the core Web Toolkit stuff.                  -->
     <inherits name='com.google.gwt.user.User'/>
diff --git a/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java b/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java
index ef76e19..580ca31 100644
--- a/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java
+++ b/reference/code-museum/src/com/google/gwt/museum/client/common/AbstractIssue.java
@@ -16,6 +16,7 @@
 package com.google.gwt.museum.client.common;
 
 import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.LinkElement;
 import com.google.gwt.user.client.Window;
@@ -49,10 +50,11 @@
       cssName = "Default";
     }
 
+    String baseUrl = GWT.getModuleBaseURL();
     LinkElement issueLinkElement = Document.get().createLinkElement();
     issueLinkElement.setRel("stylesheet");
     issueLinkElement.setType("text/css");
-    issueLinkElement.setHref("issues/" + cssName + ".css");
+    issueLinkElement.setHref(baseUrl + "issues/" + cssName + ".css");
     return issueLinkElement;
   }
 
diff --git a/reference/code-museum/src/com/google/gwt/museum/public/DefaultMuseum.html b/reference/code-museum/src/com/google/gwt/museum/public/DefaultMuseum.html
deleted file mode 100644
index 210131c..0000000
--- a/reference/code-museum/src/com/google/gwt/museum/public/DefaultMuseum.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-	<head>
-		<title>Museum</title>
-		<script language='javascript' src='com.google.gwt.museum.DefaultMuseum.nocache.js'></script>
-	</head>
-
-	<body>
-		<iframe src="javascript:''" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0"></iframe>
-	</body>
-</html>