[gwt-contrib] Re: scheglov pointed out a leak in compilation units in dev mode after a refresh (issue1490801)
http://gwt-code-reviews.appspot.com/1490801/diff/5002/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java (right): http://gwt-code-reviews.appspot.com/1490801/diff/5002/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode367 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:367: */ Note to self: Before there was a synchronize(unitMap) block around this loop and I need to put it back. http://gwt-code-reviews.appspot.com/1490801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes problem with datanucleus enhancement and Appengine deployment (issue1521803)
I think you're right to keep this patch focussed on simply making the thing work again. Ugly as it is, this might be enough fixing to let us get 2.4 out the door. But let's try to corner Dave for a chat on Monday before making that call, get his read on both the mvn structure and the Objectify usage. http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/pom.xml File samples/mobilewebapp/pom.xml (right): http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/pom.xml#newcode34 samples/mobilewebapp/pom.xml:34: JBoss Repo Do you still need this entry? http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/pom.xml#newcode73 samples/mobilewebapp/pom.xml:73: Are user and dev really provided? I thought GPE backs off and relies on maven to download them. http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/pom.xml#newcode138 samples/mobilewebapp/pom.xml:138: While you're in here, did you try eliminating this and other "who is" items? http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/pom.xml#newcode174 samples/mobilewebapp/pom.xml:174: ditto http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/pom.xml#newcode182 samples/mobilewebapp/pom.xml:182: etc. http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/pom.xml#newcode316 samples/mobilewebapp/pom.xml:316: 2.7 We don't care about AspectJ any more, right? Update this? http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java File samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java (right): http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java#newcode50 samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java:50: populateDatastore(); populateDatastore uses its own emf. Does the one in findAllTasks actually see the changes populateDatastore makes -- did you actually see the samples show up? http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java#newcode69 samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java:69: EMF emf = new EMF(); Is all of this new EMF() stuff safe and idiomatic Objectify? We don't need to try to use a single EMF per request or something? Sure feels wrong. http://gwt-code-reviews.appspot.com/1521803/diff/1/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java#newcode232 samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java:232: public void setVersion(Integer version) { I bet you can delete this. http://gwt-code-reviews.appspot.com/1521803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: scheglov pointed out a leak in compilation units in dev mode after a refresh (issue1490801)
http://gwt-code-reviews.appspot.com/1490801/diff/1/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java (right): http://gwt-code-reviews.appspot.com/1490801/diff/1/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode292 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:292: if (unitWriter.isAlive()) { On 2011/08/01 19:38:22, jbrosenberg wrote: I'm a little uncomfortable with using Thread.isAlive() as a state variable (seems prone to race conditions). For instance, here, I'm not sure if unitWriter is alive while processing a shutdownHook or not? Can you use atomic variables like "isStarted" and "isShuttingDown", etc.? As we discussed offline, there is JRE help for this problem in creating a queuing mechanism that is integrated with the threading mechanism. Its a lot of churn to the file, but the logic should be pretty much intact. As far as number of lines of code goes, the change is a wash, but the fact that the queue can tell if you if the background task is active, or if a task failed at the time of submission with just a try/catch block I think makes the code more foolproof. http://gwt-code-reviews.appspot.com/1490801/diff/1/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode504 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:504: // This isn't 100% reliable if multiple processes are in contention On 2011/08/01 19:38:22, jbrosenberg wrote: Could add a process specific id to the file name? I could, but it would not be the only problem if multiple processes were trying to use the cache while things were actively changing. http://gwt-code-reviews.appspot.com/1490801/diff/5002/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java (right): http://gwt-code-reviews.appspot.com/1490801/diff/5002/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode345 dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:345: if (shouldRotate) { Here is the essential logic change - rotate or purge the files every time cleanup is called, http://gwt-code-reviews.appspot.com/1490801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes problem with datanucleus enhancement and Appengine deployment (issue1521803)
On 2011/08/12 21:05:01, rchandia wrote: From an offline note sent by Rodrigo: This maven project is far from perfect though: - Gwtc complains that gwt-dev.jar is in the classpath (but this is necessary to compile the linker) - The deployed app contains symbol maps (which can't be removed because gwtc runts too late in the maven phases) - Contains compiled client class files and the linker classes (but they are needed for DevMode and gwtc runs too late) In truth this sample should rather use a multi-project maven structure (composed of gae, client, server and linker sub-projects), but: - I did not want to pollute the fixes with a folder reorganization - It makes the sample harder to use: - First it would require a 'mvn install' from the root of the sample to ensure gae dependencies are reachable (the client, server and linker projects) - Then, to perform any 'mvn {gwt,gae}:xxx' operation it would be necessary to cd to the gae sub-project Would it be worthwhile to make this change in structure? http://gwt-code-reviews.appspot.com/1521803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: scheglov pointed out a leak in compilation units in dev mode after a refresh (issue1490801)
http://gwt-code-reviews.appspot.com/1490801/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Pretty massive refactoring of FieldManager and HtmlTemplates to make (issue1522803)
Reviewers: hermes, rchandia, Description: Pretty massive refactoring of FieldManager and HtmlTemplates to make SafeUri work as expected. Similar will be needed for SafeStyles. Introduces a hook in HtmlInterpreter to specialize parsing of specific HTML attribute names, which previously were all String, period. And each assignment of a FieldRef (that is, each call to FieldReference#addLeftHandType) can now have multiple possible values. This allows href to accept references to SafeUri or String, and to prefer the former. Took this opportunity to improve error reporting related to bad field references: actual line numbers on type mismatch. Tidied error message language in general while there. To this end, FieldReferences and their left hand types now keep track of the XMLElement they came from. Also simplifies the parsing code in XMLElement, possible now that bundle attribute parsers are no more. Please review this at http://gwt-code-reviews.appspot.com/1522803/ Affected files: M user/src/com/google/gwt/uibinder/attributeparsers/AttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/AttributeParsers.java M user/src/com/google/gwt/uibinder/attributeparsers/BooleanAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/DoubleAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/EnumAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/FieldReferenceConverter.java M user/src/com/google/gwt/uibinder/attributeparsers/HorizontalAlignmentConstantParser.java M user/src/com/google/gwt/uibinder/attributeparsers/IntAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/IntPairAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/LengthAttributeParser.java A user/src/com/google/gwt/uibinder/attributeparsers/SafeUriAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/StrictAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/StringAttributeParser.java M user/src/com/google/gwt/uibinder/attributeparsers/TextAlignConstantParser.java M user/src/com/google/gwt/uibinder/attributeparsers/VerticalAlignmentConstantParser.java M user/src/com/google/gwt/uibinder/elementparsers/AttributeMessageInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/FieldInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/HtmlInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/HtmlMessageInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/IsRenderableInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/RenderablePanelParser.java M user/src/com/google/gwt/uibinder/elementparsers/TextInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/UiSafeHtmlInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/UiTextInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java M user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java M user/src/com/google/gwt/uibinder/rebind/FieldManager.java M user/src/com/google/gwt/uibinder/rebind/FieldReference.java M user/src/com/google/gwt/uibinder/rebind/MonitoredLogger.java M user/src/com/google/gwt/uibinder/rebind/MortalLogger.java M user/src/com/google/gwt/uibinder/rebind/Tokenator.java M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java M user/src/com/google/gwt/uibinder/rebind/XMLAttribute.java M user/src/com/google/gwt/uibinder/rebind/XMLElement.java D user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplate.java D user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplateArgument.java A user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplateMethodWriter.java D user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplates.java A user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplatesWriter.java M user/test/com/google/gwt/uibinder/LazyWidgetBuilderSuite.java M user/test/com/google/gwt/uibinder/UiBinderJreSuite.java M user/test/com/google/gwt/uibinder/UiBinderSuite.java M user/test/com/google/gwt/uibinder/attributeparsers/FieldReferenceConverterTest.java M user/test/com/google/gwt/uibinder/attributeparsers/HorizontalAlignmentConstantParserTest.java M user/test/com/google/gwt/uibinder/attributeparsers/HorizontalAlignmentConstantParser_Test.java M user/test/com/google/gwt/uibinder/attributeparsers/IntAttributeParserTest.java M user/test/com/google/gwt/uibinder/attributeparsers/IntPairAttributeParserTest.java M user/test/com/google/gwt/uibinder/attributeparsers/LengthAttributeParserTest.java A user/test/com/google/gwt/uibinder/attributeparsers/SafeUriAttributeParserTest.java M user/test/com/
[gwt-contrib] Fixes problem with datanucleus enhancement and Appengine deployment (issue1521803)
Reviewers: rjrjr, drfibonacci, Description: Fixes problem with datanucleus enhancement and Appengine deployment - Migrated to Objectify - Prevents gwt-dev.jar and gwt-user.jar from being deployed - Prevents soycReport files from ending in the App Cache manifest - Removed unused ant script file Please review this at http://gwt-code-reviews.appspot.com/1521803/ Affected files: M samples/mobilewebapp/pom.xml D samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/Core.gwt.xml M samples/mobilewebapp/src/main/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinker.java M samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml M samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/EMF.java M samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/server/domain/Task.java M samples/mobilewebapp/src/test/java/com/google/gwt/sample/core/linker/SimpleAppCacheLinkerTest.java D samples/mobilewebapp/user-build.xml -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding a new CellTableHeaderBuilder API, which allows custom headers and footers in CellTable. C... (issue1499808)
http://gwt-code-reviews.appspot.com/1499808/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Comment on RequestFactory_2_4 in google-web-toolkit
Comment by mana...@gurumades.com: Is there any example on how one would use the new RequestBatcher to batch multiples operation from diffent type of RequestContext? For more information: http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_4 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding configuration booleans to CellTable to refresh headers and footers only when needed. Cur... (issue1520803)
committed as r10522 http://gwt-code-reviews.appspot.com/1520803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10522 committed - Adding configuration booleans to CellTable to refresh headers and foot...
Revision: 10522 Author: gwt.mirror...@gmail.com Date: Fri Aug 12 10:19:01 2011 Log: Adding configuration booleans to CellTable to refresh headers and footers only when needed. Currently, the headers and footers are refreshed every time the data is redrawn, even though headers and footers are often static or do not depend on the data. Users can now call #setAutoHeader/FooterRefreshDisabled() to disable this feature. Headers and footers will still be redrawn when a column is inserted or removed, but they will not be redrawn on every data update. Users can force the headers/footers to redraw synchronously by calling #redrawHeaders/Footers. Review at http://gwt-code-reviews.appspot.com/1520803 Review by: pengzhu...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10522 Modified: /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCustomDataGrid.java /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwDataGrid.java /trunk/user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java /trunk/user/test/com/google/gwt/user/cellview/client/AbstractCellTableTestBase.java === --- /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java Wed Jul 27 04:19:13 2011 +++ /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java Fri Aug 12 10:19:01 2011 @@ -130,6 +130,10 @@ ContactDatabase.ContactInfo.KEY_PROVIDER); cellTable.setWidth("100%", true); +// Do not refresh the headers and footers every time the data is updated. +cellTable.setAutoHeaderRefreshDisabled(true); +cellTable.setAutoFooterRefreshDisabled(true); + // Attach a column sort handler to the ListDataProvider to sort the list. ListHandler sortHandler = new ListHandler( ContactDatabase.get().getDataProvider().getList()); @@ -163,10 +167,12 @@ protected void asyncOnInitialize(final AsyncCallback callback) { GWT.runAsync(CwCellTable.class, new RunAsyncCallback() { + @Override public void onFailure(Throwable caught) { callback.onFailure(caught); } + @Override public void onSuccess() { callback.onSuccess(onInitialize()); } @@ -204,12 +210,14 @@ }; firstNameColumn.setSortable(true); sortHandler.setComparator(firstNameColumn, new Comparator() { + @Override public int compare(ContactInfo o1, ContactInfo o2) { return o1.getFirstName().compareTo(o2.getFirstName()); } }); cellTable.addColumn(firstNameColumn, constants.cwCellTableColumnFirstName()); firstNameColumn.setFieldUpdater(new FieldUpdaterString>() { + @Override public void update(int index, ContactInfo object, String value) { // Called when the user changes the value. object.setFirstName(value); @@ -228,12 +236,14 @@ }; lastNameColumn.setSortable(true); sortHandler.setComparator(lastNameColumn, new Comparator() { + @Override public int compare(ContactInfo o1, ContactInfo o2) { return o1.getLastName().compareTo(o2.getLastName()); } }); cellTable.addColumn(lastNameColumn, constants.cwCellTableColumnLastName()); lastNameColumn.setFieldUpdater(new FieldUpdater() { + @Override public void update(int index, ContactInfo object, String value) { // Called when the user changes the value. object.setLastName(value); @@ -258,6 +268,7 @@ }; cellTable.addColumn(categoryColumn, constants.cwCellTableColumnCategory()); categoryColumn.setFieldUpdater(new FieldUpdater() { + @Override public void update(int index, ContactInfo object, String value) { for (Category category : categories) { if (category.getDisplayName().equals(value)) { @@ -280,6 +291,7 @@ addressColumn.setSortable(true); addressColumn.setDefaultSortAscending(false); sortHandler.setComparator(addressColumn, new Comparator() { + @Override public int compare(ContactInfo o1, ContactInfo o2) { return o1.getAddress().compareTo(o2.getAddress()); } === --- /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCustomDataGrid.java Thu Jul 28 04:03:54 2011 +++ /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCustomDataGrid.java Fri Aug 12 10:19:01 2011 @@ -549,12 +549,21 @@ // Create a DataGrid. -// Set a key provider that provides a unique key for each contact. If key is -// used to identify contacts when fields (such as the name and address) -// change. +/* + * Set a key provider that provides a unique
[gwt-contrib] Adding configuration booleans to CellTable to refresh headers and footers only when needed. Cur... (issue1520803)
Reviewers: pengzhuang, Description: Adding configuration booleans to CellTable to refresh headers and footers only when needed. Currently, the headers and footers are refreshed every time the data is redrawn, even though headers and footers are often static or do not depend on the data. Users can now call #setAutoHeader/FooterRefreshDisabled() to disable this feature. Headers and footers will still be redrawn when a column is inserted or removed, but they will not be redrawn on every data update. Users can force the headers/footers to redraw synchronously by calling #redrawHeaders/Footers. Please review this at http://gwt-code-reviews.appspot.com/1520803/ Affected files: M samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java M samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCustomDataGrid.java M samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwDataGrid.java M user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java M user/test/com/google/gwt/user/cellview/client/AbstractCellTableTestBase.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors