[gwt-contrib] Comment on CodeSplitting in google-web-toolkit

2009-08-19 Thread codesite-noreply

Comment by cromwellian:


Not currently. GWT Exporter  was created under the paradigm that it only  
exports what is explicitly requested, or what is absolutely necessary. I  
felt at the time that 'inheriting' annotations could lead to a lot of  
bloat, as well as asking the TypeOracle to give you all subtypes can cause  
performance issues in Hosted Mode.

I planned on adding module parameter 'exportAll', where you don't even have  
to invoke GWT.create() on each class to export, but rather, there would be  
a module entry point which triggers a special generator that finds every  
single class in the classpath with @Export annotations and exports them  
automatically.  There are some people who would like this as an ease of  
development option.



For more information:
http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Illegal XML characters in SOYC XML files

2009-08-19 Thread spoon

LGTM.

There is a tricky problem here, probably deserving a comment in the SOYC
code.  Ideally, the XML file should be non-lossy, and the original
string text should be recoverable.  The best way I have run into to
accomplish that would be to convert the string data back into string
literal syntax.  That is, a NUL would turn into \x00, and a 0x would
turn into \u .


http://gwt-code-reviews.appspot.com/61801

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Illegal XML characters in SOYC XML files

2009-08-19 Thread jat

Personally, I would just transform every character ==0 or 127 into a \x
or \u escape (or since this is XML you could use an entity reference,
#x;).  There shouldn't be a ton of them and it isn't like XML is small
anyway.

http://gwt-code-reviews.appspot.com/61801

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Illegal XML characters in SOYC XML files

2009-08-19 Thread spoon

I like the #x; idea.  There is just one potential problem: will XML
readers support it?  The linked XML spec has the same restrictions on
encoded character entities as on raw characters appearing in the file.
Does anyone know if that restriction is honored in practice?  Anyone
want to test on Xerces?

http://gwt-code-reviews.appspot.com/61801

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Illegal XML characters in SOYC XML files

2009-08-19 Thread Ian Petersen

On Wed, Aug 19, 2009 at 6:28 AM, sp...@google.com wrote:
 I like the #x; idea.  There is just one potential problem: will XML
 readers support it?  The linked XML spec has the same restrictions on
 encoded character entities as on raw characters appearing in the file.
 Does anyone know if that restriction is honored in practice?  Anyone
 want to test on Xerces?

I don't have a parser lying around to prove this to myself, but I
don't think \0 = #x0; will work.  #x0 is just a way to type the
zeroth character when you don't have a zeroth-character-key on your
keyboard.  A conforming XML parser will convert it into the zeroth
character and then yell at you, just as if the zeroth character were
in the text all along.  I tried something similar a while back with
some arbitrary parser and things blew up on me.

Ian

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Formalize default filename extensions for ClientBundle

2009-08-19 Thread bobv

Reviewers: kplatfoot, Ray Ryan,

Message:
Review requested.

Description:
This change declares the default filename suffixes on the resource types
instead of constants in the ResourceGenerators.

Please review this at http://gwt-code-reviews.appspot.com/61802

Affected files:
   M user/src/com/google/gwt/resources/client/CssResource.java
   M user/src/com/google/gwt/resources/client/ExternalTextResource.java
   M user/src/com/google/gwt/resources/client/ImageResource.java
   M user/src/com/google/gwt/resources/client/TextResource.java
   M user/src/com/google/gwt/resources/ext/ResourceGeneratorUtil.java
   M  
user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java
   M user/src/com/google/gwt/resources/rg/CssResourceGenerator.java
   M user/src/com/google/gwt/resources/rg/ExternalTextResourceGenerator.java
   M user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java
   M user/src/com/google/gwt/resources/rg/TextResourceGenerator.java



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Formalize default filename extensions for ClientBundle

2009-08-19 Thread kplatfoot

Shouldn't com.google.gwt.resources.ext.DefaultExtensions have been
included in this patch?

http://gwt-code-reviews.appspot.com/61802

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Formalize default filename extensions for ClientBundle

2009-08-19 Thread kplatfoot


http://gwt-code-reviews.appspot.com/61802/diff/1011/17
File user/src/com/google/gwt/resources/ext/DefaultExtensions.java
(right):

http://gwt-code-reviews.appspot.com/61802/diff/1011/17#newcode28
Line 28: * {...@link
com.google.gwt.resources.client.ClientBundle.SourceSource} annotation
The @link has the wrong simple name: 'SourceSource'

http://gwt-code-reviews.appspot.com/61802

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: STOB short circuit path must also compute some side information

2009-08-19 Thread Lex Spoon
Here is an updated patch with the method rename and the updated docs.
I'm still waiting on trunk to stabilize before committing.  -Lex

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



stobStringArrayArray2-r5972.patch
Description: Binary data


[gwt-contrib] [google-web-toolkit] r5977 committed - Fix JUnit enabling emulated stack traces....

2009-08-19 Thread codesite-noreply

Revision: 5977
Author: b...@google.com
Date: Wed Aug 19 11:04:00 2009
Log: Fix JUnit enabling emulated stack traces.

Patch by: bobv
Review by: spoon
http://code.google.com/p/google-web-toolkit/source/detail?r=5977

Modified:
  /trunk/user/src/com/google/gwt/junit/JUnit.gwt.xml

===
--- /trunk/user/src/com/google/gwt/junit/JUnit.gwt.xml  Mon Aug 17 09:47:48  
2009
+++ /trunk/user/src/com/google/gwt/junit/JUnit.gwt.xml  Wed Aug 19 11:04:00  
2009
@@ -33,8 +33,7 @@

!-- We want to provide good stack traces on browsers that don't provide  
good native stack traces. --
set-configuration-property  
name=compiler.emulatedStack.recordFileNames value=true /
-  set-property name=compiler.emulatedStack value=true /
-  set-property name=compiler.emulatedStack value=false
+  set-property name=compiler.emulatedStack value=true 
  none
when-property-is name=user.agent value=gecko /
when-property-is name=user.agent value=gecko1_8 /

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Fix potential deRPC backref ident mismatch

2009-08-19 Thread rjrjr

LGTM

http://gwt-code-reviews.appspot.com/61803

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Formalize default filename extensions for ClientBundle

2009-08-19 Thread rjrjr

This is a nice cleanup, but I have questions about your annotation
search


http://gwt-code-reviews.appspot.com/61802/diff/1011/18
File user/src/com/google/gwt/resources/ext/ResourceGeneratorUtil.java
(right):

http://gwt-code-reviews.appspot.com/61802/diff/1011/18#newcode135
Line 135: public static T extends Annotation T
findAnnotation(TreeLogger logger,
logger appears to be unused.

Is there an appropriate more general home for this? I know I do it all
the time. Could it be an instance method on JClassType?

Also, you don't appear to be looking for the @Inherited meta annotation,
and by trawling through super types and interfaces won't you pick up
annotations that aren't marked that way?

For annotations marked @Inherited, would the super-crawl even be
necessary?

http://gwt-code-reviews.appspot.com/61802

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Illegal XML characters in SOYC XML files

2009-08-19 Thread kprobst

Thanks, Lex.

I didn't try the #x; idea (see Ian's comment), but I also added the
other illegal characters. I'll leave the recoverability (in the
dashboard) for another day: (x00) and (u) seem good to me for human
consumption, and the surrogate blocks characters shouldn't really ever
in an application.

