[gwt-contrib] Code review: update 1.6 branch-info.txt

2009-01-22 Thread rjrjr

Reviewers: jgw,

Description:
Updates 1.6 branch-info.txt to reflect today's merge
(490:4497,4498:4511). () to be updated when merge lands.

Note that --accept=postpone has been dropped. svn says there is no such
thing.

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

Affected files:
   branch-info.txt


Index: branch-info.txt
===
--- branch-info.txt (revision 4511)
+++ branch-info.txt (working copy)
@@ -26,6 +26,7 @@
  /releases/1.6/@r4385:4459 was merged (r4488) into trunk
  /releases/1.6/@r4359:4490 was merged (r4491) into trunk
  /releases/1.6/@c4498 was merged (r4499) into trunk
+/releases/1.6/@r4490:4497,4498:4511 was merged () into trunk, skipping  
c4498 (cherry picked above)

  The next merge into trunk will be:
-svn merge --accept=postpone -r4490:4498,4499:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .
+svn merge -r4511:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .



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



[gwt-contrib] Re: GWT 1.5.3: Type mismatch with enum in parameterized class.

2009-01-22 Thread Isaac Truett

And if I'd been silly enough to bet against you, Scott, then I
would've lost. For posterity:

1. SVN r4361 contains the updated JDT. I copied that to my 1.5 release branch.
2. SVN r4362 contains a small code change to LongFromJSNIChecker.java.
I applied that to my 1.5 branch.
3. SVN r4362 also contains the change to dev/core/build.xml to use the
new jar. Applied that.
4. Build and enjoy.

Thank you very much, Scott. This duct tape should hold until I can
upgrade to 1.6.

@Bruce - I'm eagerly waiting the turning of that corner!


Love the toolkit. Love the fast, friendly, free support. Thank you all!

- Isaac


On Wed, Jan 21, 2009 at 6:55 PM, Scott Blum sco...@google.com wrote:
 Isaac, I would put money on our updating to a newer version of JDT.  I'd
 find where Lex committed this upgrade... if there are no code changes, you
 might try putting the newer JDT higher on the classpath as a test.  If that
 works, simple jar surgery should get you where you want to go.

 On Wed, Jan 21, 2009 at 10:54 AM, Isaac Truett itru...@gmail.com wrote:

 I've found an interesting error in GWT 1.5.3:

  [ERROR] Line 14: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
  [ERROR] Line 17: Type mismatch: cannot convert from
 Test.Parametric.Number
 s to Test.ParametricT.Numbers
 Compiling module test.Test
 Computing all possible rebind results for 'test.client.Test'
   Rebinding test.client.Test
  Checking rule generate-with
 class='com.google.gwt.user.rebind.ui.ImageBun
 dleGenerator'/
 [ERROR] Unable to find type 'test.client.Test'
[ERROR] Hint: Previous compiler errors may have made this type
 unava
 ilable
[ERROR] Hint: Check the inheritance chain from your module; it
 may n
 ot be inheriting a required module or a module may not be adding its
 source path
  entries properly


 To reproduce:

 public class Test implements EntryPoint {
  static class ParametricT {
enum Numbers {
  ONE, TWO;
}
  }

  public void onModuleLoad() {
switch (Parametric.Numbers.valueOf(ONE)) {
  case ONE: // Line 14
System.out.println(ONE);
break;
  case TWO: // Line 17
System.out.println(ONE);
break;
}
  }
 }

 Removing the parameter from the type enclosing the enum fixes the problem.

 The above *works* in trunk and 1.6, but I searched a little bit and I
 couldn't find anything in the issue tracker that appeared related.
 Upgrading to 1.6/trunk isn't a good option for me at the moment, so
 I'm hoping that someone has seen this before and could help me find
 the change that fixed it. If it's a simple patch, I can apply it to
 1.5.3 until such time as an upgrade is possible. Moving the enum to a
 non-parameterized type would probably work as well, but I'm loathe to
 do too much redesign on account of a compiler bug that appears to
 already have been fixed.




 


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



[gwt-contrib] [google-web-toolkit commit] r4513 - releases/1.6

2009-01-22 Thread codesite-noreply

Author: rj...@google.com
Date: Thu Jan 22 08:34:50 2009
New Revision: 4513

Modified:
releases/1.6/branch-info.txt

Log:
Updates 1.6 branch-info.txt to reflect today's merge (490:4497,4498:4511).

Note that --accept=postpone has been dropped. svn says there is no such  
thing.

LGTM from jgw via chat



Modified: releases/1.6/branch-info.txt
==
--- releases/1.6/branch-info.txt(original)
+++ releases/1.6/branch-info.txtThu Jan 22 08:34:50 2009
@@ -26,6 +26,7 @@
  /releases/1.6/@r4385:4459 was merged (r4488) into trunk
  /releases/1.6/@r4359:4490 was merged (r4491) into trunk
  /releases/1.6/@c4498 was merged (r4499) into trunk
+/releases/1.6/@r4490:4497,4498:4511 was merged (r4512) into trunk,  
skipping c4498 (cherry picked above)

  The next merge into trunk will be:
-svn merge --accept=postpone -r4490:4498,4499:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .
+svn merge -r4511:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .

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



[gwt-contrib] Browser-agnostic RequestBuilder available in Core?

2009-01-22 Thread Lex Spoon

I'd like runAsync to use XHR for the iframe linker, so that GWT
applications can get timely notification if an async code download
fails for any reason.

I've outlined all the code changes, but there is a remaining question
about how the runAsync support should access XHR.  Ten minutes of
reading through RequestBuilder and related classes is very convincing
that that's the code to use.  It's a classic case where different
browsers do a variety of weird and quirky things, and there are
solutions to all the known quirks already implemented in those
classes.

The problem is that GWT.runAsync is in Core, RequestBuilder requires
UserAgent, and Core is not supposed to require UserAgent.

To solve this problem, how about we make a generic RequestBuilder that
can be used in Core, and then add deferred bindings for the common
case that UserAgent is included?  It would be analogous to what we do
for StringBuffer.

After looking at the implementation, I believe the only thing
sensitive to the user agent is the method doCreateXmlHTTPRequest().
The rest of the code is shared.  If that's the case, wouldn't it be
possible to define a generic doCreateXmlHTTPRequest that handles all
browsers?  It would look like the current IE implementation except
with an additional catch block:


  @Override
  protected native JavaScriptObject doCreateXmlHTTPRequest() /*-{
if ($wnd.XMLHttpRequest) {
  return new XMLHttpRequest();
} else {
  try {
return new ActiveXObject('MSXML2.XMLHTTP.3.0');
  } catch (e) {
try {
  return new ActiveXObject(Microsoft.XMLHTTP);
} catch (e) {
  // new catch block
  return new XMLHttpRequest();
}
  }
}
  }-*/;


Assuming the above implementation is reliable, HTTPRequestImpl could
use it as the implementation in the base class.  We could add a new
class HTTPRequestImplNonIE6 that has the simple return new
XMLHttpRequest that works on all non-IE browsers.

The modules would be changed as follows:

  Core would inherit HTTP, and thus get a functioning but suboptimal
RequestBuilder

  HTTPRequest would change its default binding of HTTPRequestImpl to
HTTPRequestImplNonIE6



Before I experiment further, does anyone spot anything to worry about?


Lex

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



[gwt-contrib] Re: Browser-agnostic RequestBuilder available in Core?

2009-01-22 Thread Scott Blum
SGTM.

On Thu, Jan 22, 2009 at 12:14 PM, Lex Spoon sp...@google.com wrote:


 I'd like runAsync to use XHR for the iframe linker, so that GWT
 applications can get timely notification if an async code download
 fails for any reason.

 I've outlined all the code changes, but there is a remaining question
 about how the runAsync support should access XHR.  Ten minutes of
 reading through RequestBuilder and related classes is very convincing
 that that's the code to use.  It's a classic case where different
 browsers do a variety of weird and quirky things, and there are
 solutions to all the known quirks already implemented in those
 classes.

 The problem is that GWT.runAsync is in Core, RequestBuilder requires
 UserAgent, and Core is not supposed to require UserAgent.

 To solve this problem, how about we make a generic RequestBuilder that
 can be used in Core, and then add deferred bindings for the common
 case that UserAgent is included?  It would be analogous to what we do
 for StringBuffer.

 After looking at the implementation, I believe the only thing
 sensitive to the user agent is the method doCreateXmlHTTPRequest().
 The rest of the code is shared.  If that's the case, wouldn't it be
 possible to define a generic doCreateXmlHTTPRequest that handles all
 browsers?  It would look like the current IE implementation except
 with an additional catch block:


  @Override
  protected native JavaScriptObject doCreateXmlHTTPRequest() /*-{
if ($wnd.XMLHttpRequest) {
  return new XMLHttpRequest();
} else {
  try {
return new ActiveXObject('MSXML2.XMLHTTP.3.0');
  } catch (e) {
try {
  return new ActiveXObject(Microsoft.XMLHTTP);
} catch (e) {
  // new catch block
  return new XMLHttpRequest();
}
  }
}
  }-*/;


 Assuming the above implementation is reliable, HTTPRequestImpl could
 use it as the implementation in the base class.  We could add a new
 class HTTPRequestImplNonIE6 that has the simple return new
 XMLHttpRequest that works on all non-IE browsers.

 The modules would be changed as follows:

  Core would inherit HTTP, and thus get a functioning but suboptimal
 RequestBuilder

  HTTPRequest would change its default binding of HTTPRequestImpl to
 HTTPRequestImplNonIE6



 Before I experiment further, does anyone spot anything to worry about?


 Lex

 


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



[gwt-contrib] Re: [google-web-toolkit commit] r4513 - releases/1.6

2009-01-22 Thread John Tamplin
On Thu, Jan 22, 2009 at 12:17 PM, Scott Blum sco...@google.com wrote:

 What version of svn are you using?  I'm using 1.5.x, and that flag for me
 means the merge will definitely finish, albeit with conflicts, rather than
 prompting you for every conflict encountered (which hangs the merge waiting
 for you input).


That is the default behavior for older versions of svn.

-- 
John A. Tamplin
Software Engineer (GWT), Google

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



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

2009-01-22 Thread codesite-noreply

Comment by srdrucker:

A qualified.ModuleName/ directory for GWT artifacts sounds great.  However,  
I don't see a need to call the nocache file  
qualified.ModuleName.nocache.js, it could just be nocache.js.  Then, in  
MyProject.html, you could just have src=qualified.ModuleName/nocache.js  
for javascript loading.  For example,  
src=com.google.gwt.sample.Hello/nocache.js.


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

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



[gwt-contrib] Proposal: Lightweight GWT-RPC implementation for OpenSocial and Gadgets

2009-01-22 Thread Alex Epshteyn

Background:

OpenSocial containers provide the method gadget.io.makeRequest because
gadget scripts aren't able to use XHR due to the SOP.  Furthermore, I
believe, OpenSocial containers don't expose the _IG_GetCachedUrl(url)
method that the gwt-gadgets library uses.

Now, regarding the gwt-gadgets library, to be blunt, it simply scares
me.  I don't want all the gadget stuff brought into the Java
programming language with interfaces and annotations.  Having the
bootsrap and gadget.xml generated with a custom linker is scary and
unnecessary.  This is just asking for trouble with a leaky
abstraction.

The RPC Problem:

It's very easy to write a Google Gadget with GWT without using the gwt-
gadgets library.  Simply write your gadget.xml by hand (there's not
much to it, really), write your GWT app the traditional way, compile
it with the XS linker, and write a script tag referencing
your .nocache.js script in your gadget.xml.  You can call all the
OpenSocial and Gadgets API methods from your GWT code using JSNI (JSO
overlay types could simplify things a bit).

The only problem is RPC.  Currently using GWT-RPC in an OpenSocial
container seems impossible.   You'd have to write a JSON service.

The Proposed Solution:

This is just a rough sketch, but I think this can be accomplished as
follows:

1) Subclass RequestBuilder to use gadgets.io.makeRequest

2) Subclass RemoteServiceProxy and override the protected method
doPrepareRequestBuilder to return an instance of your custom
RequestBuilder subclass.

3) Modify ProxyCreator to allow setting a custom superclass for the
generated proxy class.  I.e. allow chaning this line:
composerFactory.setSuperclass(RemoteServiceProxy.class.getSimpleName
());

(Perhaps with a system property defining the class name for starters).
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Proposal: Lightweight GWT-RPC implementation for OpenSocial and Gadgets

2009-01-22 Thread Alex Epshteyn
Success - I got this to work!  Now running GWT-RPC through
OpenSocial's gadget.io.makeRequest!

Only two lines of code had to be changed in GWT to make the RPC system
pluggable.  Here is a patch against trunk.  Could someone review and
approve?

The other half consists of custom RequestBuilder and
RemoteServiceProxy subclasses.  I will continue testing and polishing
those and will share them later.

Alex






On Thu, Jan 22, 2009 at 5:17 PM, Alex Epshteyn
alexander.epsht...@gmail.com wrote:
 Yes, the option to extend RPC and gadgets are two separate ideas.

 Code generation is one of the core features of GWT, and nothing new is being
 added to the Java programming language, as the syntax is part of the Java
 language.

 The reason GWT works is because HTML and Javascript evolve very
 slowly.  A tight Java binding to a fast-changing Javascript API like
 Gadgets or OpenSocial is asking for trouble because you won't be able
 to keep updating the Java code fast enough.

 Alex


 On Thu, Jan 22, 2009 at 5:08 PM, Ray Cromwell cromwell...@gmail.com wrote:

 I think there are two issues. One is providing hooks to allow the RPC call
 to be dispatched via a customized mechanism. This can range from
 makeRequest() with POST, to cross-domain JSONP, to ProtocolBuffer
 RpcChannel. I've brought up this issue time and time again, as I've been an
 early adopter of writing complex GWT apps inside of Gadgets. I think it
 would be useful to revisit the RPC design in the future to make it easier to
 plugin custom methods, not just for Gadgets/makeRequest, but also for stuff
 like JSON wireformats and ProtocolBuffers.
 The issue of the GadgetLinker manifest generation is separate. I happen to
 like the concept, but dislike the current implementation. I like the
 auto-generation of the manifest, the type safety of dependency-injected
 interfaces. However, the current system is too inflexible. It doesn't
 support multiple Gadget views, it doesn't support optional feature
 requirements. That is, if you require an optional feature in the manifest,
 the feature interfaces will still get injected even if they weren't loaded.
 Simply put, I don't find using annotations, generators, and linkers scary.
 Code generation is one of the core features of GWT, and nothing new is being
 added to the Java programming language, as the syntax is part of the Java
 language.
 On a wider now, realistically, GALGWT needs official bindings for non-legacy
 Gadgets and OpenSocial. I've implemented JSOs for most of those privately as
 Gadget features, but it would be nice to have an officially sanctioned
 Google binding.

 -Ray

 On Thu, Jan 22, 2009 at 1:13 PM, Alex Epshteyn
 alexander.epsht...@gmail.com wrote:

 Background:

 OpenSocial containers provide the method gadget.io.makeRequest because
 gadget scripts aren't able to use XHR due to the SOP.  Furthermore, I
 believe, OpenSocial containers don't expose the _IG_GetCachedUrl(url)
 method that the gwt-gadgets library uses.

 Now, regarding the gwt-gadgets library, to be blunt, it simply scares
 me.  I don't want all the gadget stuff brought into the Java
 programming language with interfaces and annotations.  Having the
 bootsrap and gadget.xml generated with a custom linker is scary and
 unnecessary.  This is just asking for trouble with a leaky
 abstraction.

 The RPC Problem:

 It's very easy to write a Google Gadget with GWT without using the gwt-
 gadgets library.  Simply write your gadget.xml by hand (there's not
 much to it, really), write your GWT app the traditional way, compile
 it with the XS linker, and write a script tag referencing
 your .nocache.js script in your gadget.xml.  You can call all the
 OpenSocial and Gadgets API methods from your GWT code using JSNI (JSO
 overlay types could simplify things a bit).

 The only problem is RPC.  Currently using GWT-RPC in an OpenSocial
 container seems impossible.   You'd have to write a JSON service.

 The Proposed Solution:

 This is just a rough sketch, but I think this can be accomplished as
 follows:

 1) Subclass RequestBuilder to use gadgets.io.makeRequest

 2) Subclass RemoteServiceProxy and override the protected method
 doPrepareRequestBuilder to return an instance of your custom
 RequestBuilder subclass.

 3) Modify ProxyCreator to allow setting a custom superclass for the
 generated proxy class.  I.e. allow chaning this line:
 composerFactory.setSuperclass(RemoteServiceProxy.class.getSimpleName
 ());

 (Perhaps with a system property defining the class name for starters).



 



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



rpc_hooks.patch
Description: Binary data


[gwt-contrib] Re: Proposal: Lightweight GWT-RPC implementation for OpenSocial and Gadgets

2009-01-22 Thread Ray Cromwell
I don't quite understand this point. Any JSO you create is going to be
tightly bound to the underlying Gadget/OpenSocial APIs, so what's the
difference between a JSO binding which is isn't dependency injected, vs one
that is, with regard to keeping up with API changes?  Are you arguing
against using GWT JSOs to call OpenSocial APIs, or just trying to argue
against GadgetLinker injecting the reference for you? There seems to be
little difference between writing a native method to get the initial
reference to an Overlay type, or having it injected for you, with respect to
fast evolving specs. All the GadgetLinker does is construct an instance of
a type that you tell it and it wouldn't be hard to modify it so inject JSO
Overlays.
To me, the only issue that controls whether or not you can keep in sink is
whether you have access to the mapping source. And even then, that isn't the
biggest issue with OpenSocial programming. The actual specs
0.6/0.7/0.8/0.81/0.9 etc aren't changing that fast, in fact, I wish they'd
change faster.

The real problem with OpenSocial programming, which hits Java programmers
just as hard as JavaScript programmers, is poor container implementations,
and the fact that the spec is designed in a way that virtually everything is
optional to implement. Quick, which containers support notifications,
requestShareApp, or activities? Which support OAuth?

IMHO, a generator which could parse idiomatic JsDoc/Javascript ala Bob's JS
Interop, and with some extra annotations, automatically generate JSO
bindings, would actually be superior to writing JSOs by hand to keep them in
sink, or even programming Javascript by hand. Why? Because everytime the
spec is updated, if there was a mismatch, you could detect errors.

However, none of that really matters much, since unless you decide to target
a single OS container, probably 90% of the work is workarounds of
unsupported or broken features.

-Ray

On Thu, Jan 22, 2009 at 2:17 PM, Alex Epshteyn alexander.epsht...@gmail.com
 wrote:


 The reason GWT works is because HTML and Javascript evolve very
 slowly.  A tight Java binding to a fast-changing Javascript API like
 Gadgets or OpenSocial is asking for trouble because you won't be able
 to keep updating the Java code fast enough.

 Alex


 On Thu, Jan 22, 2009 at 5:08 PM, Ray Cromwell cromwell...@gmail.com
 wrote:
 
  I think there are two issues. One is providing hooks to allow the RPC
 call
  to be dispatched via a customized mechanism. This can range from
  makeRequest() with POST, to cross-domain JSONP, to ProtocolBuffer
  RpcChannel. I've brought up this issue time and time again, as I've been
 an
  early adopter of writing complex GWT apps inside of Gadgets. I think it
  would be useful to revisit the RPC design in the future to make it easier
 to
  plugin custom methods, not just for Gadgets/makeRequest, but also for
 stuff
  like JSON wireformats and ProtocolBuffers.
  The issue of the GadgetLinker manifest generation is separate. I happen
 to
  like the concept, but dislike the current implementation. I like the
  auto-generation of the manifest, the type safety of dependency-injected
  interfaces. However, the current system is too inflexible. It doesn't
  support multiple Gadget views, it doesn't support optional feature
  requirements. That is, if you require an optional feature in the
 manifest,
  the feature interfaces will still get injected even if they weren't
 loaded.
  Simply put, I don't find using annotations, generators, and linkers
 scary.
  Code generation is one of the core features of GWT, and nothing new is
 being
  added to the Java programming language, as the syntax is part of the Java
  language.
  On a wider now, realistically, GALGWT needs official bindings for
 non-legacy
  Gadgets and OpenSocial. I've implemented JSOs for most of those privately
 as
  Gadget features, but it would be nice to have an officially sanctioned
  Google binding.
 
  -Ray
 
  On Thu, Jan 22, 2009 at 1:13 PM, Alex Epshteyn
  alexander.epsht...@gmail.com wrote:
 
  Background:
 
  OpenSocial containers provide the method gadget.io.makeRequest because
  gadget scripts aren't able to use XHR due to the SOP.  Furthermore, I
  believe, OpenSocial containers don't expose the _IG_GetCachedUrl(url)
  method that the gwt-gadgets library uses.
 
  Now, regarding the gwt-gadgets library, to be blunt, it simply scares
  me.  I don't want all the gadget stuff brought into the Java
  programming language with interfaces and annotations.  Having the
  bootsrap and gadget.xml generated with a custom linker is scary and
  unnecessary.  This is just asking for trouble with a leaky
  abstraction.
 
  The RPC Problem:
 
  It's very easy to write a Google Gadget with GWT without using the gwt-
  gadgets library.  Simply write your gadget.xml by hand (there's not
  much to it, really), write your GWT app the traditional way, compile
  it with the XS linker, and write a script tag referencing
  your .nocache.js 

