Re: [gwt-contrib] Re: CompilePerms and classpath loading problem.
I've created a patch (and submitted it for code review - http://gwt-code-reviews.appspot.com/579801/show). It seems to be working correctly for me On Tue, Jun 1, 2010 at 10:54 PM, Marko Vuksanovic markovuksano...@gmail.com wrote: I have modified the code to check the resource oracle (patch is attached). If the way i did it is correct - one more problem arose - The path is not reconstructed correctly. I get the error is Scanning for additional dependencies: file:/D:/Devel/open-source/gwt-distributed-compiler/agent/0002/src/hr/tkd/orka/client/panels/MainPanel.java Computing all possible rebind results for 'hr.tkd.orka.client.panels.MainPanel.MainPanelUiBinder' Rebinding hr.tkd.orka.client.panels.MainPanel.MainPanelUiBinder Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator [ERROR] Generator 'com.google.gwt.uibinder.rebind.UiBinderGenerator' threw an exception while rebinding 'hr.tkd.orka.client.panels.MainPanel.MainPanelUiBinder' java.lang.RuntimeException: java.io.FileNotFoundException: D:\Devel\open-source\gwt-distributed-compiler\agent\hr\tkd\orka\client\panels\MainPanel.ui.xml (The system cannot find the path specified) Obviously the resource is being looked for at the wrong place... It should be D:\Devel\open-source\gwt-distributed-compiler\agent\0002\src\hr\tkd\orka\client\panels\MainPanel.ui.xml the program is run from the location D:\Devel\open-source\gwt-distributed-compiler\agent\ and the files needed for compile perms are located in folder 0002\src, 0002\lib and 0002\work. The relevant part of the context class path is set to D:\Devel\open-source\gwt-distributed-compiler\agent\0002\src but when resource is fetched from the resource oracle the path is not constructed correctly. I reckon the resource should be added as 0002\src\hr\tkd\orka\client\panels\MainPanel.ui.xml... On Tue, Jun 1, 2010 at 10:05 PM, Marko Vuksanovic markovuksano...@gmail.com wrote: I don't believe it's necessarily true for the system loader to be a parent of the context loader. It's common, but not necessary. The only loader you can't get away from is the boot class loader. Ok, I wasn't totally precise. You're right about the boot and system class loader. The point was that all the parent class loaders would be checked prior to checking the actual class loader. So checking the context class loader would result in checking all the class loaders above it (in the hierarchy) - and if the hierarchy wasn't explicitly changed this should be perfectly ok. On Tue, Jun 1, 2010 at 9:17 PM, Lex Spoon sp...@google.com wrote: On Tue, Jun 1, 2010 at 2:35 PM, Marko Vuksanovic markovuksano...@gmail.com wrote: Class Loaders are checked in parent to child direction - so if you try to fetch a resource from a context class loader, system class loader is the first that will be checked and only after resource is not found there, next child will be checked... and so on... So if something is found in context class loader, all parent class loaders have been checked. Somebody correct me if I'm wrong. I don't believe it's necessarily true for the system loader to be a parent of the context loader. It's common, but not necessary. The only loader you can't get away from is the boot class loader. That said, if it's not on the context loader, you might want to ignore it if you can get away with it. For that matter, the same goes for things not in the resource oracle. -Lex -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: UiBinderGenerator is unable to fetch resources (issue579801)
http://gwt-code-reviews.appspot.com/579801/diff/1/2 File user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java (right): http://gwt-code-reviews.appspot.com/579801/diff/1/2#newcode147 user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java:147: Resource[] resources = (resourceOracle.getResources()).toArray(new Resource[] {}); Why not getResourceMap() here instead of a loop? http://gwt-code-reviews.appspot.com/579801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)
Ping. http://gwt-code-reviews.appspot.com/335802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)
Crap, sorry. I/O ate my brain. Reviewing now. Le 2 juin 2010 10:04, b...@google.com a écrit : Ping. http://gwt-code-reviews.appspot.com/335802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)
LGTM. http://gwt-code-reviews.appspot.com/335802/diff/1/4 File user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java (left): http://gwt-code-reviews.appspot.com/335802/diff/1/4#oldcode221 user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java:221: interface HasRect { On 2010/04/16 18:24:03, bobv wrote: Removed this interface because it is silly. Always a good reason :) http://gwt-code-reviews.appspot.com/335802/diff/1/6 File user/test/com/google/gwt/resources/client/ImageResourceTest.java (right): http://gwt-code-reviews.appspot.com/335802/diff/1/6#newcode167 user/test/com/google/gwt/resources/client/ImageResourceTest.java:167: assertEquals(128, r.scaledUp().getHeight()); I assume the point of testing both width and height here (even though only width is set above) is to assert that the image scaled proportionally, right? http://gwt-code-reviews.appspot.com/335802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RR : Rework ImageResourceGenerator to address several issues (issue335802)
Thanks for the review. http://gwt-code-reviews.appspot.com/335802/diff/1/6#newcode167 user/test/com/google/gwt/resources/client/ImageResourceTest.java:167: assertEquals(128, r.scaledUp().getHeight()); I assume the point of testing both width and height here (even though only width is set above) is to assert that the image scaled proportionally, right? Yes, I'll add a comment to that effect. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Faster version of LongLib (issue572801)
http://gwt-code-reviews.appspot.com/572801/diff/9001/10015 File user/super/com/google/gwt/emul/java/lang/Number.java (right): http://gwt-code-reviews.appspot.com/572801/diff/9001/10015#newcode245 user/super/com/google/gwt/emul/java/lang/Number.java:245: private static final int[] maxLengthForRadix = {-1, -1, // unused Can you move these three static-init arrays into a static nested class; otherwise you're forcing all of java.lang.Number to have a clinit, which is less than ideal. See Decode for example. http://gwt-code-reviews.appspot.com/572801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Deleting the stocks sample in favor of the Expenses sample. (issue580801)
Reviewers: jgw, Description: Deleting the stocks sample in favor of the Expenses sample. Review by: j...@google.com Please review this at http://gwt-code-reviews.appspot.com/580801/show Affected files: D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/StocksCommon.gwt.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/StocksDesktop.gwt.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/StocksMobile.gwt.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/BuySellPopup.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/ChangeCell.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/Columns.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/FavoritesWidget.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/FavoritesWidget.ui.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/HighlightingTextCell.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/PlayerScoresWidget.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/PlayerScoresWidget.ui.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/ProfitLossCell.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockQueryWidget.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockQueryWidget.ui.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockQuoteCell.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockService.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StockServiceAsync.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksDesktop.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksDesktop.ui.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksMobile.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/StocksMobile.ui.xml D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/TransactionTreeViewModel.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/client/Updater.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/GoogleFinance.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/PlayerStatus.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/StockServiceImpl.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/server/Stocks.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/PlayerInfo.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockQuote.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockQuoteList.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockRequest.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/StockResponse.java D bikeshed/src/com/google/gwt/sample/bikeshed/stocks/shared/Transaction.java D bikeshed/war/Stocks.html D bikeshed/war/StocksMobile.html M bikeshed/war/WEB-INF/web.xml -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Faster version of LongLib (issue572801)
http://gwt-code-reviews.appspot.com/572801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adding test cases for com.google.gwt.cell.client. (issue581801)
Reviewers: Dan Rice, Description: Adding test cases for com.google.gwt.cell.client. Please review this at http://gwt-code-reviews.appspot.com/581801/show Affected files: M bikeshed/src/com/google/gwt/sample/bikeshed/cookbook/client/MyTreeViewModel.java M user/src/com/google/gwt/cell/client/ActionCell.java M user/src/com/google/gwt/cell/client/ClickableTextCell.java M user/src/com/google/gwt/cell/client/CompositeCell.java M user/src/com/google/gwt/cell/client/EditTextCell.java M user/src/com/google/gwt/cell/client/IconCellDecorator.java A user/test/com/google/gwt/cell/client/AbstractCellTest.java A user/test/com/google/gwt/cell/client/ActionCellTest.java A user/test/com/google/gwt/cell/client/ButtonCellTest.java A user/test/com/google/gwt/cell/client/CellTestBase.java A user/test/com/google/gwt/cell/client/CheckboxCellTest.java A user/test/com/google/gwt/cell/client/ClickableTextCellTest.java A user/test/com/google/gwt/cell/client/CompositeCellTest.java A user/test/com/google/gwt/cell/client/DateCellTest.java A user/test/com/google/gwt/cell/client/EditTextCellTest.java A user/test/com/google/gwt/cell/client/IconCellDecoratorTest.java A user/test/com/google/gwt/cell/client/TextCellTest.java A user/test/com/google/gwt/cell/client/TextInputCellTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixes issue #3708 (issue582801)
Reviewers: Keith, Description: Moves assertion checking inside the check block to avoid a bad assertion on unreachable local classes. http://gwt-code-reviews.appspot.com/582801 Please review this at http://gwt-code-reviews.appspot.com/582801/show Affected files: M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java Index: dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java 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 e685994da342c12752032557abde768a5493971a..811658673c2cf6d0d202f3ef850639cecb007cbd 100644 --- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java +++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java @@ -84,8 +84,7 @@ public class JdtCompiler { CompilationUnitDeclaration cud, ListCompiledClass compiledClasses) { CompilationUnit unit = builder.build(compiledClasses, compiler.computeDependencies(cud), - Collections.JsniMethod emptyList(), - new MethodArgNamesLookup(), + Collections.JsniMethod emptyList(), new MethodArgNamesLookup(), cud.compilationResult().getProblems()); if (cud.compilationResult().hasErrors()) { unit = new ErrorCompilationUnit(unit); @@ -176,13 +175,13 @@ public class JdtCompiler { @Override public boolean visit(TypeDeclaration typeDecl, BlockScope scope) { - CompiledClass enclosingClass = map.get(typeDecl.binding.enclosingType()); - assert (enclosingClass != null); /* * Weird case: if JDT determines that this local class is totally * uninstantiable, it won't bother allocating a local name. */ if (typeDecl.binding.constantPoolName() != null) { +CompiledClass enclosingClass = map.get(typeDecl.binding.enclosingType()); +assert (enclosingClass != null); CompiledClass newClass = new CompiledClass(typeDecl, enclosingClass); map.put(typeDecl.binding, newClass); } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes issue #3708 (issue582801)
LGTM http://gwt-code-reviews.appspot.com/582801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re-added Expenses.html, which was lost in the merge. Also uses a URL parameter for mobile emplo... (issue582802)
Reviewers: Dan Rice, Description: Re-added Expenses.html, which was lost in the merge. Also uses a URL parameter for mobile employee id instead of hard coding it. We can review this more later, but this makes it easier to debug. Please review this at http://gwt-code-reviews.appspot.com/582802/show Affected files: M bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java M bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobileShell.java M bikeshed/src/com/google/gwt/sample/expenses/gwt/client/MobileReportList.java A bikeshed/war/Expenses.html -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Command pattern and GWT.runAsync
Hi, I am trying to split a GWT app that uses the command (action) pattern. The problem is that GWT.create(ActionService.class) causes every subclass of the return and parameter types to be included in the initial fragment. For instance, my action interface is: public interface ActionService extends RemoteService { T extends Response, V extends Request T execute(V req) throws ActionFailedException; } the problem is that module1.SomeRequest and module2.OtherRequest gets included in the initial fragment. Do you see a way around this? Thanks, Julio Faerman -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: UiBinderGenerator is unable to fetch resources (issue579801)
http://gwt-code-reviews.appspot.com/579801/diff/1/2 File user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java (right): http://gwt-code-reviews.appspot.com/579801/diff/1/2#newcode147 user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java:147: Resource[] resources = (resourceOracle.getResources()).toArray(new Resource[] {}); I just haven't noticed that method... I will change this. http://gwt-code-reviews.appspot.com/579801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fix issue 4423 - RPC ProxyCreator doesn't support methods with Type Parameters (issue575801)
Reviewers: , Please review this at http://gwt-code-reviews.appspot.com/575801/show Affected files: user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java Index: user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java === --- user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java (revision 8216) +++ user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java (working copy) @@ -32,6 +32,7 @@ import com.google.gwt.core.ext.typeinfo.JParameterizedType; import com.google.gwt.core.ext.typeinfo.JPrimitiveType; import com.google.gwt.core.ext.typeinfo.JType; +import com.google.gwt.core.ext.typeinfo.JTypeParameter; import com.google.gwt.core.ext.typeinfo.NotFoundException; import com.google.gwt.core.ext.typeinfo.TypeOracle; import com.google.gwt.dev.generator.NameFactory; @@ -402,13 +403,35 @@ w.println(); // Write the method signature -JType asyncReturnType = asyncMethod.getReturnType().getErasedType(); w.print(public ); -w.print(asyncReturnType.getQualifiedSourceName()); + +// Handle any type parameters that are required +JTypeParameter[] asyncTypeParams = asyncMethod.getTypeParameters(); +if (asyncTypeParams.length 0) { + w.print(); +} + +boolean needsComma = false; +for (int i = 0; i asyncTypeParams.length; ++i) { + JTypeParameter param = asyncTypeParams[i]; + if (needsComma) { +w.print(, ); + } else { +needsComma = true; + } + w.print(param.getQualifiedSourceName()); +} + +if (asyncTypeParams.length 0) { + w.print( ); +} + +JType asyncReturnType = asyncMethod.getReturnType(); +w.print(asyncReturnType.getParameterizedQualifiedSourceName()); w.print( ); w.print(asyncMethod.getName() + (); -boolean needsComma = false; +needsComma = false; NameFactory nameFactory = new NameFactory(); JParameter[] asyncParams = asyncMethod.getParameters(); for (int i = 0; i asyncParams.length; ++i) { @@ -425,9 +448,8 @@ * SerializationStreamWriter.writeObject we need a try catch block */ JType paramType = param.getType(); - paramType = paramType.getErasedType(); - w.print(paramType.getQualifiedSourceName()); + w.print(paramType.getParameterizedQualifiedSourceName()); w.print( ); String paramName = param.getName(); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] UiBinderGenerator is unable to fetch resources (issue579801)
Reviewers: Ray Ryan, scottb, Lex, jat, Description: If class path context is changed UiBinderGenerator isn't able to fetch resources found in the new class path context. Please review this at http://gwt-code-reviews.appspot.com/579801/show Affected files: user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors