Add DynaTableRf to the distribution, and fix some checkstyle issues. Pave the way a bit for LoggingExample. Review at http://gwt-code-reviews.appspot.com/775805 Review by: unnurg@google.com git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@8654 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/eclipse/samples/LogExample/.checkstyle b/eclipse/samples/LogExample/.checkstyle new file mode 100644 index 0000000..0f1cbd9 --- /dev/null +++ b/eclipse/samples/LogExample/.checkstyle
@@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fileset-config file-format-version="1.2.0" simple-config="true"> + <fileset name="all" enabled="true" check-config-name="GWT Checks" local="false"> + <file-match-pattern match-pattern="." include-pattern="true"/> + </fileset> + <filter name="NonSrcDirs" enabled="true"/> +</fileset-config>
diff --git a/eclipse/samples/LogExample/.classpath b/eclipse/samples/LogExample/.classpath new file mode 100644 index 0000000..26f2949 --- /dev/null +++ b/eclipse/samples/LogExample/.classpath
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="core/src"/> + <classpathentry kind="src" output="war" path="core/war"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry combineaccessrules="false" kind="src" path="/gwt-user"/> + <classpathentry kind="output" path="war/WEB-INF/classes"/> +</classpath>
diff --git a/eclipse/samples/LogExample/.project b/eclipse/samples/LogExample/.project new file mode 100644 index 0000000..72a97ff --- /dev/null +++ b/eclipse/samples/LogExample/.project
@@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>LogExample</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature> + </natures> + <linkedResources> + <link> + <name>core</name> + <type>2</type> + <locationURI>GWT_ROOT/samples/logexample</locationURI> + </link> + </linkedResources> +</projectDescription>
diff --git a/samples/build.xml b/samples/build.xml index f902522..6676020 100644 --- a/samples/build.xml +++ b/samples/build.xml
@@ -26,6 +26,10 @@ <gwt.ant dir="json" /> </target> + <target name="logexample" description="Build logexample"> + <gwt.ant dir="logexample" /> + </target> + <target name="mail" description="Build mail"> <gwt.ant dir="mail" /> </target> @@ -36,9 +40,11 @@ <target name="-do" description="Run all subprojects" > <antcall target="dynatable" /> + <antcall target="dynatablerf" /> <antcall target="expenses" /> <antcall target="hello" /> <antcall target="json" /> + <!-- <antcall target="logexample" /> Doesn't quite work yet --> <antcall target="mail" /> <antcall target="showcase" /> </target>
diff --git a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableWidget.java b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableWidget.java index 59326f7..8b58dd5 100644 --- a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableWidget.java +++ b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/DynaTableWidget.java
@@ -122,7 +122,6 @@ + event.getRecord()); } }); - } public void clearStatusText() {
diff --git a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java index dc7538c..299f0b8 100644 --- a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java +++ b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java
@@ -62,6 +62,10 @@ private static final Random rnd = new Random(3); + public static Person findPerson(Long id) { + return people.get(id); + } + public static List<Person> getPeople(int startIndex, int maxCount) { generateRandomPeople(); @@ -79,18 +83,6 @@ return new ArrayList<Person>(people.values()).subList(startIndex, end); } - - private static void generateRandomPeople() { - if (people.isEmpty()) - for (int i = 0; i < MAX_PEOPLE; ++i) { - Person person = generateRandomPerson(); - persist(person); - } - } - - public static Person findPerson(Long id) { - return people.get(id); - } public static void persist(Person person) { if (person.getId() == null) { @@ -99,6 +91,14 @@ person.setVersion(person.getVersion() + 1); people.put(person.getId(), person); } + + private static void generateRandomPeople() { + if (people.isEmpty()) + for (int i = 0; i < MAX_PEOPLE; ++i) { + Person person = generateRandomPerson(); + persist(person); + } + } private static Person generateRandomPerson() { // 1 out of every so many people is a prof.
diff --git a/samples/logexample/war/WEB-INF/classes/marker b/samples/logexample/war/WEB-INF/classes/marker new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/samples/logexample/war/WEB-INF/classes/marker