[gwt-contrib] [google-web-toolkit commit] r4519 - in trunk/dev/core/src/com/google/gwt/dev: . shell/tomcat

2009-01-22 Thread codesite-noreply

Author: fabb...@google.com
Date: Thu Jan 22 18:04:36 2009
New Revision: 4519

Added:
trunk/dev/core/src/com/google/gwt/dev/ArgHandlerOutDirDeprecated.java
Modified:
trunk/dev/core/src/com/google/gwt/dev/Compiler.java
trunk/dev/core/src/com/google/gwt/dev/GWTShell.java
trunk/dev/core/src/com/google/gwt/dev/HostedMode.java
trunk/dev/core/src/com/google/gwt/dev/Link.java
 
trunk/dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java

Log:
patches for legacy option and property support... these things should go  
away soon, but we need to provide some grace period first.

TBR: jgw


Added: trunk/dev/core/src/com/google/gwt/dev/ArgHandlerOutDirDeprecated.java
==
--- (empty file)
+++ trunk/dev/core/src/com/google/gwt/dev/ArgHandlerOutDirDeprecated.java   
 
Thu Jan 22 18:04:36 2009
@@ -0,0 +1,35 @@
+/**
+ *
+ */
+package com.google.gwt.dev;
+
+import com.google.gwt.dev.util.arg.OptionOutDir;
+import com.google.gwt.util.tools.ArgHandlerOutDir;
+
+import java.io.File;
+
+/**
+ * Deprecated handler for -out options
+ */
+public class ArgHandlerOutDirDeprecated extends ArgHandlerOutDir {
+
+  OptionOutDir option;
+
+  public ArgHandlerOutDirDeprecated(OptionOutDir option) {
+this.option = option;
+  }
+
+  public String getPurpose() {
+return super.getPurpose() +  (deprecated);
+  }
+
+  public boolean isUndocumented() {
+return true;
+  }
+
+  @Override
+  public void setDir(File dir) {
+option.setOutDir(dir);
+  }
+
+}

Modified: trunk/dev/core/src/com/google/gwt/dev/Compiler.java
==
--- trunk/dev/core/src/com/google/gwt/dev/Compiler.java (original)
+++ trunk/dev/core/src/com/google/gwt/dev/Compiler.java Thu Jan 22 18:04:36  
2009
@@ -86,6 +86,11 @@
return localWorkers;
  }

+@Deprecated
+public File getOutDir() {
+  return linkOptions.getOutDir();
+}
+
  public File getWarDir() {
return linkOptions.getWarDir();
  }
@@ -98,6 +103,11 @@
this.localWorkers = localWorkers;
  }

+@Deprecated
+public void setOutDir(File outDir) {
+  linkOptions.setOutDir(outDir);
+}
+
  public void setWarDir(File outDir) {
linkOptions.setWarDir(outDir);
  }

