Rendering/painting in IE8/IE9 is slow when compared to FireFox(21.0) and Chrome(Version 27.0.1453.110 m) using GWT.
Rendering/painting in IE8/IE9 is slow when compared to FireFox(21.0) and Chrome(Version 27.0.1453.110 m) using GWT. During GWT Table rendering, for each Table cell, we use the below API: 1. com.google.gwt.user.client.ui.Grid.getCellFormatter().setStyleName 2. com.google.gwt.user.client.ui.Grid.setWidget(row, column, new CATableEditableCell(this, row, column, data)) or setWidget(row, column, (Widget)o) 3. com.google.gwt.user.client.ui.Grid.setHTML(row, column, datalink); Here are the Observations while using IE vs Fireforx: 1. It takes an average of 50-60 millis to format a cell in table where as in FF it is taking 0-5 millis 2. With this overall table painting is taking time when huge data is there/painted in the table Is it a known phenomena or can IE be optimized further. If yes, can you pls suggest any? Thanks!! Ajay B -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Rendering/painting in IE8/IE9 is slow when compared to FireFox(21.0) and Chrome(Version 27.0.1453.110 m) using GWT.
Grid is implemented using a HTML table. HTML tables are slow in rendering if you do not set table-layout:fixed; as a CSS property. You could also try filling the Grid off screen, e.g. when its not yet attached to the DOM so the browser has to do less layout/rendering. If the above did not help then you simply push to much data into your Grid. In that case you can take a look at CellTable / DataGrid which are meant for handling this large amount of data. They achieve their speed by minimizing DOM operations (which are slow in older IEs) and instead building a huge HTML string and then set it using parentElement.setInnerHTML(). -- J. Am Montag, 17. Juni 2013 09:29:55 UTC+2 schrieb ajayb...@gmail.com: Rendering/painting in IE8/IE9 is slow when compared to FireFox(21.0) and Chrome(Version 27.0.1453.110 m) using GWT. During GWT Table rendering, for each Table cell, we use the below API: 1. com.google.gwt.user.client.ui.Grid.getCellFormatter().setStyleName 2. com.google.gwt.user.client.ui.Grid.setWidget(row, column, new CATableEditableCell(this, row, column, data)) or setWidget(row, column, (Widget)o) 3. com.google.gwt.user.client.ui.Grid.setHTML(row, column, datalink); Here are the Observations while using IE vs Fireforx: 1. It takes an average of 50-60 millis to format a cell in table where as in FF it is taking 0-5 millis 2. With this overall table painting is taking time when huge data is there/painted in the table Is it a known phenomena or can IE be optimized further. If yes, can you pls suggest any? Thanks!! Ajay B -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: RequestFactory Issue 6115
Am Sonntag, 16. Juni 2013 23:52:08 UTC+2 schrieb Thomas Broyer: On Friday, June 14, 2013 5:55:03 PM UTC+2, Nermin wrote: Hello Thomas, Open Session In View is the right approach to go for. Thank you for this advice! I have implemented it and it works fine now. However, I have one question regarding OSIV-Pattern: In the Hybernate example (see link below) they *begin transaction*before doFilter() and *commit on transaction* after it. https://community.jboss.org/wiki/OpenSessionInView I am using standard GWT setting with DataNucleus. For some reason it does not let me call em.getTransaction().begin(); and em.getTransaction().commit(); within the filter. In my current implementation I can *create EntityManager* before doFilter() and *close it* afterwards (this works), but cannot commit nor rollback transaction You *should* do that (create EntityManager and close it in filter; begin/commit transactions in each service method) I'll see if I can improve the documentation. Feel free to propose patches yourself though: http://www.gwtproject.org/makinggwtbetter.html#webpage Thank you for your reply and the link, which is one of the best GWT references I have see so far on the net. ... GREAT WORK! My code works fine now thanks to OSIV-pattern. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Setting TreeItem userObject with uiBinder?
Is there any way to set a TreeItem user object in the UI Binder XML? Something like g:TreeItem text='Foo' userObject=FooKeyValue/ thanks *P -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: RequestFactory Issue 6115
On Monday, June 17, 2013 10:47:56 AM UTC+2, Nermin wrote: Am Sonntag, 16. Juni 2013 23:52:08 UTC+2 schrieb Thomas Broyer: I'll see if I can improve the documentation. Feel free to propose patches yourself though: http://www.gwtproject.org/makinggwtbetter.html#webpage Thank you for your reply and the link, which is one of the best GWT references I have see so far on the net. ... GREAT WORK! Er, gwtproject.org is the *official* documentation for the GWT project; it's been initialized as a copy of developers.google.com/web-toolkit as the project transitions from Google to the Steering Committee. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Setting TreeItem userObject with uiBinder?
On 17/06/2013 10:55, Kulnor wrote: Is there any way to set a TreeItem user object in the UI Binder XML? Something like g:TreeItemtext='Foo'userObject=FooKeyValue/ Have you tried it? (I haven't!) I see TreeItem has a setUserObject(Object userObj) method, so maybe it can work. -- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Fixing a column in DataGrid
On Fri, Jun 14, 2013 at 11:42 AM, Jens jens.nehlme...@gmail.com wrote: Well, add a scroll handler to the right ScrollPanel and set the current scroll position on the left ScrollPanel. Hi Jens, thanks for that :) It worked the way you described it. With one tiny caveat. DataGrids don't export their ScrollPanel (Maybe I got you wrong). I simply extended an original DataGrid and exposed their ScrollPanel like so: public ScrollPanel getScrollPanel() { HeaderPanel header = (HeaderPanel) getWidget(); return (ScrollPanel) header.getContentWidget(); } This made syncing the scrolling positions of my two DataGrids quite simple and I know have one fixed column in my datagrid. Thanks for your help! Best, Raphael -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
How to add keydown and keyup listner to DrawingArea
I cant figure out how to add a keyboardlistner to a drawing area. i amd creating a simple game and would like to be able to respond to the user pressing buttons? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
FW: Muhammad
hello! http://www.eliane-mery-sculptrice.com/ozqjpwgb/hlc/ejmgt/lzdh.html Muhammad -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Setting TreeItem userObject with uiBinder?
Tried that one but fails with Cannot parse value: FooKeyValue as type java.lang.Object: g:TreeItem ... *P On 6/17/13 12:38 PM, Philippe Lhoste wrote: On 17/06/2013 10:55, Kulnor wrote: Is there any way to set a TreeItem user object in the UI Binder XML? Something like g:TreeItemtext='Foo'userObject=FooKeyValue/ Have you tried it? (I haven't!) I see TreeItem has a setUserObject(Object userObj) method, so maybe it can work. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: RequestFactory, entity Id not populated when it reaches the server?
For debugging: Check the RF payload with Chrome Developer Tools and put a breakpoint in the siteId() method of your backend DTO (it should be called after the object is created). On Monday, June 17, 2013 3:59:02 AM UTC+2, GWTter wrote: Hi all, I have the same setup as in question https://groups.google.com/d/msg/google-web-toolkit/GUQjZ98mL7s/MoA2gEMmS28J . I've included the relevant code from the question below for quick reference. My problem is that once the booking entity gets to the server and I look for the user, the user field is not null, but the id on the user is? Thus I can't check for the actual user. Is the user id not being set in the payload for some reason, or is it not building the user entity correctly on the server? Thanks a lot in advance for any help, much appreciated. -Seth MainRequestFactory.BookingRequest bookingRequest = reqFactory.bookingRequest(); BookingProxy bookingProxy = bookingRequest.create(BookingProxy.class); UserProxy userProxy = bookingRequest.create(UserProxy.class); userProxy.setId(12); bookingProxy.setUser(userProxy); RequestVoid persistRequest = bookingRequest.persist().using(bookingProxy); persistRequest.fire(new ReceiverVoid() { @Override public void onSuccess(Void response) { GWT.log(persisted); } }); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: RequestFactory, entity Id not populated when it reaches the server?
Hi Ümit, I was actually checking the payload via the DefaultRequestTransport, I could see the user proxy object but I could not see the id anywhere in the payload. I had also put a println in the setID method in the DTO but it was never called which is what I thought was strange since the object seemed to go across the wire. I haven't checked the payload more formally with Chrome's developer tools, so I'll try that next like you suggested after dinner and see if that clears things up, will post back. Thanks for answering. On Monday, June 17, 2013 5:21:48 PM UTC+2, Ümit Seren wrote: For debugging: Check the RF payload with Chrome Developer Tools and put a breakpoint in the siteId() method of your backend DTO (it should be called after the object is created). On Monday, June 17, 2013 3:59:02 AM UTC+2, GWTter wrote: Hi all, I have the same setup as in question https://groups.google.com/d/msg/google-web-toolkit/GUQjZ98mL7s/MoA2gEMmS28J . I've included the relevant code from the question below for quick reference. My problem is that once the booking entity gets to the server and I look for the user, the user field is not null, but the id on the user is? Thus I can't check for the actual user. Is the user id not being set in the payload for some reason, or is it not building the user entity correctly on the server? Thanks a lot in advance for any help, much appreciated. -Seth MainRequestFactory.BookingRequest bookingRequest = reqFactory.bookingRequest(); BookingProxy bookingProxy = bookingRequest.create(BookingProxy.class); UserProxy userProxy = bookingRequest.create(UserProxy.class); userProxy.setId(12); bookingProxy.setUser(userProxy); RequestVoid persistRequest = bookingRequest.persist().using(bookingProxy); persistRequest.fire(new ReceiverVoid() { @Override public void onSuccess(Void response) { GWT.log(persisted); } }); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: AWS (CDN) GWT file deployment and 'Blocked a frame with origin' issue
Thomas, Sorry I didn't catch you at the GWTogether in SF last month. I owe you a number of beers. :) *That did the trick*. I'll bang out an article for GWTProject.org on AWS (and similar) CDN deployments. BTW, I shamefully plead ignorance on the *xsiframe* linker. I'd only used the linkers in the GWT Docshttps://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects#DevGuideModuleXml . Yet, a grepping against the GWT source reveals: - appcachelinker (sample) - direct_install - xs - sso - std - xsiframe We'll need to ensure the new official docshttp://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.htmlinclude these as I've seen little documentation on most of them, or perhaps I'm missing something and they're not all meant for prime time yet. Sincerely, Joseph -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: RequestFactory, entity Id not populated when it reaches the server?
Hi, So I went back using the dev tools, inspected the payload, and confirmed what I had before: the ID is not set at all in the user object payload. Just to make sure I wasn't crazy or missing something I created just a User object and tried to save it. I checked the payload in that request and could clearly see the ID set in the object. I've persisted/sent entities that had field values set with other entities before. The only difference I can make between the two cases is that in the previous case the entity I was setting as the field value was from a request to the server (I had not created it on the client). In this case the booking entity is created on the client and the user entity is also created on the client. Could this be the reason why it's failing? maybe because RF only lets you add entities as fields if they already have stableIDs? Thanks again in advance. On Monday, June 17, 2013 6:02:53 PM UTC+2, GWTter wrote: Hi Ümit, I was actually checking the payload via the DefaultRequestTransport, I could see the user proxy object but I could not see the id anywhere in the payload. I had also put a println in the setID method in the DTO but it was never called which is what I thought was strange since the object seemed to go across the wire. I haven't checked the payload more formally with Chrome's developer tools, so I'll try that next like you suggested after dinner and see if that clears things up, will post back. Thanks for answering. On Monday, June 17, 2013 5:21:48 PM UTC+2, Ümit Seren wrote: For debugging: Check the RF payload with Chrome Developer Tools and put a breakpoint in the siteId() method of your backend DTO (it should be called after the object is created). On Monday, June 17, 2013 3:59:02 AM UTC+2, GWTter wrote: Hi all, I have the same setup as in question https://groups.google.com/d/msg/google-web-toolkit/GUQjZ98mL7s/MoA2gEMmS28J . I've included the relevant code from the question below for quick reference. My problem is that once the booking entity gets to the server and I look for the user, the user field is not null, but the id on the user is? Thus I can't check for the actual user. Is the user id not being set in the payload for some reason, or is it not building the user entity correctly on the server? Thanks a lot in advance for any help, much appreciated. -Seth MainRequestFactory.BookingRequest bookingRequest = reqFactory.bookingRequest(); BookingProxy bookingProxy = bookingRequest.create(BookingProxy.class); UserProxy userProxy = bookingRequest.create(UserProxy.class); userProxy.setId(12); bookingProxy.setUser(userProxy); RequestVoid persistRequest = bookingRequest.persist().using(bookingProxy); persistRequest.fire(new ReceiverVoid() { @Override public void onSuccess(Void response) { GWT.log(persisted); } }); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
JUnitShell: Why is the log level overriden to WARN?
Hi, when developing JUnit runstyles I want to do info/trace logging, e.g.: shell.getTopLogger().log(TreeLogger.TRACE, Letting PhantomJS fetch + url); I have to change all those logging outputs to at least WARN to see anything. This is caused by the following code in JUnitShell I guess: // Override log level to set WARN by default.. registerHandler(new ArgHandlerLogLevel(options) { @Override protected Type getDefaultLogLevel() { return TreeLogger.WARN; } }); My question is: Why? I find it very strange that I can't set a custom log level via command line argument or system property. What is the reasoning behind this and can it be changed? Cheers Maik -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Clientside IO with GWT
If you ever wanted to generate files(PDF Excel on the Client) in your GWT app this might be useful. http://emitrom.com/blog/client-io Cheers, Alain -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
CellList + ListDataProvider - Refresh failing in one special scenario - Please help
Problem: CellList doesn't refresh in a special scenario GWT Version: 2.5.0 Client(s): IE version 9, Google Chrome Version 27.0.x Description: The below code snippet works fine in all but one special scenario: ListNotification listOfNotification = notificationListDataProvider.getList(); listOfNotification.remove(notification); notificationListDataProvider.setList(listOfNotification); notificationListDataProvider.flush(); notificationListDataProvider.refresh(); where notificationListDataProvider is the ListDataProvider associated with notificationCellList (A CellList object) displaying a list of Notification objects The above code is executed on clicking a Delete button. The list is refreshed fine in all cases except the one below: 1. There are only two items in the list: Item1 Item2 2. User selects first item (Item1) and deletes it 3. Following is displayed on the screen: Item2 Item2 Here, only the first instance of Item2 is selectable. I guess the second instance is just retained from step # 1 above and not being refreshed/removed from screen. Surprisingly, this is the only scenario that fails all other are working fine. I also tried notificationCellList.setRowData(), notificationCellList.setRowCount(), notificationCellList.redraw() after removing item from the list and before calling flush() and refresh() on listdataprovider. None of these have worked. Any help in resolving this issue will be highly appreciated. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Optimize initializing fields at the top scope.
Roberto Lublinerman has posted comments on this change. Change subject: Optimize initializing fields at the top scope. .. Patch Set 1: (1 comment) File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java Line 2234: // method. For now, assume that they might. I was think of a visitor like this one (incomplete) that only checks whether any of the class constructors have a dynamic call. /** * Classes that could potentially see uninitialized values for fields that are ininitialized * in the declaration. */ final SetJClassType canObserveSubclassUninitializedFieldsSet = new HashSetJClassType(); /** * Determines which classes can potentially see uninitialized values for fields that * are assigned literals in the declaration from subclasses. * * If a class can not observe subclass uninitialized fieds then the initialization of those * could be hoisted to the prototype. */ private class CanObserveSubclassUninitializedFieldsVisitor extends JVisitor { private JClassType currentClass; @Override public boolean visit(JConstructor x, Context ctx) { // Only look at constructor bodies. assert currentClass == null; currentClass = x.getEnclosingType(); return true; } @Override public boolean visit(JMethod x, Context ctx) { // Do not traverse the method body if it is not a constructor. return false; } @Override public void endVisit(JMethodCall x, Context ctx) { // this is a method call inside a constructor. assert currentClass != null; // static dispatch can not observe subclass fields. if (!x.isStaticDispatchOnly()) return; if (x.canBePolymorphic()) { // only potentially dynamic calls could observe uninitialized // subclass fields. canObserveSubclassUninitializedFieldsSet.add(currentClass); } } } After you run this visitor (which should probably be the first thing in execImpl) the information need to be propagated from classes to subclasses. That can be done in the visitor by querying the type oracle for subclasses or by another visitor pass, your choice. -- To view, visit https://gwt-review.googlesource.com/3440 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97a06eb36396a8b8659ce9a025b21a9cf93d0500 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Brian Slesinsky skybr...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Roberto Lublinerman rlu...@google.com Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: FileUpload: extending FocusWidget instead of Widget so as it...
Matthew Dempsky has posted comments on this change. Change subject: FileUpload: extending FocusWidget instead of Widget so as it exposes many features which already are in the file-input element: click(), focus(), mouseevents, keyevents, etc. .. Patch Set 6: Code-Review+1 Seems fine to me. Someone more familiar with UI stuff should CR+2 though. :) -- To view, visit https://gwt-review.googlesource.com/3211 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bc3c0991c5025a10a14b2f04ece6d91e11bcddb Gerrit-PatchSet: 6 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Manuel Carrasco Moñino manuel.carrasc...@gmail.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com Gerrit-Reviewer: Matthew Dempsky mdemp...@google.com Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Ensure clinits get called for JSO instance methods.
Colin Alworth has posted comments on this change. Change subject: Ensure clinits get called for JSO instance methods. .. Patch Set 2: (1 comment) File dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java Line 172: if (program.isStaticImpl(x.getTarget()) !program.isJavaScriptObject(x.getTarget().getEnclosingType())) { The extra condition (both here and in GenerateJavaScriptAST) deals with the fact that MakeCallsStatic registers instance methods as static with JProgram, while JsoDevirtualizer does not. This seems reasonable at first, though since JSOs are *always* made static, there might be other implications. I suggested this in my first comment in this change request, but John seemed to think that this approach made more sense. That said, I haven't actually tried making that change, and seeing what else is affected (i.e. all other callsites of JProgram.isStaticImpl or .getStaticImpl). -- To view, visit https://gwt-review.googlesource.com/3361 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: If09885382bcf2d6c149cd8e48bfdd3ae527d67cb Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: John A. Tamplin j...@jaet.org Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Matthew Dempsky mdemp...@google.com Gerrit-Reviewer: Roberto Lublinerman rlu...@google.com Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: adds type tightening (and tests) for casts inside of RunAsyn...
John Stalcup has uploaded a new change for review. https://gwt-review.googlesource.com/3460 Change subject: adds type tightening (and tests) for casts inside of RunAsync onSuccessCalls, resulting in smaller leftover fragments .. adds type tightening (and tests) for casts inside of RunAsync onSuccessCalls, resulting in smaller leftover fragments Change-Id: I7b454db222da054834aa0d78b1a769100bf9da9b --- M dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java M dev/core/test/com/google/gwt/dev/jjs/impl/CodeSplitter2Test.java 2 files changed, 55 insertions(+), 9 deletions(-) diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java index 5ac6ea7..5fb0f82 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java @@ -45,6 +45,7 @@ import com.google.gwt.dev.jjs.ast.JProgram; import com.google.gwt.dev.jjs.ast.JReferenceType; import com.google.gwt.dev.jjs.ast.JReturnStatement; +import com.google.gwt.dev.jjs.ast.JRunAsync; import com.google.gwt.dev.jjs.ast.JTryStatement; import com.google.gwt.dev.jjs.ast.JType; import com.google.gwt.dev.jjs.ast.JTypeOracle; @@ -625,6 +626,12 @@ } @Override +public boolean visit(JRunAsync x, Context ctx) { + x.traverseOnSuccess(this); + return super.visit(x, ctx); +} + +@Override public boolean visit(JClassType x, Context ctx) { // don't mess with classes used in code gen if (program.codeGenTypes.contains(x)) { diff --git a/dev/core/test/com/google/gwt/dev/jjs/impl/CodeSplitter2Test.java b/dev/core/test/com/google/gwt/dev/jjs/impl/CodeSplitter2Test.java index 70eaa5e..bc8b1b6 100644 --- a/dev/core/test/com/google/gwt/dev/jjs/impl/CodeSplitter2Test.java +++ b/dev/core/test/com/google/gwt/dev/jjs/impl/CodeSplitter2Test.java @@ -83,13 +83,14 @@ private JProgram jProgram = null; private JsProgram jsProgram = null; - - public void setUp() throws Exception{ + + @Override + public void setUp() throws Exception { super.setUp(); stackMode.addDefinedValue(new ConditionNone(), STRIP); jsProgram = new JsProgram(); } - + public void testSimple() throws UnableToCompleteException { StringBuffer code = new StringBuffer(); code.append(package test;\n); @@ -127,6 +128,34 @@ // functionC must be in the initial fragment. assertInFragment(functionC, 0); + } + + public void testOnSuccessCallCast() throws UnableToCompleteException { +StringBuffer code = new StringBuffer(); +code.append(package test;\n); +code.append(import com.google.gwt.core.client.GWT;\n); +code.append(import com.google.gwt.core.client.RunAsyncCallback;\n); +code.append(public class EntryPoint {\n); +code.append( + functionA); +code.append( + functionB); +code.append( + functionC); +code.append( public static void onModuleLoad() {\n); +code.append(functionC();); +code.append( + createRunAsync((RunAsyncCallback), functionA();)); +code.append( + createRunAsync((RunAsyncCallback), functionB();)); +code.append( }\n); +code.append(}\n); +compileSnippet(code.toString()); + +// init + 2 fragments + leftover. +assertFragmentCount(4); + +assertInFragment(functionA, 1); +assertInFragment(functionB, 2); + +// Verify that functionA and B aren't in the leftover. +assertNotInFragment(functionA, 3); +assertNotInFragment(functionB, 3); } public void testMergeLeftOvers() throws UnableToCompleteException { @@ -292,6 +321,8 @@ jProgram.addEntryMethod(findMethod(jProgram, onModuleLoad)); CastNormalizer.exec(jProgram, false); ArrayNormalizer.exec(jProgram); +TypeTightener.exec(jProgram); +MethodCallTightener.exec(jProgram); MapStandardSymbolData, JsName symbolTable = new TreeMapStandardSymbolData, JsName(new SymbolData.ClassIdentComparator()); JavaToJavaScriptMap map = GenerateJavaScriptAST.exec( @@ -332,13 +363,21 @@ mergeLimit); } - - private static String createRunAsync(String body) { -return GWT.runAsync(new RunAsyncCallback() { + - public void onFailure(Throwable reason) {} + - public void onSuccess() { + body + }});; + private static String createRunAsync(String cast, String body) { +StringBuffer code = new StringBuffer(); +code.append(GWT.runAsync( + cast + new RunAsyncCallback() {\n); +code.append( public void onFailure(Throwable reason) {}\n); +code.append( public void onSuccess() {\n); +code.append( + body); +code.append( }\n); +code.append(});\n); +return code.toString(); } - + + private static String createRunAsync(String body) { +return createRunAsync(, body); + } + /** * Add some of the compiler intrinsic */ -- To view, visit
[gwt-contrib] Change in gwt[master]: adds type tightening (and tests) for casts inside of RunAsyn...
John Stalcup has posted comments on this change. Change subject: adds type tightening (and tests) for casts inside of RunAsync onSuccessCalls, resulting in smaller leftover fragments .. Patch Set 1: addresses part of https://code.google.com/p/google-web-toolkit/issues/detail?id=7874 -- To view, visit https://gwt-review.googlesource.com/3460 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b454db222da054834aa0d78b1a769100bf9da9b Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: John Stalcup stal...@google.com Gerrit-Reviewer: John Stalcup stal...@google.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: adds type tightening (and tests) for casts inside of RunAsyn...
Roberto Lublinerman has posted comments on this change. Change subject: adds type tightening (and tests) for casts inside of RunAsync onSuccessCalls, resulting in smaller leftover fragments .. Patch Set 1: Code-Review+2 (1 comment) Aside for the comment LGTM. File dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java Line 631: return super.visit(x, ctx); I would just return true that means that other children will be visited to follow standard protocol. Also add a comment before traverseOnSuccess mentioning that JRunAsync is treated different than other ones and some of its child nodes are not traversed normally and that it needs to be forced to traverse the onSuccess call. -- To view, visit https://gwt-review.googlesource.com/3460 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b454db222da054834aa0d78b1a769100bf9da9b Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: John Stalcup stal...@google.com Gerrit-Reviewer: John Stalcup stal...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Roberto Lublinerman rlu...@google.com Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.
Goktug Gokdogan has posted comments on this change. Change subject: Add interfaces for widgets. .. Patch Set 8: I thought IsXXX just meant we really wanted to name this interface just 'XXX', but that name was already taken by the concrete class That doesn't fit into current IsXXX because if it was you wouldn't need IsWidget2 :) I'm not good at coming up with great names but perhaps IXXX would be better. Well, I read the github page for gwt-mockito, and I believe we have different opinions on what constitutes a mess :-). With rejecting that, you basically rejecting mocking libs which is very common practice for testing in java :) As a distilled/simplified example, what I do is, roughly: You cannot do what you exactly want to do with in any widget library in Java (AWT, SWT, Swing, Android) out of the box. So what you are proposing is actually a uncommon request :) Also I think, we can still do do something similar by mocking options. For example, instead of generating new StubElement() you can generate StubFactory.createElement(). createElement will return Mockito.when(any(), answer). Answer can be implemented by just using naming conventions (i.e. store x on setX and return it on getX) or it can forward calls to your handwritten StubElement - which doesn't need to extend the StubElement. You can even do this without gwt-mockito. Anyway, what I mean is, I think you can still achieve exactly what you want and have the same development experience without the extra interfaces. -- To view, visit https://gwt-review.googlesource.com/3231 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9 Gerrit-PatchSet: 8 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Fix binary vs. internal variable names, remove unused Name c...
Stephen Haberman has uploaded a new change for review. https://gwt-review.googlesource.com/3470 Change subject: Fix binary vs. internal variable names, remove unused Name code. .. Fix binary vs. internal variable names, remove unused Name code. Change-Id: I540b1225efe7f81f0fc3ac50871cc66d1e99e753 --- M dev/core/src/com/google/gwt/dev/javac/CompilationState.java M dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java M dev/core/src/com/google/gwt/dev/javac/JsniChecker.java M dev/core/src/com/google/gwt/dev/javac/Resolver.java M dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java M dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java M dev/core/src/com/google/gwt/dev/javac/asm/ResolveTypeSignature.java M dev/core/src/com/google/gwt/dev/util/Name.java M dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java M dev/core/test/com/google/gwt/dev/util/NameTest.java 11 files changed, 66 insertions(+), 219 deletions(-) diff --git a/dev/core/src/com/google/gwt/dev/javac/CompilationState.java b/dev/core/src/com/google/gwt/dev/javac/CompilationState.java index 5e8844c..c043dfb 100644 --- a/dev/core/src/com/google/gwt/dev/javac/CompilationState.java +++ b/dev/core/src/com/google/gwt/dev/javac/CompilationState.java @@ -36,7 +36,7 @@ public class CompilationState { /** - * Classes mapped by binary name. + * Classes mapped by internal name. */ protected final MapString, CompiledClass classFileMap = new HashMapString, CompiledClass(); @@ -105,7 +105,7 @@ } /** - * Returns a map of all compiled classes by binary name. + * Returns a map of all compiled classes by internal name. */ public MapString, CompiledClass getClassFileMap() { return exposedClassFileMap; diff --git a/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java b/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java index d450ca7..72caade 100644 --- a/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java +++ b/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java @@ -83,8 +83,8 @@ MapString, Binding jsniRefs = new HashMapString, Binding(); JsniChecker.check(cud, jsoState, jsniMethods, jsniRefs, new JsniChecker.TypeResolver() { @Override -public ReferenceBinding resolveType(String typeName) { - ReferenceBinding resolveType = compiler.resolveType(typeName); +public ReferenceBinding resolveType(String sourceOrBinaryName) { + ReferenceBinding resolveType = compiler.resolveType(sourceOrBinaryName); if (resolveType != null) { jsniDeps.add(String.valueOf(resolveType.qualifiedSourceName())); } diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java index 2f7e90d..4438f97 100644 --- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java +++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java @@ -501,9 +501,9 @@ } public NameEnvironmentAnswer findType(char[][] compoundTypeName) { - char[] binaryNameChars = CharOperation.concatWith(compoundTypeName, '/'); - String binaryName = String.valueOf(binaryNameChars); - CompiledClass compiledClass = binaryTypes.get(binaryName); + char[] internalNameChars = CharOperation.concatWith(compoundTypeName, '/'); + String internalName = String.valueOf(internalNameChars); + CompiledClass compiledClass = internalTypes.get(internalName); try { if (compiledClass != null) { return compiledClass.getNameEnvironmentAnswer(); @@ -511,11 +511,11 @@ } catch (ClassFormatException ex) { // fall back to binary class } - if (isPackage(binaryName)) { + if (isPackage(internalName)) { return null; } if (additionalTypeProviderDelegate != null) { -GeneratedUnit unit = additionalTypeProviderDelegate.doFindAdditionalType(binaryName); +GeneratedUnit unit = additionalTypeProviderDelegate.doFindAdditionalType(internalName); if (unit != null) { CompilationUnitBuilder b = CompilationUnitBuilder.create(unit); Adapter a = new Adapter(b); @@ -523,7 +523,7 @@ } } try { -URL resource = getClassLoader().getResource(binaryName + .class); +URL resource = getClassLoader().getResource(internalName + .class); if (resource != null) { InputStream openStream = resource.openStream(); try { @@ -656,19 +656,20 @@ return options; } - public static ReferenceBinding resolveType(LookupEnvironment lookupEnvironment, String typeName) { + private static ReferenceBinding resolveType(LookupEnvironment
[gwt-contrib] Change in gwt[master]: Fix binary vs. internal variable names, remove unused Name c...
Stephen Haberman has posted comments on this change. Change subject: Fix binary vs. internal variable names, remove unused Name code. .. Patch Set 1: There are no semantic changes here, just updating variable names to match what they really were (mostly using the term 'binary' when really the names are internal). This is a smaller part of my larger fix $-related name mangling patch that I'm attempting to resurrect in small chunks that will be easier to review. -- To view, visit https://gwt-review.googlesource.com/3470 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I540b1225efe7f81f0fc3ac50871cc66d1e99e753 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Roberto Lublinerman rlu...@google.com Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Optimize initializing fields at the top scope.
Stephen Haberman has posted comments on this change. Change subject: Optimize initializing fields at the top scope. .. Patch Set 1: (1 comment) File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java Line 2234: // method. For now, assume that they might. Hi Roberto, Thanks for the draft visitor--that looks great; I'll take a shot at integrating this soon. -- To view, visit https://gwt-review.googlesource.com/3440 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97a06eb36396a8b8659ce9a025b21a9cf93d0500 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Brian Slesinsky skybr...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Roberto Lublinerman rlu...@google.com Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.