On 2009/08/19 13:28:10, Lex wrote:
 I like the #x; idea.  There is just one potential problem: will XML
readers
 support it?  The linked XML spec has the same restrictions on encoded
character
 entities as on raw characters appearing in the file.  Does anyone know
if that
 restriction is honored in practice?  Anyone want to test on Xerces?



http://gwt-code-reviews.appspot.com/61801

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Fix handling of troubleshooting iframe, support gwt.codesvr query param

2009-08-19 Thread jat

Reviewers: jgw, knorton,

Description:
This patch fixes the issue Kelly found where the iframe used to display
an OOPHM troubleshooting page might not be ready to redirect to the URL.
  The fix is to simply specify the URL when the iframe is created, as the
javascript:'' hack is not needed here.

Also add support for gwt.codesvr in addition to gwt.hosted as the query
parameter (what is generated in the URL will be updated in MS2).

Please review this at http://gwt-code-reviews.appspot.com/61805

Affected files:
   dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
   dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js


Index: dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
===
--- dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
(revision  
5977)
+++ dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
(working  
copy)
@@ -1,5 +1,6 @@
  html
  headscript
+// TODO(jat): wrap these to reduce namespace issues
  var $wnd = parent;
  var $doc = $wnd.document;
  var $moduleName, $moduleBase
@@ -35,12 +36,11 @@

  function loadIframe(url) {
var iframe = $doc.createElement('iframe');
-  iframe.src = javascript:'';
+  iframe.src = url;
iframe.style.width = 100%;
iframe.style.height = 100%;
iframe.style.borderWidth = 0px;
$doc.body.insertBefore(iframe, $doc.body.firstChild);
-  iframe.contentWindow.location.replace(url);
  }

  if ($legacyHosted) {
@@ -273,13 +273,22 @@
  document.write('/object');
}