Modified: trunk/dev/core/src/com/google/gwt/dev/GWTShell.java
==
--- trunk/dev/core/src/com/google/gwt/dev/GWTShell.java (original)
+++ trunk/dev/core/src/com/google/gwt/dev/GWTShell.java Thu Jan 22 18:04:36  
2009
@@ -136,6 +136,13 @@
   */
  GWTShell gwtShell = new GWTShell();
  ArgProcessor argProcessor = new ArgProcessor(gwtShell.options, false,  
false);
+
+// deprecated old property way to set outputs
+if (System.getProperty(com.google.gwt.shell.outdir) != null) {
+  gwtShell.options.setOutDir(new  
File(System.getProperty(com.google.gwt.shell.outdir)));
+  gwtShell.options.setWorkDir(new  
File(System.getProperty(com.google.gwt.shell.outdir)));
+}
+
  if (argProcessor.processArgs(args)) {
gwtShell.run();
// Exit w/ success code.

Modified: trunk/dev/core/src/com/google/gwt/dev/HostedMode.java
==
--- trunk/dev/core/src/com/google/gwt/dev/HostedMode.java   (original)
+++ trunk/dev/core/src/com/google/gwt/dev/HostedMode.java   Thu Jan 22  
18:04:36 2009
@@ -175,6 +175,7 @@
implements HostedModeOptions {
  private File extraDir;
  private int localWorkers;
+private File outDir;
  private ServletContainerLauncher scl;
  private File warDir;

@@ -186,6 +187,11 @@
return localWorkers;
  }

+@Deprecated
+public File getOutDir() {
+  return outDir;
+}
+
  public ServletContainerLauncher getServletContainerLauncher() {
return scl;
  }
@@ -208,6 +214,11 @@

  public void setLocalWorkers(int localWorkers) {
this.localWorkers = localWorkers;
+}
+
+@Deprecated
+public void setOutDir(File outDir) {
+  this.outDir = outDir;
  }

  public void setServletContainerLauncher(ServletContainerLauncher scl) {

Modified: trunk/dev/core/src/com/google/gwt/dev/Link.java
==
--- trunk/dev/core/src/com/google/gwt/dev/Link.java (original)
+++ trunk/dev/core/src/com/google/gwt/dev/Link.java Thu Jan 22 18:04:36 2009
@@ -54,7 +54,7 @@
 * Options for Link.
 */
public interface LinkOptions extends CompileTaskOptions, OptionExtraDir,
-  OptionWarDir {
+  OptionWarDir, OptionOutDir /*deprecated*/ {
}

static class ArgProcessor extends CompileArgProcessor {
@@ -62,6 +62,7 @@
super(options);
registerHandler(new ArgHandlerExtraDir(options));
registerHandler(new 

[gwt-contrib] UIObject.setStyleName(Element, String, boolean) visibility

2009-01-22 Thread adam

It occurs to me that the static methods UIObject.setVisible and
UIObject.setStyleName are akin to each other -- they're both static,
they both alter properties of an Element, and they're both called by
public instance methods in UIObject -- yet the former has public
visibility whereas the latter is protected. Why not give the latter
public visibility also?

I'm currently using GWT for a more traditional app (langolab.com)
and it would be useful to call this method for elements in the page
that aren't necessarily in a widget. With the current visibility level
my choices are either to duplicate the code or add a utility method to
a new class in com.google.gwt.user.client.ui.

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



[gwt-contrib] Re: Proposal: Lightweight GWT-RPC implementation for OpenSocial and Gadgets

2009-01-22 Thread Ray Cromwell
Agreed. I used a similar patch in my own implementation a few weeks ago,
although yours is simpler. One thing I'd suggest though is to get the
superclass setting either from a module property, or from something in the
type system, or runtime, rather than the environment.
e.g.

define-property name=gwt.rpc.proxySuperClass values=com.foo.Bar/
set-property name=gwt.rpc.proxySuperClass value=com.foo.Bar/

which is kind of an abuse of the property system, but allows compiling
different permutations of the app for different environments (e.g. gadget vs
non-gadget versions) There was some discussion awhile ago of adding new
kinds of properties which specify configuration.

@GwtProxySuperClass(com.foo.Bar)
public interface MyService extends RemoteService { ... }

which allows specifying the transport, but does not allow more than 1
transport at a time for the same type (without creating subinterfaces)

However you could easily do something like:

@GwtProxySuperClass(GadgetProxy)
public MyGadgetService extends MyService {...}

@GwtProxySuperClass(ProtoBufProxy)
public MyProtoBufService extends MyService {...}

Using environment properties doesn't seem GWT-like to me, since it kind of
buries flags deep inside implementation code that most users won't see and
moves it to build scripts. This is one of the things I always disliked about
Sun's use of -D parameters all over the JRE code, since finding out a
complete list of all these magic variables and exactly what they do is often
difficult. GWT's idiom is usually to embed build specific switches via
deferred binding properties.

-Ray


On Thu, Jan 22, 2009 at 8:27 PM, Alex Epshteyn alexander.epsht...@gmail.com
 wrote:


 Anyhow, let's get this thread back on track to being a discussion
 about allowing RPC over non-XHR proxy channels like
 gadgets.io.makeRequst.  You can use my RPC code with or without the
 gwt-gadgets library.

 I'd like to get this patch into trunk if no one objects.

 Alex




 On Thu, Jan 22, 2009 at 8:38 PM, Ray Cromwell cromwell...@gmail.com
 wrote:
 
  I don't quite understand this point. Any JSO you create is going to be
  tightly bound to the underlying Gadget/OpenSocial APIs, so what's the
  difference between a JSO binding which is isn't dependency injected, vs
 one
  that is, with regard to keeping up with API changes?  Are you arguing
  against using GWT JSOs to call OpenSocial APIs, or just trying to argue
  against GadgetLinker injecting the reference for you? There seems to be
  little difference between writing a native method to get the initial
  reference to an Overlay type, or having it injected for you, with respect
 to
  fast evolving specs. All the GadgetLinker does is construct an instance
 of
  a type that you tell it and it wouldn't be hard to modify it so inject
 JSO
  Overlays.
  To me, the only issue that controls whether or not you can keep in sink
 is
  whether you have access to the mapping source. And even then, that isn't
 the
  biggest issue with OpenSocial programming. The actual specs
  0.6/0.7/0.8/0.81/0.9 etc aren't changing that fast, in fact, I wish
 they'd
  change faster.
  The real problem with OpenSocial programming, which hits Java programmers
  just as hard as JavaScript programmers, is poor container
 implementations,
  and the fact that the spec is designed in a way that virtually everything
 is
  optional to implement. Quick, which containers support notifications,
  requestShareApp, or activities? Which support OAuth?
 
  IMHO, a generator which could parse idiomatic JsDoc/Javascript ala Bob's
 JS
  Interop, and with some extra annotations, automatically generate JSO
  bindings, would actually be superior to writing JSOs by hand to keep them
 in
  sink, or even programming Javascript by hand. Why? Because everytime the
  spec is updated, if there was a mismatch, you could detect errors.
  However, none of that really matters much, since unless you decide to
 target
  a single OS container, probably 90% of the work is workarounds of
  unsupported or broken features.
  -Ray
  On Thu, Jan 22, 2009 at 2:17 PM, Alex Epshteyn
  alexander.epsht...@gmail.com wrote:
 
  The reason GWT works is because HTML and Javascript evolve very
  slowly.  A tight Java binding to a fast-changing Javascript API like
  Gadgets or OpenSocial is asking for trouble because you won't be able
  to keep updating the Java code fast enough.
 
  Alex
 
 
  On Thu, Jan 22, 2009 at 5:08 PM, Ray Cromwell cromwell...@gmail.com
  wrote:
  
   I think there are two issues. One is providing hooks to allow the RPC
   call
   to be dispatched via a customized mechanism. This can range from
   makeRequest() with POST, to cross-domain JSONP, to ProtocolBuffer
   RpcChannel. I've brought up this issue time and time again, as I've
 been
   an
   early adopter of writing complex GWT apps inside of Gadgets. I think
 it
   would be useful to revisit the RPC design in the future to make it
   easier to
   plugin custom methods, not just for 

[gwt-contrib] Re: Proposal: Lightweight GWT-RPC implementation for OpenSocial and Gadgets

2009-01-22 Thread Alex Epshteyn

I agree that an environment variable isn't ideal, but could you
explain the annotations you listed?  Is that a proposed future way to
access module properties from inside a generator?
GeneratorContext.getPropertyOracle() is the way to get these at
runtime, correct?

So do you want me to add define-property
name=gwt.rpc.proxySuperClass values=com.foo.Bar/ to
/com/google/gwt/user/RemoteService.gwt.xml ?

I'm fine with that, except I'm not sure about the values attribute.  I
don't want end-user modules to be forced to choose from a pre-defined
set of values for this property.  I want to support providing
arbitrary subclasses of RemoteServiceProxy.

From the docs:

define-property name=property_name values=property_values :
Define a property and allowable values (comma-separated identifiers).
This element is typically used to generate a value that will be
evaluated by a rule using a when... element.

Alex

On Fri, Jan 23, 2009 at 1:25 AM, Ray Cromwell cromwell...@gmail.com wrote:

 Agreed. I used a similar patch in my own implementation a few weeks ago,
 although yours is simpler. One thing I'd suggest though is to get the
 superclass setting either from a module property, or from something in the
 type system, or runtime, rather than the environment.
 e.g.
 define-property name=gwt.rpc.proxySuperClass values=com.foo.Bar/
 set-property name=gwt.rpc.proxySuperClass value=com.foo.Bar/
 which is kind of an abuse of the property system, but allows compiling
 different permutations of the app for different environments (e.g. gadget vs
 non-gadget versions) There was some discussion awhile ago of adding new
 kinds of properties which specify configuration.
 @GwtProxySuperClass(com.foo.Bar)
 public interface MyService extends RemoteService { ... }

 which allows specifying the transport, but does not allow more than 1
 transport at a time for the same type (without creating subinterfaces)
 However you could easily do something like:

 @GwtProxySuperClass(GadgetProxy)
 public MyGadgetService extends MyService {...}
 @GwtProxySuperClass(ProtoBufProxy)
 public MyProtoBufService extends MyService {...}
 Using environment properties doesn't seem GWT-like to me, since it kind of
 buries flags deep inside implementation code that most users won't see and
 moves it to build scripts. This is one of the things I always disliked about
 Sun's use of -D parameters all over the JRE code, since finding out a
 complete list of all these magic variables and exactly what they do is often
 difficult. GWT's idiom is usually to embed build specific switches via
 deferred binding properties.
 -Ray

 On Thu, Jan 22, 2009 at 8:27 PM, Alex Epshteyn
 alexander.epsht...@gmail.com wrote:

 Anyhow, let's get this thread back on track to being a discussion
 about allowing RPC over non-XHR proxy channels like
 gadgets.io.makeRequst.  You can use my RPC code with or without the
 gwt-gadgets library.

 I'd like to get this patch into trunk if no one objects.

 Alex




 On Thu, Jan 22, 2009 at 8:38 PM, Ray Cromwell cromwell...@gmail.com
 wrote:
 
  I don't quite understand this point. Any JSO you create is going to be
  tightly bound to the underlying Gadget/OpenSocial APIs, so what's the
  difference between a JSO binding which is isn't dependency injected, vs
  one
  that is, with regard to keeping up with API changes?  Are you arguing
  against using GWT JSOs to call OpenSocial APIs, or just trying to argue
  against GadgetLinker injecting the reference for you? There seems to be
  little difference between writing a native method to get the initial
  reference to an Overlay type, or having it injected for you, with
  respect to
  fast evolving specs. All the GadgetLinker does is construct an
  instance of
  a type that you tell it and it wouldn't be hard to modify it so inject
  JSO
  Overlays.
  To me, the only issue that controls whether or not you can keep in sink
  is
  whether you have access to the mapping source. And even then, that isn't
  the
  biggest issue with OpenSocial programming. The actual specs
  0.6/0.7/0.8/0.81/0.9 etc aren't changing that fast, in fact, I wish
  they'd
  change faster.
  The real problem with OpenSocial programming, which hits Java
  programmers
  just as hard as JavaScript programmers, is poor container
  implementations,
  and the fact that the spec is designed in a way that virtually
  everything is
  optional to implement. Quick, which containers support notifications,
  requestShareApp, or activities? Which support OAuth?
 
  IMHO, a generator which could parse idiomatic JsDoc/Javascript ala Bob's
  JS
  Interop, and with some extra annotations, automatically generate JSO
  bindings, would actually be superior to writing JSOs by hand to keep
  them in
  sink, or even programming Javascript by hand. Why? Because everytime the
  spec is updated, if there was a mismatch, you could detect errors.
  However, none of that really matters much, since unless you decide to
  target
  a single OS container, 

[gwt-contrib] Re: Proposal: Lightweight GWT-RPC implementation for OpenSocial and Gadgets

2009-01-22 Thread Ray Cromwell
You can extend properties in your own module file, so if a user has a need
in the future to override the proxy superclass, they can extend-property +
set-property the new override.  You'll see that RPC already uses a
property for settings in the RemoteService.gwt.xml
-Ray


On Thu, Jan 22, 2009 at 11:02 PM, Alex Epshteyn 
alexander.epsht...@gmail.com wrote:


 I agree that an environment variable isn't ideal, but could you
 explain the annotations you listed?  Is that a proposed future way to
 access module properties from inside a generator?
 GeneratorContext.getPropertyOracle() is the way to get these at
 runtime, correct?

 So do you want me to add define-property
 name=gwt.rpc.proxySuperClass values=com.foo.Bar/ to
 /com/google/gwt/user/RemoteService.gwt.xml ?

 I'm fine with that, except I'm not sure about the values attribute.  I
 don't want end-user modules to be forced to choose from a pre-defined
 set of values for this property.  I want to support providing
 arbitrary subclasses of RemoteServiceProxy.

 From the docs:

 define-property name=property_name values=property_values :
 Define a property and allowable values (comma-separated identifiers).
 This element is typically used to generate a value that will be
 evaluated by a rule using a when... element.

 Alex

 On Fri, Jan 23, 2009 at 1:25 AM, Ray Cromwell cromwell...@gmail.com
 wrote:
 
  Agreed. I used a similar patch in my own implementation a few weeks ago,
  although yours is simpler. One thing I'd suggest though is to get the
  superclass setting either from a module property, or from something in
 the
  type system, or runtime, rather than the environment.
  e.g.
  define-property name=gwt.rpc.proxySuperClass values=com.foo.Bar/
  set-property name=gwt.rpc.proxySuperClass value=com.foo.Bar/
  which is kind of an abuse of the property system, but allows compiling
  different permutations of the app for different environments (e.g. gadget
 vs
  non-gadget versions) There was some discussion awhile ago of adding new
  kinds of properties which specify configuration.
  @GwtProxySuperClass(com.foo.Bar)
  public interface MyService extends RemoteService { ... }
 
  which allows specifying the transport, but does not allow more than 1
  transport at a time for the same type (without creating subinterfaces)
  However you could easily do something like:
 
  @GwtProxySuperClass(GadgetProxy)
  public MyGadgetService extends MyService {...}
  @GwtProxySuperClass(ProtoBufProxy)
  public MyProtoBufService extends MyService {...}
  Using environment properties doesn't seem GWT-like to me, since it kind
 of
  buries flags deep inside implementation code that most users won't see
 and
  moves it to build scripts. This is one of the things I always disliked
 about
  Sun's use of -D parameters all over the JRE code, since finding out a
  complete list of all these magic variables and exactly what they do is
 often
  difficult. GWT's idiom is usually to embed build specific switches via
  deferred binding properties.
  -Ray
 
  On Thu, Jan 22, 2009 at 8:27 PM, Alex Epshteyn
  alexander.epsht...@gmail.com wrote:
 
  Anyhow, let's get this thread back on track to being a discussion
  about allowing RPC over non-XHR proxy channels like
  gadgets.io.makeRequst.  You can use my RPC code with or without the
  gwt-gadgets library.
 
  I'd like to get this patch into trunk if no one objects.
 
  Alex
 
 
 
 
  On Thu, Jan 22, 2009 at 8:38 PM, Ray Cromwell cromwell...@gmail.com
  wrote:
  
   I don't quite understand this point. Any JSO you create is going to be
   tightly bound to the underlying Gadget/OpenSocial APIs, so what's the
   difference between a JSO binding which is isn't dependency injected,
 vs
   one
   that is, with regard to keeping up with API changes?  Are you arguing
   against using GWT JSOs to call OpenSocial APIs, or just trying to
 argue
   against GadgetLinker injecting the reference for you? There seems to
 be
   little difference between writing a native method to get the initial
   reference to an Overlay type, or having it injected for you, with
   respect to
   fast evolving specs. All the GadgetLinker does is construct an
   instance of
   a type that you tell it and it wouldn't be hard to modify it so inject
   JSO
   Overlays.
   To me, the only issue that controls whether or not you can keep in
 sink
   is
   whether you have access to the mapping source. And even then, that
 isn't
   the
   biggest issue with OpenSocial programming. The actual specs
   0.6/0.7/0.8/0.81/0.9 etc aren't changing that fast, in fact, I wish
   they'd
   change faster.
   The real problem with OpenSocial programming, which hits Java
   programmers
   just as hard as JavaScript programmers, is poor container
   implementations,
   and the fact that the spec is designed in a way that virtually
   everything is
   optional to implement. Quick, which containers support notifications,
   requestShareApp, or activities? Which support OAuth?
  
   IMHO, a