-  var idx = query.indexOf(gwt.hosted=);
+  // look for the old query parameter if we don't find the new one
+  var idx = query.indexOf(gwt.codesvr=);
if (idx = 0) {
+idx += 12;  // gwt.codesvr=.length() == 12
+  } else {
+idx = query.indexOf(gwt.hosted=);
+if (idx = 0) {
+  idx += 11;  // gwt.hosted=.length() == 11
+}
+  }
+  if (idx = 0) {
  var amp = query.indexOf(, idx);
  if (amp = 0) {
-  $hosted = query.substring(idx + 11, amp);
+  $hosted = query.substring(idx, amp);
  } else {
-  $hosted = query.substring(idx + 11);
+  $hosted = query.substring(idx);
  }

  // According to RFC 3986, some of this component's characters  
(e.g., ':')
Index: dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js
===
--- dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js   (revision  
5977)
+++ dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js   (working copy)
@@ -68,7 +68,8 @@
  var result = false;
  try {
var query = $wnd.location.search;
-  return (query.indexOf('gwt.hosted=') != -1
+  return (query.indexOf('gwt.codesvr=') != -1
+  || query.indexOf('gwt.hosted=') != -1
|| ($wnd.external  $wnd.external.gwtOnLoad)) 
(query.indexOf('gwt.hybrid') == -1);
  } catch (e) {



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Formalize default filename extensions for ClientBundle

2009-08-19 Thread rjrjr

LGTM w/a couple of javadoc tweaks.


http://gwt-code-reviews.appspot.com/61802/diff/28/1039
File dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java
(right):

http://gwt-code-reviews.appspot.com/61802/diff/28/1039#newcode368
Line 368: * which this type is assignable. Annotations present on the
superclass chain
...is assignable. ({...@literal @}Inherited works only from superclasses,
not interfaces.)

http://gwt-code-reviews.appspot.com/61802/diff/28/1039#newcode370
Line 370: * hierarchy.
Note that all upstream annotations will be returned, whether or not they
are marked as {...@literal @}Inherited.

http://gwt-code-reviews.appspot.com/61802

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] How can I write a css rule with leading - for CssResource? (eg -moz-box-sizing:border-box;)

2009-08-19 Thread Dominik Steiner

Hi there,

seems like a easy question and I hope that someone can point me into
the right direction, how can i write the css rule -moz-box-
sizing:border-box; so that the CssResource parser accepts it?

I tried

-moz-box-sizing:literal(border-box);

or

literal(-moz-box-sizing:border-box);

both leading to a warning like

[WARN] Line 2 column 13: encountered -. Was expecting one of: }
; IDENT

Any ideas? Thanks in advance

Dominik

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: How can I write a css rule with leading - for CssResource? (eg -moz-box-sizing:border-box;)

2009-08-19 Thread Stefan Haustein
On Wed, Aug 19, 2009 at 9:26 PM, Dominik Steiner 
dominik.j.stei...@googlemail.com wrote:


 Hi there,

 seems like a easy question and I hope that someone can point me into
 the right direction, how can i write the css rule -moz-box-
 sizing:border-box; so that the CssResource parser accepts it?


  \-moz-box-sizing: border-box;






 I tried

 -moz-box-sizing:literal(border-box);

 or

 literal(-moz-box-sizing:border-box);

 both leading to a warning like

 [WARN] Line 2 column 13: encountered -. Was expecting one of: }
 ; IDENT

 Any ideas? Thanks in advance

 Dominik

 



-- 
Stefan Haustein
Google UK Limited

Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
9TQ; Registered in England Number: 3977902

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Xerces bundled with GWT r5922+ is causing problems with GAE

2009-08-19 Thread Aaron Steele

On Mac OS X running Eclipse 3.5 with the latest Google Plugin, if you
create and run a new web application that's configured with GWT trunk
r5922+, it fails with the following 'SAXParserFactoryImpl not found'
error (since Xerces is now bundled with gwt-dev-*.jar):

http://utilitybase.com/paste/16789

During GAE office hours this morning on IRC, it sounded like an
internal CL exists for this issue and that it should get committed
RSN. I didn't see an external thread for this issue. The temporary
workaround is just SVN updating to r5921.

Thanks!
Aaron

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Fix the xerces interoperability with AppEngine

2009-08-19 Thread rjrjr

LGTM

http://gwt-code-reviews.appspot.com/61807

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Fix the xerces interoperability with AppEngine

2009-08-19 Thread amitmanjhi

Reviewers: Ray Ryan,

Description:
This patch removes the META-INF/services dir from xercesImpl.jar that
was causing conflicts with AppEngine and internal Tomcat. Also, rolls
back the changes made by now unnecessary c5916.

Please review this at http://gwt-code-reviews.appspot.com/61807

Affected files:
   dev/core/build.xml
   dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java
   eclipse/user/.classpath


Index: dev/core/build.xml
--- dev/core/build.xml  (revision 5922)
+++ dev/core/build.xml  (working copy)
@@ -65,7 +65,7 @@
include name=nekohtml/nekohtml-1.9.12.jar /
include name=xalan/xalan-2.7.1.jar /
include name=xerces/xerces-2_9_1/serializer.jar /
-  include name=xerces/xerces-2_9_1/xercesImpl.jar /
+  include name=xerces/xerces-2_9_1/xercesImpl-NoMetaInf.jar /
include name=xerces/xerces-2_9_1/xml-apis.jar /
include name=w3c/sac/sac-1.3.jar /
!-- htmlunit dependencies not already included: END --
@@ -119,7 +119,7 @@
zipfileset src=${gwt.tools.lib}/nekohtml/nekohtml-1.9.12.jar  
/
zipfileset src=${gwt.tools.lib}/xalan/xalan-2.7.1.jar /
zipfileset  
src=${gwt.tools.lib}/xerces/xerces-2_9_1/serializer.jar /
-  zipfileset  
src=${gwt.tools.lib}/xerces/xerces-2_9_1/xercesImpl.jar /
+  zipfileset  
src=${gwt.tools.lib}/xerces/xerces-2_9_1/xercesImpl-NoMetaInf.jar /
zipfileset  
src=${gwt.tools.lib}/xerces/xerces-2_9_1/xml-apis.jar /
zipfileset src=${gwt.tools.lib}/w3c/sac/sac-1.3.jar /
!-- htmlunit dependencies not already included: END --
Index:  
dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java
--- dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java  
 
(revision 5916)
+++ dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java  
 
(working copy)
@@ -177,15 +177,6 @@ public class EmbeddedTomcatServer {
  //
  File topWorkDir = new File(System.getProperty(user.dir));

-/*
- * set property explicitly so that addition of the xercesImpl lib,  
when java
- * 1.5 is used, does not affect tomcat.
- */
-if (1.5.equals(System.getProperty(java.specification.version))) {
-  System.setProperty(javax.xml.parsers.DocumentBuilderFactory,
-  
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl);
-}
-
  // Tell Tomcat its base directory so that it won't complain.
  //
  String catBase = System.getProperty(catalina.base);
Index: eclipse/user/.classpath
--- eclipse/user/.classpath (revision 5917)
+++ eclipse/user/.classpath (working copy)
@@ -20,7 +20,7 @@
classpathentry kind=var  
path=GWT_TOOLS/lib/selenium/selenium-java-client-driver.jar/
classpathentry kind=var path=GWT_TOOLS/lib/xalan/xalan-2.7.1.jar /
classpathentry kind=var  
path=GWT_TOOLS/lib/xerces/xerces-2_9_1/serializer.jar /
-   classpathentry kind=var  
path=GWT_TOOLS/lib/xerces/xerces-2_9_1/xercesImpl.jar /
+   classpathentry kind=var  
path=GWT_TOOLS/lib/xerces/xerces-2_9_1/xercesImpl-NoMetaInf.jar /
classpathentry kind=var  
path=GWT_TOOLS/lib/xerces/xerces-2_9_1/xml-apis.jar /
classpathentry kind=var path=GWT_TOOLS/lib/w3c/sac/sac-1.3.jar/
classpathentry kind=var 
path=GWT_TOOLS/lib/w3c/flute/flute-1.3.jar/




--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Formalize default filename extensions for ClientBundle

2009-08-19 Thread bobv

 Is there an appropriate more general home for this? I know I do it all
the time.
 Could it be an instance method on JClassType?

Moved to JClassType.findAnnotationInTypeHierarchy()

 For annotations marked @Inherited, would the super-crawl even be
necessary?

@Inherited doesn't work for superinterfaces.


http://gwt-code-reviews.appspot.com/61802

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: How can I write a css rule with leading - for CssResource? (eg -moz-box-sizing:border-box;)

2009-08-19 Thread Dominik Steiner

Thanks Stefan for the fast reply,

I tried it and it works!

On 19 Aug., 16:40, Stefan Haustein haust...@google.com wrote:
 On Wed, Aug 19, 2009 at 9:26 PM, Dominik Steiner 

 dominik.j.stei...@googlemail.com wrote:

  Hi there,

  seems like a easy question and I hope that someone can point me into
  the right direction, how can i write the css rule -moz-box-
  sizing:border-box; so that the CssResource parser accepts it?

   \-moz-box-sizing: border-box;





  I tried

  -moz-box-sizing:literal(border-box);

  or

  literal(-moz-box-sizing:border-box);

  both leading to a warning like

  [WARN] Line 2 column 13: encountered -. Was expecting one of: }
  ; IDENT

  Any ideas? Thanks in advance

  Dominik

 --
 Stefan Haustein
 Google UK Limited

 Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
 9TQ; Registered in England Number: 3977902
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Now with fake constants

2009-08-19 Thread rjrjr

Reviewers: ,

Description:
This is an internal contribution that extends FakeMessagesMaker to work
with Constants as well. I'll submit it if the c-build every turns green
again.

Please review this at http://gwt-code-reviews.appspot.com/61808

Affected files:
   user/src/com/google/gwt/junit/FakeMessagesMaker.java
   user/test/com/google/gwt/junit/FakeMessagesMakerTest.java



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Change the way modules are mapped to tabs in the Swing UI

2009-08-19 Thread jat

Thanks for the review.


http://gwt-code-reviews.appspot.com/59801/diff/2001/2011
File dev/oophm/src/com/google/gwt/dev/ModuleTabPanel.java (right):

http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode89
Line 89: public synchronized void addModule(String moduleName,
On 2009/08/20 02:37:12, Ray Ryan wrote:
 Who's calling this that it needs to be synchronized? I only see it
being reached
 from ModulePanel's constructor--how's that getting on multiple
threads?

 Likewise on the various other synchronized methods on this class. They
seem like
 a bad sign.

Two modules could be created at the same time, and the socket listener
thread forks them into their own threads.

http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode113
Line 113: // TODO(jat): don't show dropdown when only one module
On 2009/08/20 02:37:12, Ray Ryan wrote:
 boolean showIt = modules.size()  1;
 moduleDropdown.setVisible(showIt);
 moduleDropdown.setEnabled(showIt);

 And don't bother building it if !showIt, for that matter

 Actually, I suppose you'd put the dropdown and its label in a panel,
and set
 visibility on that. Same idea.

Ok. I was thinking we needed to show a label with the module name in
that case, since otherwise we don't have it anywhere.  Maybe that isn't
important if they only have one module, but I could imagine an app that
might load one module or another one and you would have no easy way of
knowing which one you were seeing.

http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode119
Line 119: if (firstModule  != null) {
On 2009/08/20 02:37:12, Ray Ryan wrote:
 never true

Good catch, should be == null.

http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode211
Line 211: private static final class SessionModule {
On 2009/08/20 02:37:12, Ray Ryan wrote:
 ditto on breaking this out and putting a unit test around it

Ok, though the only thing interesting about it is keeping an instance
cache to ensure identity -- otherwise it is just an immutable data
object so that the map can have multiple keys.

http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode313
Line 313: private JComboBox sessionDropdown;
On 2009/08/20 02:37:12, Ray Ryan wrote:
 private JLabel singleSessionLabel;
 private JPanel sessionPanel;

For showing a label for a single session?

Is it really that much better than just having a dropdown with only one
thing in it?  Without duplicating a lot of work, then how will it show
when it is disconnected or active, since we planned on doing that with
the JComboBox renderer?

http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode453
Line 453: for (Session session : sessions.values()) {
On 2009/08/20 02:37:12, Ray Ryan wrote:
 You're listing dead sessions too, which is just noise. But the point
is moot if
 you change the scope of the close button to sessions instead of tabs.

 When you do that, remember to put the close button in the same row as
the Expand
 All / Collapse All buttons, to make it clear it's subordinate to the
 session+module

That gets more complicated, since those are in a SwingLoggerPanel -- I
would have to expose the internals of how that is laid out, or move the
close functionality into that class (which seems wrong since we don't
want to be able to close non-module tabs).

http://gwt-code-reviews.appspot.com/59801/diff/2001/2010
File dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java (right):

http://gwt-code-reviews.appspot.com/59801/diff/2001/2010#newcode165
Line 165: assert remoteHost != null;
On 2009/08/20 02:37:12, Ray Ryan wrote:
 I know we use asserts in client code, but it's not a great idea to use
them in
 JRE code. Do you know when we enable them and when we don't? Will that
 accidentally change tomorrow?

 Someday we'll get our act together and be able to use

http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/base/Preconditions.html
 for this kind of thing. Until then, please just throw
IllegalArgumentExceptions:


 if (userAgent == null) {
throw new IllegalArgumentException(userAgent cannot be null);
 }
 if (remoteHost == null) {
throw new IllegalArgumentException(remoteHost cannot be null);
 }

Do we want to pay that runtime cost all the time?  In general our
philosophy has been not to do so, so I didn't.  Here, there are only
going to be a handful of these objects so it is pretty much irrelevant.

http://gwt-code-reviews.appspot.com/59801/diff/2001/2010#newcode169
Line 169: // TODO(jat): is it correct to strip off the query part?
On 2009/08/20 02:37:12, Ray Ryan wrote:
 Is there any reason you're building this by hand in a stringbuffer
rather than
 using a URI or URL?

I need only part of the URL and I didn't see an easy way to do it.  I
could create a copy and set just the pieces I want, but that seemed
overkill.

Also, I would still have to convert to a string since the case where the
supplied URL is malformed means I need to just use the supplied URL,
which necessarily can't be 

[gwt-contrib] Re: Change the way modules are mapped to tabs in the Swing UI

2009-08-19 Thread Ray Ryan
On Wed, Aug 19, 2009 at 8:29 PM, j...@google.com wrote:

 Thanks for the review.


 http://gwt-code-reviews.appspot.com/59801/diff/2001/2011
 File dev/oophm/src/com/google/gwt/dev/ModuleTabPanel.java (right):

 http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode89
 Line 89: public synchronized void addModule(String moduleName,
 On 2009/08/20 02:37:12, Ray Ryan wrote:

 Who's calling this that it needs to be synchronized? I only see it

 being reached

 from ModulePanel's constructor--how's that getting on multiple

 threads?

  Likewise on the various other synchronized methods on this class. They

 seem like

 a bad sign.


 Two modules could be created at the same time, and the socket listener
 thread forks them into their own threads.


So you're calling into the UI objects from other threads? Spooky. I suppose
if it's working it's working...



 http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode113
 Line 113: // TODO(jat): don't show dropdown when only one module
 On 2009/08/20 02:37:12, Ray Ryan wrote:

 boolean showIt = modules.size()  1;
 moduleDropdown.setVisible(showIt);
 moduleDropdown.setEnabled(showIt);


  And don't bother building it if !showIt, for that matter


  Actually, I suppose you'd put the dropdown and its label in a panel,

 and set

 visibility on that. Same idea.


 Ok. I was thinking we needed to show a label with the module name in
 that case, since otherwise we don't have it anywhere.  Maybe that isn't
 important if they only have one module, but I could imagine an app that
 might load one module or another one and you would have no easy way of
 knowing which one you were seeing.


Could do the same label trick as for the session popup. Hey presto, you have
a new widget.



 http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode119
 Line 119: if (firstModule  != null) {
 On 2009/08/20 02:37:12, Ray Ryan wrote:

 never true


 Good catch, should be == null.

 http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode211
 Line 211: private static final class SessionModule {
 On 2009/08/20 02:37:12, Ray Ryan wrote:

 ditto on breaking this out and putting a unit test around it


 Ok, though the only thing interesting about it is keeping an instance
 cache to ensure identity -- otherwise it is just an immutable data
 object so that the map can have multiple keys.

 http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode313
 Line 313: private JComboBox sessionDropdown;
 On 2009/08/20 02:37:12, Ray Ryan wrote:

 private JLabel singleSessionLabel;
 private JPanel sessionPanel;


 For showing a label for a single session?

 Is it really that much better than just having a dropdown with only one
 thing in it?


Single entry dropdowns are sloppy and distracting.


 Without duplicating a lot of work, then how will it show
 when it is disconnected or active, since we planned on doing that with
 the JComboBox renderer?


The whole page will be pink if it's disconnected. I think they'll figure it
out.



 http://gwt-code-reviews.appspot.com/59801/diff/2001/2011#newcode453
 Line 453: for (Session session : sessions.values()) {
 On 2009/08/20 02:37:12, Ray Ryan wrote:

 You're listing dead sessions too, which is just noise. But the point

 is moot if

 you change the scope of the close button to sessions instead of tabs.


  When you do that, remember to put the close button in the same row as

 the Expand

 All / Collapse All buttons, to make it clear it's subordinate to the
 session+module


 That gets more complicated, since those are in a SwingLoggerPanel -- I
 would have to expose the internals of how that is laid out, or move the
 close functionality into that class (which seems wrong since we don't
 want to be able to close non-module tabs).


You can make the SLP accept an onClose callback, and show the close button
iff one has been provided.



 http://gwt-code-reviews.appspot.com/59801/diff/2001/2010
 File dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java (right):

 http://gwt-code-reviews.appspot.com/59801/diff/2001/2010#newcode165
 Line 165: assert remoteHost != null;
 On 2009/08/20 02:37:12, Ray Ryan wrote:

 I know we use asserts in client code, but it's not a great idea to use

 them in

 JRE code. Do you know when we enable them and when we don't? Will that
 accidentally change tomorrow?


  Someday we'll get our act together and be able to use



 http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/base/Preconditions.html

 for this kind of thing. Until then, please just throw

 IllegalArgumentExceptions:


  if (userAgent == null) {
   throw new IllegalArgumentException(userAgent cannot be null);
 }
 if (remoteHost == null) {
   throw new IllegalArgumentException(remoteHost cannot be null);
 }


 Do we want to pay that runtime cost all the time?  In general our
 philosophy has been not to do so, so I didn't.  Here, there are only
 going to be a handful of these objects so it is pretty much 

[gwt-contrib] Re: Xerces bundled with GWT r5922+ is causing problems with GAE

2009-08-19 Thread Aaron Steele

Success!

Thanks all around,
Aaron

On Wed, Aug 19, 2009 at 5:48 PM, Amit Manjhiamitman...@google.com wrote:
 Hi Aaron,
 We are aware of this issue. I will commit a fix as soon our build becomes
 green again.
 Btw, here is the patch: http://gwt-code-reviews.appspot.com/61807
 Additionally, you need xercesImp-NoMetaInf.jar, which I have attached (place
 it in GWT_TOOLS/lib/xerces/xercs_2-9-1) Let me know if something still
 breaks.
 Regards,
 Amit


 On Wed, Aug 19, 2009 at 1:58 PM, Aaron Steele eightyste...@gmail.com
 wrote:

 On Mac OS X running Eclipse 3.5 with the latest Google Plugin, if you
 create and run a new web application that's configured with GWT trunk
 r5922+, it fails with the following 'SAXParserFactoryImpl not found'
 error (since Xerces is now bundled with gwt-dev-*.jar):

 http://utilitybase.com/paste/16789

 During GAE office hours this morning on IRC, it sounded like an
 internal CL exists for this issue and that it should get committed
 RSN. I didn't see an external thread for this issue. The temporary
 workaround is just SVN updating to r5921.

 Thanks!
 Aaron




 




-- 

Sent from Piedmont, CA, United States

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: UiBinder and Model View Presenter

2009-08-19 Thread brett.wooldridge

Amir,

After your post, I have been investigating PureMVC a bit.  Since you
used it, I have a question.  In PureMVC, in the typical
ApplicationFacade class there is an initializeController() override
which registers all the commands.  How does this fit with code-
splitting?  Currently our application is not PureMVC, and we highly
leverage the new code-splitting features of GWT.  Do you leverage code-
splitting?  If so, did you just register all the commands up front,
but then in the execute() of the commands use runAsync() to allow
splitting?  Where are the best points to apply runAsync() in the
PureMVC architecture?

Also, while I have your attention, how did you (or did you) fit
browser history into the PureMVC model?  Did some sort of history
management class receive notifications from the framework and manage
history that way?  Did that class post notifications into the PureMVC
framework in response to back/forward navigation?

Thanks.

On Aug 14, 6:36 am, Amir Kashani amirkash...@gmail.com wrote:
 For my last work project, we used Kiyaa!, a GWT library that offers its own
 declarative UI system (and data-binding). In addition, we used PureMVC as a
 very lightweight MVC-framework. If you're familiar with PureMVC, you'll know
 that it's much closer to MVP, as described by Ray Ryan, than it is a
 traditional MVC framework. They worked beautifully together. Here's our
 basic setup:

    - *Views *- these are the plain UI components represented with Kyiaa!
    templates. They're smart enough to display Model data and handle any UI
    interactions, but delegate all business logic to their Mediators. They have
    a Listener interface that is implemented by the Mediator, which has
    high-level callback methods, such as onRegister, onNewCustomer, etc 
 rather
    than onClick.
    - *Mediator *- responsible for managing the views by facilitating
    communication between the View and the rest of the system. They send and
    receive Notifications that are handled by other Mediators or by Commands.
    More specifically, they provide model data to the View as it's available 
 and
    handle user-triggered events from the view, etc. The mediators have NO
    references to any Widgets or other UI components. Their only interaction
    with the View is from callbacks through the defined interface and through
    the View's public API, which is generally fairly-high level as well. 
 Because
    of this, it's easy to re-use UI components by having a different Mediator
    controlling the UI.

    - *Model* - these are your basic domain objects. They should be POJOs and
    have no concept of the rest of the system. Period.
    - *Proxy* - a Proxy's basic role is to provide a high-level API for
    managing the Model. Depending on the complexity of your domain object, it
    could be as simple as having methods such as addUser, deleteUser, etc. Or,
    for complex Models, such as a Word Document object, can have methods such 
 as
    setTitle(), etc.

 In our setup, Proxys take the former role, basically encapsulating all RPC
 logic, implementing client-side caching, etc. You call methods on a Proxy,
 such as saveUser, and it sends Notifications to the rest of the system when
 something interesting happens. Proxy's NEVER receive notifications, however.
 They are not interested in the rest of the system, including the UI (or even
 that there is a UI), and theoretically, along with the models, should
 function completely on their own, making them highly reusable.

    - *Command* - a Command is a place where you encode complex interactions.
    For example, if your application has a search function, you may have a
    SearchCommand that
       1. Receives the search query
       2. Calls the appropriate Proxy to do the RPC hit
       3. Loads the Mediator that will be interested in the Proxy's response,
       if not already loaded

 The SearchCommand would be triggered by a notification sent from some
 Mediator. The idea is to stick the logic into a re-usable Command rather
 than encoding it into a Mediator directly, as it may be needed from multiple
 places.

 The great part about this design and MVP is, that if we want to switch to
 UIBinder, all we have to do is modify the View classes. No other part of the
 system would have to change one-bit.

 Another quick note on PureMVC: it's kind of a disservice to it to call it an
 MVC framework, as there's very little code involved in the framework.
 Rather, it's a set of concepts and principles that have been very well
 defined, that if followed correctly, lead to highly-reusable and easily
 testable components. Even if you don't use the framework, I highly recommend
 reading their best 
 practices:http://puremvc.org/component/option,com_wrapper/Itemid,174/

 - Amir

 On Thu, Aug 13, 2009 at 2:27 AM, Andrés Testi andres.a.te...@gmail.comwrote:





  How the UiBinder fits in the MVP architecture proposed at the google I/
  O talks? 

[gwt-contrib] Re: UIBinder and the new Layout system

2009-08-19 Thread brett.wooldridge

Joel,

Will be happy to test new layouts and review API.  Unfortunately, I
don't use Dock, Stack, or Split in my app.  I do use Absolute.  And
because of an interior scrolling area that fills the client, a
sprinkling of resize code (after beating my head against CSS for a few
days).  I do use FormPanel and FlexTable, but I would expect both of
those to be minimally affected or not affected by your layout as they
are somewhat micro-level layouts not needing resize/reflow
behaviors.

-Brett

On Aug 18, 12:32 am, Joel Webber j...@google.com wrote:
 The situation as I see it is this. The old layout system has two huge
 problems:1. Some widgets (e.g., StackPanel) *cannot* be made to work as
 expected in standards mode, because of changes to table rendering behavior.
 2. It's not really a system, in the sense that it can be highly
 unpredictable.

 I am quite convinced it is impossible to fix these issues in any fundamental
 way, without taking an entirely different approach. See the design doc 
 (http://code.google.com/p/google-web-toolkit/wiki/LayoutDesign) for my
 justification of this particular approach. In particular, I think it's worth
 noting that while Google Wave uses different actual code (they wrote their
 implementation before I did, but they didn't have to support IE6, which
 drastically simplified the problem), it's philosophically the same thing.
 This works quite well for them.

 As for reimplementing widgets like StackPanel, I mention in the design-doc
 that several such widgets will need to be replaced, and I'm working on that
 right now. The APIs won't be identical, because they need a bit more
 explicit size information in some cases, but I don't believe it will be too
 much trouble (I'm rewriting some of the samples to be sure). I'm hoping to
 have initial implementations of Dock, Stack, and Split widgets checked in
 over the next couple of days. If you could try using them and give me API
 and behavior feedback, that would be really helpful.

 Thanks,
 joel.

 On Sat, Aug 15, 2009 at 2:13 PM, brett.wooldridge 



 brett.wooldri...@gmail.com wrote:

  Cool.  Then another question about the future of the new layout
  system.  Is the current thinking that eventually it *will* replace all
  of the older panels?  I mean, is there buy-in at Google that that is a
  desired track for this project.  Or will the new layout system remain
  parallel to the original?  Also, is it possible to re-write StackPanel
  etc. to be compatible with the new system so that people have a
  migration?  I don't personally care about migration, because I'm
  starting nearly from scratch, but I don't want to adopt a side-car
  layout system that doesn't have a track into the mainline of GWT.

  Thanks for your answers and your efforts.  If there is anything I can
  do to help, let me know, I will be glad to pitch in a hand with some
  layouts or UIBinder parsers etc. if you are willing to give direction.

  Brett

  On Aug 15, 12:44 am, Joel Webber j...@google.com wrote:
   Brett,
   I am going to be writing adding custom parsers for the new layout panels
   sometime soon. And the new layout system will be de facto in the sense
   that I'm updating all the samples to use it (and possibly adding another
   sample). We obviously won't be removing the old widgets (e.g.,
  StackPanel)
   that won't play nice in standards mode until a later release, so we don't
   break anyone's existing projects.

   Cheers,
   joel.

   On Fri, Aug 14, 2009 at 11:17 AM, brett.wooldridge 

   brett.wooldri...@gmail.com wrote:

I have been tracking the process of the UIBinder and the new pure CSS-
based layout system being driven by Joel at google.  I assume these
two will play nicely together in 2.0?  Or will custom parsers be
needed to use UIBinder with the new layout system?  Sounds like the
UIBinder parsers API won't be ready for public consumption in the
first release.

Lastly, will the new layout system be the *defacto* layout system in
2.0?  Please say yes.
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---