[gwt-contrib] Re: Comment on ImageBundleDesign in google-web-toolkit

2009-11-12 Thread codesite-noreply
Comment by ice.tweety:

Sorry, got it right yet:

DOM.setStyleAttribute(this.getElement(), "backgroundImage", "url(chili.jpg)");

is it!


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

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


[gwt-contrib] Re: Comment on ImageBundleDesign in google-web-toolkit

2009-11-12 Thread codesite-noreply
Comment by ice.tweety:

Hello Salvin,

did you get it meantime?
DOM.setStyleAttribute(simplePanel.getElement(), 
"background-image","url('"+menuShadow.getUrl()+"')");

I need it too.

This also won't work:
DOM.setStyleAttribute(this.getElement(), "backgroundImage", "chili.jpg");


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

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


[gwt-contrib] [google-web-toolkit] r6887 committed - Rolls back 6875, which accidentally included some horrid styling that ...

2009-11-12 Thread codesite-noreply
Revision: 6887
Author: br...@google.com
Date: Thu Nov 12 20:20:48 2009
Log: Rolls back 6875, which accidentally included some horrid styling that  
had been intended for testing only.

Original mistake by: bruce
Change by: bruce
Review by: jat (TBR)


http://code.google.com/p/google-web-toolkit/source/detail?r=6887

Modified:
  /releases/2.0/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html

===
---  
/releases/2.0/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html  
 
Thu Nov 12 11:30:55 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html  
 
Thu Nov 12 20:20:48 2009
@@ -51,10 +51,12 @@
  }

  function loadIframe(url) {
-  var iframeHtml = "";
-  var div = $doc.createElement("div");
-  $doc.body.insertBefore(div, $doc.body.firstChild);
-  div.innerHTML = iframeHtml;
+  var iframe = $doc.createElement('iframe');
+  iframe.src = url;
+  iframe.style.width = "100%";
+  iframe.style.height = "100%";
+  iframe.style.borderWidth = "0px";
+  $doc.body.insertBefore(iframe, $doc.body.firstChild);
  }

  if ($legacyHosted) {
@@ -244,7 +246,7 @@
  } catch (e) {
  }
}
-  loadIframe("http://gwt-dev-plugin-missing.appspot.com";);
+   
loadIframe("http://google-web-toolkit.googlecode.com/svn/trunk/plugins/MissingBrowserPlugin.html";);
  } else {
if (plugin.connect(url, topWin.__gwt_SessionID, $hosted, $moduleName,
$hostedHtmlVersion)) {

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


Re: [gwt-contrib] Re: where is StyleInjector?

2009-11-12 Thread Ray Ryan
The legacy style injector, like the rest of incubator, should be deleted.

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

Re: [gwt-contrib] Re: where is StyleInjector?

2009-11-12 Thread BobV
The legacy StyleInjector should probably be gutted and made to forward
to the real StyleInjector, since the new one offers a pretty decent
performance improvement.

-- 
Bob Vawter
Google Web Toolkit Team

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


[gwt-contrib] Re: where is StyleInjector?

2009-11-12 Thread Grary
Thanks!

On Nov 11, 11:12 am, Ray Ryan  wrote:
> If you're building incubator from source, you'll need to build GWT from
> source as well. To work against GWT 1.7 please download the incubator 
> jar.http://code.google.com/p/google-web-toolkit-incubator/wiki/Downloads?...

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


[gwt-contrib] Removed annotations that passed with the latest HtmlUnit r5159

2009-11-12 Thread flin
Reviewers: amitmanjhi,



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

Affected files:
   user/test/com/google/gwt/dom/client/ElementTest.java
   user/test/com/google/gwt/dom/client/StyleInjectorTest.java
   user/test/com/google/gwt/emultest/java/lang/StringTest.java
   user/test/com/google/gwt/user/client/EventTest.java
   user/test/com/google/gwt/user/client/rpc/UnicodeEscapingTest.java
   user/test/com/google/gwt/user/client/ui/CreateEventTest.java
   user/test/com/google/gwt/user/client/ui/DateBoxTest.java

user/test/com/google/gwt/user/client/ui/impl/ClippedImagePrototypeTest.java


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


[gwt-contrib] Upgrade to the latest HtmlUnit 2.7 r5159

2009-11-12 Thread flin
Reviewers: amitmanjhi,

Description:
We need to upgrade our html lib to the latest HtmlUnit SVN had many bug
fixes. These are the changes to the files in trunk: (Separately tools
updates had been mailed to Amit)
dev/build.xml
eclipse/dev/.classpath
eclipse/user/.classpath

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

Affected files:
   dev/build.xml
   eclipse/dev/.classpath
   eclipse/user/.classpath


Index: eclipse/dev/.classpath
===
--- eclipse/dev/.classpath  (revision 6841)
+++ eclipse/dev/.classpath  (working copy)
@@ -37,8 +37,8 @@



-   
-   
+   
+   


  
Index: eclipse/user/.classpath
===
--- eclipse/user/.classpath (revision 6841)
+++ eclipse/user/.classpath (working copy)
@@ -29,7 +29,7 @@



-   
-   
+   
+   

  
Index: dev/build.xml
===
--- dev/build.xml   (revision 6841)
+++ dev/build.xml   (working copy)
@@ -87,8 +87,8 @@



-  
-  
+  
+  



@@ -143,8 +143,8 @@



-  
-  
+  
+  





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


[gwt-contrib] [google-web-toolkit] r6886 committed - Merging /tr...@r6883 into /releases/2.0.

2009-11-12 Thread codesite-noreply
Revision: 6886
Author: j...@google.com
Date: Thu Nov 12 14:52:16 2009
Log: Merging /tr...@r6883 into /releases/2.0.

http://code.google.com/p/google-web-toolkit/source/detail?r=6886

Modified:
  /releases/2.0/branch-info.txt
   
/releases/2.0/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml

===
--- /releases/2.0/branch-info.txt   Thu Nov 12 14:39:43 2009
+++ /releases/2.0/branch-info.txt   Thu Nov 12 14:52:16 2009
@@ -617,3 +617,8 @@
  tr...@6884 was merged into this branch
   Synchronizing OophmSessionHandler#loadModule() to prevent multiple  
modules from loading at the same time.
  svn merge --ignore-ancestry -c6884  
http://google-web-toolkit.googlecode.com/svn/trunk/ .
+
+tr...@6883 was merged into this branch
+ Fixed stupid style error in Mail's stack panel headers.
+svn merge --ignore-ancestry -c6883  
http://google-web-toolkit.googlecode.com/svn/trunk/ .
+
===
---  
/releases/2.0/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml

Tue Nov 10 14:44:37 2009
+++  
/releases/2.0/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml

Thu Nov 12 14:52:16 2009
@@ -45,17 +45,17 @@


  
-
Mailboxes
+   Mailboxes

  

  
-   Tasks
+   Tasks

  

  
-
Contacts
+   Contacts

  


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


[gwt-contrib] [google-web-toolkit] r6885 committed - tr...@6884 was merged into this branch...

2009-11-12 Thread codesite-noreply
Revision: 6885
Author: jlaba...@google.com
Date: Thu Nov 12 14:39:43 2009
Log: tr...@6884 was merged into this branch
  Synchronizing OophmSessionHandler#loadModule() to prevent multiple modules  
from loading at the same time.
 svn merge --ignore-ancestry -c6884  
http://google-web-toolkit.googlecode.com/svn/trunk/ .

Patch by: jlabanca


http://code.google.com/p/google-web-toolkit/source/detail?r=6885

Modified:
  /releases/2.0/branch-info.txt
   
/releases/2.0/dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java

===
--- /releases/2.0/branch-info.txt   Thu Nov 12 13:32:27 2009
+++ /releases/2.0/branch-info.txt   Thu Nov 12 14:39:43 2009
@@ -614,3 +614,6 @@
   Adds a start() method to MessageTransport
  svn merge --ignore-ancestry -c6880  
http://google-web-toolkit.googlecode.com/svn/trunk/ .

+tr...@6884 was merged into this branch
+ Synchronizing OophmSessionHandler#loadModule() to prevent multiple  
modules from loading at the same time.
+svn merge --ignore-ancestry -c6884  
http://google-web-toolkit.googlecode.com/svn/trunk/ .
===
---  
/releases/2.0/dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java
 
Wed Nov 11 11:04:31 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java
 
Thu Nov 12 14:39:43 2009
@@ -155,7 +155,7 @@
}

@Override
-  public TreeLogger loadModule(TreeLogger loadModuleLogger,
+  public synchronized TreeLogger loadModule(TreeLogger loadModuleLogger,
BrowserChannel channel, String moduleName, String userAgent, String  
url,
String tabKey, String sessionKey, byte[] userAgentIcon) {
  logger = loadModuleLogger;

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


[gwt-contrib] [google-web-toolkit] r6884 committed - Synchronizing OophmSessionHandler#loadModule to ensure that two module...

2009-11-12 Thread codesite-noreply
Revision: 6884
Author: jlaba...@google.com
Date: Thu Nov 12 14:37:28 2009
Log: Synchronizing OophmSessionHandler#loadModule to ensure that two  
modules never load at the same time.

Patch by: jlabanca
Review by: bobv (pair)


http://code.google.com/p/google-web-toolkit/source/detail?r=6884

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java   
 
Tue Nov 10 20:40:00 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/shell/OophmSessionHandler.java   
 
Thu Nov 12 14:37:28 2009
@@ -155,7 +155,7 @@
}

@Override
-  public TreeLogger loadModule(TreeLogger loadModuleLogger,
+  public synchronized TreeLogger loadModule(TreeLogger loadModuleLogger,
BrowserChannel channel, String moduleName, String userAgent, String  
url,
String tabKey, String sessionKey, byte[] userAgentIcon) {
  logger = loadModuleLogger;

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


[gwt-contrib] [google-web-toolkit] r6883 committed - Fixed stupid style error in Mail's stack panel headers....

2009-11-12 Thread codesite-noreply
Revision: 6883
Author: j...@google.com
Date: Thu Nov 12 14:37:02 2009
Log: Fixed stupid style error in Mail's stack panel headers.
TBR: rjrjr
http://code.google.com/p/google-web-toolkit/source/detail?r=6883

Modified:
  /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml

===
---  
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml  
 
Tue Nov 10 12:33:30 2009
+++  
/trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml  
 
Thu Nov 12 14:37:02 2009
@@ -45,17 +45,17 @@


  
-
Mailboxes
+   Mailboxes

  

  
-   Tasks
+   Tasks

  

  
-
Contacts
+   Contacts

  


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


[gwt-contrib] TBR: r6883 [EOM]

2009-11-12 Thread Joel Webber


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

[gwt-contrib] Re: Fix Issue 4045: cannot start in Turkish locale

2009-11-12 Thread jat
LGTM

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

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


[gwt-contrib] Fix Issue 4045: cannot start in Turkish locale

2009-11-12 Thread rice
Reviewers: jat,

Description:
Ensure all calls to String.to{Lower,Upper}Case in the dev packages
specify the English locale, so that Turkish users don't experience 'I'
mapping to dotless small 'i'.  We also avoid calls to
Character.to{Lower,Upper}Case since they do not specify the locale.

There's a separate issue around the JS implementation of these methods,
but this patch addresses only the non-emulated 'gwt-dev' case.


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

Affected files:
   dev/core/src/com/google/gwt/dev/BootStrapPlatform.java
   dev/core/src/com/google/gwt/dev/GWTShell.java
   dev/core/src/com/google/gwt/dev/ServletValidator.java
   dev/core/src/com/google/gwt/dev/javac/JsniChecker.java
   dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
   dev/core/src/com/google/gwt/dev/shell/BrowserWidgetHostChecker.java
   dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java
   dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteJsniMethods.java
   dev/core/src/com/google/gwt/dev/shell/tomcat/EmbeddedTomcatServer.java
   dev/core/src/com/google/gwt/dev/util/BrowserInfo.java
   dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerScriptStyle.java
   dev/core/test/com/google/gwt/dev/resource/impl/PathPrefixSetTest.java


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


[gwt-contrib] [google-web-toolkit] r6882 committed - Update branch-info.txt to reflect merge of tr...@r6880 into this branc...

2009-11-12 Thread codesite-noreply
Revision: 6882
Author: rda...@google.com
Date: Thu Nov 12 13:32:27 2009
Log: Update branch-info.txt to reflect merge of tr...@r6880 into this  
branch.

http://code.google.com/p/google-web-toolkit/source/detail?r=6882

Modified:
  /releases/2.0/branch-info.txt

===
--- /releases/2.0/branch-info.txt   Thu Nov 12 12:19:29 2009
+++ /releases/2.0/branch-info.txt   Thu Nov 12 13:32:27 2009
@@ -609,3 +609,8 @@
  tr...@6876 was merged into this branch
   Synchronize ModuleDef#getResourceOracle() to fix an issue where multiple  
sessions clobber each other
  svn merge --ignore-ancestry -c6876  
http://google-web-toolkit.googlecode.com/svn/trunk/ .
+
+tr...@6880 was merged into this branch
+ Adds a start() method to MessageTransport
+svn merge --ignore-ancestry -c6880  
http://google-web-toolkit.googlecode.com/svn/trunk/ .
+

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


[gwt-contrib] Re: Code Review Request: Add start() method to MessageTransport

2009-11-12 Thread rdayal
Thanks for the review. Ran the unit tests and updates against the
plugin, everything checked out.

Committed into trunk at r6880.
Cherry-picked into releases/2.0 at r6881.

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

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


[gwt-contrib] [google-web-toolkit] r6881 committed - Merge tr...@r6880 into releases/2.0. Merge performed with the followin...

2009-11-12 Thread codesite-noreply
Revision: 6881
Author: rda...@google.com
Date: Thu Nov 12 13:31:08 2009
Log: Merge tr...@r6880 into releases/2.0. Merge performed with the  
following command:

svn merge --ignore-ancestry -c 6880  
http://google-web-toolkit.googlecode.com/svn/trunk .

http://code.google.com/p/google-web-toolkit/source/detail?r=6881

Modified:
   
/releases/2.0/dev/core/src/com/google/gwt/dev/shell/remoteui/MessageTransport.java
  /releases/2.0/dev/core/src/com/google/gwt/dev/shell/remoteui/RemoteUI.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/shell/remoteui/MessageTransportTest.java

===
---  
/releases/2.0/dev/core/src/com/google/gwt/dev/shell/remoteui/MessageTransport.java
   
Wed Nov 11 18:35:07 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/dev/shell/remoteui/MessageTransport.java
   
Thu Nov 12 13:31:08 2009
@@ -33,6 +33,7 @@
  import java.util.concurrent.Executors;
  import java.util.concurrent.Future;
  import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicBoolean;
  import java.util.concurrent.atomic.AtomicInteger;
  import java.util.concurrent.locks.Condition;
  import java.util.concurrent.locks.Lock;
@@ -228,18 +229,18 @@

private static final int DEFAULT_SERVICE_THREADS = 2;

-  private final Thread messageProcessingThread;
+  private final AtomicBoolean isStarted = new AtomicBoolean(false);
private final AtomicInteger nextMessageId = new AtomicInteger();
private final RequestProcessor requestProcessor;
private final LinkedBlockingQueue sendQueue = new  
LinkedBlockingQueue();
-  private final Thread sendThread;
private final ExecutorService serverRequestExecutor;
private final PendingRequestMap pendingRequestMap = new  
PendingRequestMap();
private final TerminationCallback terminationCallback;
+  private final InputStream inputStream;
+  private final OutputStream outputStream;

/**
 * Create a new instance using the given streams and request processor.
-   * Closing either stream will cause the termination of the transport.
 *
 * @param inputStream an input stream for reading messages
 * @param outputStream an output stream for writing messages
@@ -253,10 +254,53 @@
TerminationCallback terminationCallback) {
  this.requestProcessor = requestProcessor;
  this.terminationCallback = terminationCallback;
+this.inputStream = inputStream;
+this.outputStream = outputStream;
  serverRequestExecutor =  
Executors.newFixedThreadPool(DEFAULT_SERVICE_THREADS);
+  }
+
+  /**
+   * Asynchronously executes the request on a remote server.
+   *
+   * @param requestMessage The request to execute
+   *
+   * @return a {...@link Future} that can be used to access the server's  
response
+   */
+  public Future executeRequestAsync(final Request  
requestMessage) {
+Future responseFuture = serverRequestExecutor.submit(new  
Callable() {
+  public Response call() throws Exception {
+Message.Builder messageBuilder = Message.newBuilder();
+int messageId = nextMessageId.getAndIncrement();
+messageBuilder.setMessageId(messageId);
+messageBuilder.setMessageType(Message.MessageType.REQUEST);
+messageBuilder.setRequest(requestMessage);
+
+Message message = messageBuilder.build();
+PendingRequest pendingRequest = new PendingRequest(message);
+sendQueue.put(pendingRequest);
+
+return pendingRequest.waitForResponse();
+  }
+});
+
+return responseFuture;
+  }
+
+  /**
+   * Starts up the message transport. The message transport creates its own
+   * threads, so it is not necessary to invoke this method from a separate
+   * thread.
+   *
+   * Closing either stream will cause the termination of the transport.
+   */
+  public void start() {
+
+if (isStarted.getAndSet(true)) {
+  return;
+}

  // This thread terminates on interruption or IO failure
-messageProcessingThread = new Thread(new Runnable() {
+Thread messageProcessingThread = new Thread(new Runnable() {
public void run() {
  try {
while (true) {
@@ -274,7 +318,7 @@
  messageProcessingThread.start();

  // This thread only terminates if it is interrupted
-sendThread = new Thread(new Runnable() {
+Thread sendThread = new Thread(new Runnable() {
public void run() {
  while (true) {
try {
@@ -293,33 +337,6 @@
  sendThread.setDaemon(true);
  sendThread.start();
}
-
-  /**
-   * Asynchronously executes the request on a remote server.
-   *
-   * @param requestMessage The request to execute
-   *
-   * @return a {...@link Future} that can be used to access the server's  
response
-   */
-  public Future executeRequestAsync(final Request  
requestMessage) {
-Future responseFuture = serverRequestExecutor.submit(new  
Callable() {
-  public Response call() throws Exception {
-Message.Builder messageBuilder = 

[gwt-contrib] [google-web-toolkit] r6880 committed - Adds a start() method to MessageTransport. The message transport threa...

2009-11-12 Thread codesite-noreply
Revision: 6880
Author: rda...@google.com
Date: Thu Nov 12 13:26:49 2009
Log: Adds a start() method to MessageTransport. The message transport  
threads are no longer started in the constructor; they are only started  
once the start() method is called.

Review by: mmendez
http://code.google.com/p/google-web-toolkit/source/detail?r=6880

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/shell/remoteui/MessageTransport.java
  /trunk/dev/core/src/com/google/gwt/dev/shell/remoteui/RemoteUI.java
   
/trunk/dev/core/test/com/google/gwt/dev/shell/remoteui/MessageTransportTest.java

===
---  
/trunk/dev/core/src/com/google/gwt/dev/shell/remoteui/MessageTransport.java 
 
Wed Nov 11 18:23:59 2009
+++  
/trunk/dev/core/src/com/google/gwt/dev/shell/remoteui/MessageTransport.java 
 
Thu Nov 12 13:26:49 2009
@@ -33,6 +33,7 @@
  import java.util.concurrent.Executors;
  import java.util.concurrent.Future;
  import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.atomic.AtomicBoolean;
  import java.util.concurrent.atomic.AtomicInteger;
  import java.util.concurrent.locks.Condition;
  import java.util.concurrent.locks.Lock;
@@ -228,18 +229,18 @@

private static final int DEFAULT_SERVICE_THREADS = 2;

-  private final Thread messageProcessingThread;
+  private final AtomicBoolean isStarted = new AtomicBoolean(false);
private final AtomicInteger nextMessageId = new AtomicInteger();
private final RequestProcessor requestProcessor;
private final LinkedBlockingQueue sendQueue = new  
LinkedBlockingQueue();
-  private final Thread sendThread;
private final ExecutorService serverRequestExecutor;
private final PendingRequestMap pendingRequestMap = new  
PendingRequestMap();
private final TerminationCallback terminationCallback;
+  private final InputStream inputStream;
+  private final OutputStream outputStream;

/**
 * Create a new instance using the given streams and request processor.
-   * Closing either stream will cause the termination of the transport.
 *
 * @param inputStream an input stream for reading messages
 * @param outputStream an output stream for writing messages
@@ -253,10 +254,53 @@
TerminationCallback terminationCallback) {
  this.requestProcessor = requestProcessor;
  this.terminationCallback = terminationCallback;
+this.inputStream = inputStream;
+this.outputStream = outputStream;
  serverRequestExecutor =  
Executors.newFixedThreadPool(DEFAULT_SERVICE_THREADS);
+  }
+
+  /**
+   * Asynchronously executes the request on a remote server.
+   *
+   * @param requestMessage The request to execute
+   *
+   * @return a {...@link Future} that can be used to access the server's  
response
+   */
+  public Future executeRequestAsync(final Request  
requestMessage) {
+Future responseFuture = serverRequestExecutor.submit(new  
Callable() {
+  public Response call() throws Exception {
+Message.Builder messageBuilder = Message.newBuilder();
+int messageId = nextMessageId.getAndIncrement();
+messageBuilder.setMessageId(messageId);
+messageBuilder.setMessageType(Message.MessageType.REQUEST);
+messageBuilder.setRequest(requestMessage);
+
+Message message = messageBuilder.build();
+PendingRequest pendingRequest = new PendingRequest(message);
+sendQueue.put(pendingRequest);
+
+return pendingRequest.waitForResponse();
+  }
+});
+
+return responseFuture;
+  }
+
+  /**
+   * Starts up the message transport. The message transport creates its own
+   * threads, so it is not necessary to invoke this method from a separate
+   * thread.
+   *
+   * Closing either stream will cause the termination of the transport.
+   */
+  public void start() {
+
+if (isStarted.getAndSet(true)) {
+  return;
+}

  // This thread terminates on interruption or IO failure
-messageProcessingThread = new Thread(new Runnable() {
+Thread messageProcessingThread = new Thread(new Runnable() {
public void run() {
  try {
while (true) {
@@ -274,7 +318,7 @@
  messageProcessingThread.start();

  // This thread only terminates if it is interrupted
-sendThread = new Thread(new Runnable() {
+Thread sendThread = new Thread(new Runnable() {
public void run() {
  while (true) {
try {
@@ -293,33 +337,6 @@
  sendThread.setDaemon(true);
  sendThread.start();
}
-
-  /**
-   * Asynchronously executes the request on a remote server.
-   *
-   * @param requestMessage The request to execute
-   *
-   * @return a {...@link Future} that can be used to access the server's  
response
-   */
-  public Future executeRequestAsync(final Request  
requestMessage) {
-Future responseFuture = serverRequestExecutor.submit(new  
Callable() {
-  public Response call() throws Exception {
-Message.Builder messageBuilder = Message.newBuilder(

[gwt-contrib] Allow file path in selenium target name

2009-11-12 Thread jlabanca
Reviewers: fabbott,

Description:
Currently, RunStyleSelenium cannot parse a selenium target that contains
a file path, such as:
localhost:/*firefox /usr/bin/firefox

This is supported by firefox, and very useful when multiple versions of
a browser are installed on the target system.

Fix:
===
This patch changes the regex expression to be more open, allowing almost
anything as the browser string (which includes both the name and path).

Testing:

Manually verified and wrote some unit tests.

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

Affected files:
   user/src/com/google/gwt/junit/RunStyleSelenium.java
   user/test/com/google/gwt/junit/RunStyleSeleniumTest.java


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


[gwt-contrib] [google-web-toolkit] r6879 committed - merge 6878, fixing ServletMappingTest by not putting user on the class...

2009-11-12 Thread codesite-noreply
Revision: 6879
Author: fabb...@google.com
Date: Thu Nov 12 12:45:28 2009
Log: merge 6878, fixing ServletMappingTest by not putting user on the  
classpath in lieu of emma.
http://code.google.com/p/google-web-toolkit/source/detail?r=6879

Modified:
  /releases/2.0/common.ant.xml

===
--- /releases/2.0/common.ant.xmlThu Nov  5 06:53:33 2009
+++ /releases/2.0/common.ant.xmlThu Nov 12 12:45:28 2009
@@ -179,7 +179,8 @@

  

-  
+  
  


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


[gwt-contrib] [google-web-toolkit] r6878 committed - Fix ServletMappingSuite, which was wrongly getting user/ on the classp...

2009-11-12 Thread codesite-noreply
Revision: 6878
Author: fabb...@google.com
Date: Thu Nov 12 12:28:34 2009
Log: Fix ServletMappingSuite, which was wrongly getting user/ on the  
classpath, and thus found user/test/** as part of  
test.ServletMappingTest.gwt.xml
http://code.google.com/p/google-web-toolkit/source/detail?r=6878

Modified:
  /trunk/common.ant.xml

===
--- /trunk/common.ant.xml   Thu Nov  5 06:46:58 2009
+++ /trunk/common.ant.xml   Thu Nov 12 12:28:34 2009
@@ -179,7 +179,8 @@

  

-  
+  
  


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


[gwt-contrib] [google-web-toolkit] r6877 committed - tr...@6876 was merged into this branch...

2009-11-12 Thread codesite-noreply
Revision: 6877
Author: jlaba...@google.com
Date: Thu Nov 12 12:19:29 2009
Log: tr...@6876 was merged into this branch
  Synchronize ModuleDef#getResourceOracle() to fix an issue where multiple  
sessions clobber each other
 svn merge --ignore-ancestry -c6876  
http://google-web-toolkit.googlecode.com/svn/trunk/ .

Patch by: jlabanca


http://code.google.com/p/google-web-toolkit/source/detail?r=6877

Modified:
  /releases/2.0/branch-info.txt
  /releases/2.0/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
  /releases/2.0/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java
  /releases/2.0/user/src/com/google/gwt/i18n/rebind/ResourceFactory.java

===
--- /releases/2.0/branch-info.txt   Thu Nov 12 08:28:36 2009
+++ /releases/2.0/branch-info.txt   Thu Nov 12 12:19:29 2009
@@ -605,3 +605,7 @@
   Fix a problem with local classes.
  svn merge --ignore-ancestry -c6872 \
http://google-web-toolkit.googlecode.com/svn/trunk/ .
+
+tr...@6876 was merged into this branch
+ Synchronize ModuleDef#getResourceOracle() to fix an issue where multiple  
sessions clobber each other
+svn merge --ignore-ancestry -c6876  
http://google-web-toolkit.googlecode.com/svn/trunk/ .
===
--- /releases/2.0/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.javaWed  
Nov 11 11:04:31 2009
+++ /releases/2.0/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.javaThu  
Nov 12 12:19:29 2009
@@ -311,7 +311,7 @@
  return properties;
}

-  public ResourceOracle getResourcesOracle() {
+  public synchronized ResourceOracle getResourcesOracle() {
  if (lazyResourcesOracle == null) {
lazyResourcesOracle = new ResourceOracleImpl(TreeLogger.NULL);
PathPrefixSet pathPrefixes = lazySourceOracle.getPathPrefixes();
===
--- /releases/2.0/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java  Tue  
May  5 13:08:14 2009
+++ /releases/2.0/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java  Thu  
Nov 12 12:19:29 2009
@@ -56,7 +56,7 @@

private static final Set runtimeLocales = new  
HashSet();

-  public static void clear() {
+  public static synchronized void clear() {
  allCompileLocales.clear();
  allLocales.clear();
  compileLocale = null;
@@ -69,7 +69,7 @@
 *
 * @return unmodifiable set of all compile-time locales
 */
-  public static Set getAllCompileLocales() {
+  public static synchronized Set getAllCompileLocales() {
  return Collections.unmodifiableSet(allCompileLocales);
}

@@ -79,14 +79,14 @@
 *
 * @return unmodifiable set of all locales
 */
-  public static Set getAllLocales() {
+  public static synchronized Set getAllLocales() {
  return Collections.unmodifiableSet(allLocales);
}

/**
 * @return the static compile-time locale for this permutation.
 */
-  public static GwtLocale getCompileLocale() {
+  public static synchronized GwtLocale getCompileLocale() {
  return compileLocale;
}

@@ -95,7 +95,7 @@
 *
 * @return singleton GwtLocaleFactory instance.
 */
-  public static GwtLocaleFactory getLocaleFactory() {
+  public static synchronized GwtLocaleFactory getLocaleFactory() {
  return factory;
}

@@ -105,7 +105,7 @@
 *
 * @return unmodifiable list of matching locales
 */
-  public static Set getRuntimeLocales() {
+  public static synchronized Set getRuntimeLocales() {
  return Collections.unmodifiableSet(runtimeLocales);
}

@@ -116,7 +116,7 @@
 * @param logger
 * @param propertyOracle
 */
-  public static void init(TreeLogger logger, PropertyOracle  
propertyOracle) {
+  public static synchronized void init(TreeLogger logger, PropertyOracle  
propertyOracle) {
  try {
SelectionProperty localeProp
= propertyOracle.getSelectionProperty(logger, PROP_LOCALE);
===
--- /releases/2.0/user/src/com/google/gwt/i18n/rebind/ResourceFactory.java  
 
Tue Jul 14 12:57:27 2009
+++ /releases/2.0/user/src/com/google/gwt/i18n/rebind/ResourceFactory.java  
 
Thu Nov 12 12:19:29 2009
@@ -101,7 +101,7 @@
/**
 * Clears the resource cache.
 */
-  public static void clearCache() {
+  public static synchronized void clearCache() {
  cache.clear();
}

@@ -116,8 +116,8 @@
 *  {...@link  
com.google.gwt.core.ext.GeneratorContext#getResourcesOracle()}...@link  
com.google.gwt.dev.resource.ResourceOracle#getResourceMap()  
getResourceMap()}
 * @return resource list
 */
-  public static ResourceList getBundle(TreeLogger logger, JClassType  
topClass,
-  GwtLocale bundleLocale, boolean isConstants,
+  public static synchronized ResourceList getBundle(TreeLogger logger,
+  JClassType topClass, GwtLocale bundleLocale, boolean isConstants,
Map resourceMap) {
  List locales = bundleLocale.getCompleteSearchList();
  List classes = new ArrayList();

-- 
http://groups.goog

[gwt-contrib] [google-web-toolkit] r6876 committed - Synchronizing ModuleDef#getResourceOracle(), which causes things to br...

2009-11-12 Thread codesite-noreply
Revision: 6876
Author: jlaba...@google.com
Date: Thu Nov 12 12:14:16 2009
Log: Synchronizing ModuleDef#getResourceOracle(), which causes things to  
break in dev mode because we sometimes create a bunch of oracles that step  
on each other.  Also synchronizing some generator classes that use a cache.

Patch by: jlabanca
Review by: jat (desk)


http://code.google.com/p/google-web-toolkit/source/detail?r=6876

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
  /trunk/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java
  /trunk/user/src/com/google/gwt/i18n/rebind/ResourceFactory.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java   Tue Nov 10  
20:42:30 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java   Thu Nov 12  
12:14:16 2009
@@ -311,7 +311,7 @@
  return properties;
}

-  public ResourceOracle getResourcesOracle() {
+  public synchronized ResourceOracle getResourcesOracle() {
  if (lazyResourcesOracle == null) {
lazyResourcesOracle = new ResourceOracleImpl(TreeLogger.NULL);
PathPrefixSet pathPrefixes = lazySourceOracle.getPathPrefixes();
===
--- /trunk/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java Tue May  5  
13:08:14 2009
+++ /trunk/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java Thu Nov 12  
12:14:16 2009
@@ -56,7 +56,7 @@

private static final Set runtimeLocales = new  
HashSet();

-  public static void clear() {
+  public static synchronized void clear() {
  allCompileLocales.clear();
  allLocales.clear();
  compileLocale = null;
@@ -69,7 +69,7 @@
 *
 * @return unmodifiable set of all compile-time locales
 */
-  public static Set getAllCompileLocales() {
+  public static synchronized Set getAllCompileLocales() {
  return Collections.unmodifiableSet(allCompileLocales);
}

@@ -79,14 +79,14 @@
 *
 * @return unmodifiable set of all locales
 */
-  public static Set getAllLocales() {
+  public static synchronized Set getAllLocales() {
  return Collections.unmodifiableSet(allLocales);
}

/**
 * @return the static compile-time locale for this permutation.
 */
-  public static GwtLocale getCompileLocale() {
+  public static synchronized GwtLocale getCompileLocale() {
  return compileLocale;
}

@@ -95,7 +95,7 @@
 *
 * @return singleton GwtLocaleFactory instance.
 */
-  public static GwtLocaleFactory getLocaleFactory() {
+  public static synchronized GwtLocaleFactory getLocaleFactory() {
  return factory;
}

@@ -105,7 +105,7 @@
 *
 * @return unmodifiable list of matching locales
 */
-  public static Set getRuntimeLocales() {
+  public static synchronized Set getRuntimeLocales() {
  return Collections.unmodifiableSet(runtimeLocales);
}

@@ -116,7 +116,7 @@
 * @param logger
 * @param propertyOracle
 */
-  public static void init(TreeLogger logger, PropertyOracle  
propertyOracle) {
+  public static synchronized void init(TreeLogger logger, PropertyOracle  
propertyOracle) {
  try {
SelectionProperty localeProp
= propertyOracle.getSelectionProperty(logger, PROP_LOCALE);
===
--- /trunk/user/src/com/google/gwt/i18n/rebind/ResourceFactory.java Tue Jul 
 
14 12:57:27 2009
+++ /trunk/user/src/com/google/gwt/i18n/rebind/ResourceFactory.java Thu Nov 
 
12 12:14:16 2009
@@ -101,7 +101,7 @@
/**
 * Clears the resource cache.
 */
-  public static void clearCache() {
+  public static synchronized void clearCache() {
  cache.clear();
}

@@ -116,8 +116,8 @@
 *  {...@link  
com.google.gwt.core.ext.GeneratorContext#getResourcesOracle()}...@link  
com.google.gwt.dev.resource.ResourceOracle#getResourceMap()  
getResourceMap()}
 * @return resource list
 */
-  public static ResourceList getBundle(TreeLogger logger, JClassType  
topClass,
-  GwtLocale bundleLocale, boolean isConstants,
+  public static synchronized ResourceList getBundle(TreeLogger logger,
+  JClassType topClass, GwtLocale bundleLocale, boolean isConstants,
Map resourceMap) {
  List locales = bundleLocale.getCompleteSearchList();
  List classes = new ArrayList();

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


[gwt-contrib] Re: Code Review Request: Add start() method to MessageTransport

2009-11-12 Thread mmendez
LGTM

Make sure to run the updates against the plugin as a cross-check.

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

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


[gwt-contrib] Re: Don't use "" to mean "emma's not in play"

2009-11-12 Thread jlabanca
LGTM

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

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


[gwt-contrib] Re: Code Review Request: Add start() method to MessageTransport

2009-11-12 Thread rdayal
http://gwt-code-reviews.appspot.com/102813

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


[gwt-contrib] Don't use "" to mean "emma's not in play"

2009-11-12 Thread fabbott
Reviewers: jlabanca,

Description:
This fixes the ServletMappingSuite buildbreak.

The issue appears to be that a  is taken, much
like a :: substring in -classpath, to mean "this directory" rather than
"nothing": it puts gwt-root/user onto the classpath.  And, when the
test.ServletMappingSuite module is in play, "test/..." is in the
 path, so gwt-root/user/test/... comes into play and wreaks
havoc.

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

Affected files:
   common.ant.xml


Index: common.ant.xml
===
--- common.ant.xml  (revision 6874)
+++ common.ant.xml  (working copy)
@@ -179,7 +179,8 @@

  

-  
+  
  




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


[gwt-contrib] Code Review Request: Add start() method to MessageTransport

2009-11-12 Thread rdayal
Reviewers: mmendez,

Description:
Adds a start() method to MessageTransport. The message transport threads
are no longer started in the constructor; they are only started once the
start() method is called.

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

Affected files:
   M dev/core/src/com/google/gwt/dev/shell/remoteui/MessageTransport.java
   M dev/core/src/com/google/gwt/dev/shell/remoteui/RemoteUI.java
   M  
dev/core/test/com/google/gwt/dev/shell/remoteui/MessageTransportTest.java


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


[gwt-contrib] [google-web-toolkit] r6875 committed - Changes URL in hosted.html to point to the new "missing plugin page" a...

2009-11-12 Thread codesite-noreply
Revision: 6875
Author: br...@google.com
Date: Thu Nov 12 11:30:55 2009
Log: Changes URL in hosted.html to point to the new "missing plugin page"  
app that lives here:
http://gwt-dev-plugin-missing.appspot.com

Change by: bruce
Review by: cramsdale (desk)


http://code.google.com/p/google-web-toolkit/source/detail?r=6875

Modified:
  /releases/2.0/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html

===
---  
/releases/2.0/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html  
 
Fri Nov  6 14:29:16 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html  
 
Thu Nov 12 11:30:55 2009
@@ -51,12 +51,10 @@
  }

  function loadIframe(url) {
-  var iframe = $doc.createElement('iframe');
-  iframe.src = url;
-  iframe.style.width = "100%";
-  iframe.style.height = "100%";
-  iframe.style.borderWidth = "0px";
-  $doc.body.insertBefore(iframe, $doc.body.firstChild);
+  var iframeHtml = "";
+  var div = $doc.createElement("div");
+  $doc.body.insertBefore(div, $doc.body.firstChild);
+  div.innerHTML = iframeHtml;
  }

  if ($legacyHosted) {
@@ -246,7 +244,7 @@
  } catch (e) {
  }
}
-   
loadIframe("http://google-web-toolkit.googlecode.com/svn/trunk/plugins/MissingBrowserPlugin.html";);
+  loadIframe("http://gwt-dev-plugin-missing.appspot.com";);
  } else {
if (plugin.connect(url, topWin.__gwt_SessionID, $hosted, $moduleName,
$hostedHtmlVersion)) {

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


[gwt-contrib] Re: allow prefetching of runAsync code

2009-11-12 Thread spoon
Thanks, Bob!  What do you think about the error messages and about the
isLoaded method?

I'll post an updated patch in just a minute.


http://gwt-code-reviews.appspot.com/102801/diff/1/43
File dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode189
Line 189: error("Multiple runASync calls are named " + name);
Done.  Here is an example trace:

Replacing GWT.runAsync with island loader calls
   [ERROR] Multiple runAsync calls are named
com.google.gwt.sample.showcase.client.content.other.CwAnimation
  [ERROR] One call is in
com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel.asyncOnInitialize
(file:/Users/spoon/gwt/git/samples/showcase/src/com/google/gwt/sample/showcase/client/content/panels/CwAbsolutePanel.java:201)
  [ERROR] One call is in
com.google.gwt.sample.showcase.client.content.other.CwAnimation.asyncOnInitialize
(file:/Users/spoon/gwt/git/samples/showcase/src/com/google/gwt/sample/showcase/client/content/other/CwAnimation.java:247)
   [ERROR] No runAsync call is named
com.google.gwt.sample.showcase.client.content.panels.CwAbsolutePanel

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode223
Line 223: private static String nameFromClassLiteral(JClassLiteral
classLiteral) {
It's called twice.  Once in the new code, in ReplaceRunAsyncResources,
and once in the preexisting AsyncCreateVisitor.

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode243
Line 243: private void execImpl() throws UnableToCompleteException {
This code runs before the AST is fully set up.  The errors generated are
just like for errors found by findEntryPoints() or
CodeSplitter.pickInitialLoadSequence().  In particular, there is no ICE
here.  See the above error log trace for an example of what it looks
like to users.

What's really lacking here is detection during development mode.  I
thought about getting into that, but there are some problems.  Most
notably, it fundamentally requires a whole-program scan, so it's one
more challenge to being lazy in development mode about what code is
loaded.  On the flip side, the benefit is marginal in this case, because
anyone tinkering with prefetching needs to be using production mode.

Do you think this is a blocking issue?  We can certainly add a test
earlier on, but it will take a little more development.

http://gwt-code-reviews.appspot.com/102801/diff/1/3
File
samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/3#newcode124
Line 124: private static  List list(T... elems) {
On 2009/11/12 16:19:53, bobv wrote:
> Replace this with Arrays.asList()

Done.

http://gwt-code-reviews.appspot.com/102801/diff/1/39
File
samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/39#newcode35
Line 35: @ShowcaseStyle( {
Yes.  What should be done, though?  Other committers are removing the
"value = " bits.

http://gwt-code-reviews.appspot.com/102801/diff/1/45
File user/src/com/google/gwt/core/client/prefetch/Prefetcher.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/45#newcode33
Line 33: public static void prefetch(Iterable resources) {
I'm not sure what you mean?  Prefetcher.prefetch/start/stop is the API
on the design wave.

http://gwt-code-reviews.appspot.com/102801/diff/1/45#newcode51
Line 51: throw new RuntimeException("Unknown resource type: "
On 2009/11/12 16:19:53, bobv wrote:
> IllegalArgumentException

Done.

http://gwt-code-reviews.appspot.com/102801/diff/1/47
File user/src/com/google/gwt/core/client/prefetch/RunAsyncCode.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/47#newcode57
Line 57: public boolean isLoaded() {
I thought it would be good there, too, but there was some debate on what
the superinterface should have, exactly.  I put it here on the thinking
that that question will be clearer once we have at least one more
PrefetchableResource implemented.

http://gwt-code-reviews.appspot.com/102801/diff/1/44
File
user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/44#newcode146
Line 146: private static List list(int... elems) {
On 2009/11/12 16:19:53, bobv wrote:
> Arrays.asList() instead.

Done.

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

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


[gwt-contrib] [google-web-toolkit] r6874 committed - Merge trunk r6872 into this branch...

2009-11-12 Thread codesite-noreply
Revision: 6874
Author: j...@google.com
Date: Thu Nov 12 08:28:36 2009
Log: Merge trunk r6872 into this branch
  Fix a problem with local classes.
 svn merge --ignore-ancestry -c6872 \
   http://google-web-toolkit.googlecode.com/svn/trunk/ .


http://code.google.com/p/google-web-toolkit/source/detail?r=6874

Modified:
  /releases/2.0/branch-info.txt
  /releases/2.0/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectMethodData.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTest.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/CollectClassDataTest.java

===
--- /releases/2.0/branch-info.txt   Thu Nov 12 08:23:17 2009
+++ /releases/2.0/branch-info.txt   Thu Nov 12 08:28:36 2009
@@ -600,3 +600,8 @@
   Fix a problem getting real argument names from generic methods.
  svn merge --ignore-ancestry -c6871 \
http://google-web-toolkit.googlecode.com/svn/trunk/ .
+
+tr...@6872 was merged into this branch
+ Fix a problem with local classes.
+svn merge --ignore-ancestry -c6872 \
+  http://google-web-toolkit.googlecode.com/svn/trunk/ .
===
---  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java 
 
Thu Nov 12 08:23:17 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java 
 
Thu Nov 12 08:28:36 2009
@@ -93,6 +93,9 @@
/**
 * Returns the binary name of a type. This is the same name that would be
 * returned by {...@link Class#getName()} for this type.
+   *
+   * @param type TypeOracle type to get the name for
+   * @return binary name for a type
 */
public static String computeBinaryClassName(JType type) {
  JPrimitiveType primitiveType = type.isPrimitive();
@@ -231,10 +234,18 @@

private Resolver resolver;

+  /**
+   * Construct a TypeOracleMediator.
+   */
public TypeOracleMediator() {
  this(null);
}

+  /**
+   * Construct a TypeOracleMediator.
+   *
+   * @param typeOracle TypeOracle instance to use, or null to create a new  
one
+   */
// @VisibleForTesting
public TypeOracleMediator(TypeOracle typeOracle) {
  if (typeOracle == null) {
@@ -272,8 +283,12 @@

/**
 * Adds new units to an existing TypeOracle.
+   *
+   * @param logger logger to use
+   * @param units collection of compilation units to process
 */
-  public void addNewUnits(TreeLogger logger, Collection  
units) {
+  public void addNewUnits(TreeLogger logger,
+  Collection units) {
  PerfLogger.start("TypeOracleMediator.addNewUnits");
  // First collect all class data.
  classMap = new HashMap();
@@ -349,10 +364,16 @@
  PerfLogger.end();
}

+  /**
+   * @return a map from binary class names to JRealClassType.
+   */
public Map getBinaryMapper() {
  return binaryMapper;
}

+  /**
+   * @return the TypeOracle managed by the mediator.
+   */
public TypeOracle getTypeOracle() {
  return typeOracle;
}
@@ -390,7 +411,7 @@
  String jpkgName = compiledClass.getPackageName();
  JPackage pkg = typeOracle.getOrCreatePackage(jpkgName);
  boolean isIntf = (access & Opcodes.ACC_INTERFACE) != 0;
-boolean isLocalType = classData.isLocal();
+boolean isLocalType = classData.hasNoExternalName();
  String enclosingTypeName = null;
  if (enclosingClassData != null) {
enclosingTypeName =  
InternalName.toSourceName(InternalName.getClassName(enclosingClassData.getName()));
@@ -526,7 +547,7 @@
private CollectClassData processClass(CompiledClass compiledClass) {
  byte[] classBytes = compiledClass.getBytes();
  ClassReader reader = new ClassReader(classBytes);
-CollectClassData mcv = new CollectClassData(classBytes);
+CollectClassData mcv = new CollectClassData();
  ClassVisitor cv = mcv;
  if (false) {
cv = new TraceClassVisitor(cv, new PrintWriter(System.out));
@@ -688,7 +709,7 @@
  assert classData != null;
  int access = classData.getAccess();

-assert (!classData.getClassType().isLocal());
+assert (!classData.getClassType().hasNoExternalName());

  logger = logger.branch(TreeLogger.SPAM, "Found type '"
  + type.getQualifiedSourceName() + "'", null);
===
---  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java   
 
Thu Nov 12 05:54:31 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java   
 
Thu Nov 12 08:28:36 2009
@@ -60,47 +60,44 @@
   */
  Anonymous {
@Override
-  public boolean hasOuter() {
+  public boolean hasNoExternalName() {
  return true;
}
-
-  @Override
-  public boolean isLocal() {
-return true;
-  }
  },

  /**
  

[gwt-contrib] [google-web-toolkit] r6873 committed - Merge trunk r6871 into this branch...

2009-11-12 Thread codesite-noreply
Revision: 6873
Author: j...@google.com
Date: Thu Nov 12 08:23:17 2009
Log: Merge trunk r6871 into this branch

  Fix a problem getting real argument names from generic methods.
 svn merge --ignore-ancestry -c6871 \
   http://google-web-toolkit.googlecode.com/svn/trunk/ .


http://code.google.com/p/google-web-toolkit/source/detail?r=6873

Modified:
  /releases/2.0/branch-info.txt
  /releases/2.0/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java

===
--- /releases/2.0/branch-info.txt   Wed Nov 11 22:32:37 2009
+++ /releases/2.0/branch-info.txt   Thu Nov 12 08:23:17 2009
@@ -595,3 +595,8 @@
  tr...@6867 was merged into this branch
{Field.references} are now validated.
svn merge --ignore-ancestry -c 6867  
https://google-web-toolkit.googlecode.com/svn/trunk .
+
+tr...@6871 was merged into this branch
+ Fix a problem getting real argument names from generic methods.
+svn merge --ignore-ancestry -c6871 \
+  http://google-web-toolkit.googlecode.com/svn/trunk/ .
===
---  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java 
 
Wed Nov 11 11:04:31 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java 
 
Thu Nov 12 08:23:17 2009
@@ -937,14 +937,13 @@
  }

  String signature = methodData.getSignature();
-Type[] argTypes = methodData.getArgTypes();
-String[] argNames = methodData.getArgNames();
  if (signature != null) {
// If we have a signature, use it for superclass and interfaces
SignatureReader reader = new SignatureReader(signature);
ResolveMethodSignature methodResolver = new ResolveMethodSignature(
resolver, logger, method, typeParamLookup, hasReturnType,  
methodData,
-  argTypes, argNames);
+  methodData.getArgTypes(), methodData.getArgNames(),
+  methodData.hasActualArgNames());
// TraceSignatureVisitor trace = new TraceSignatureVisitor(
// methodData.getAccess());
// reader.accept(trace);
===
---  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
  
Thu Nov 12 05:54:31 2009
+++  
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
  
Thu Nov 12 08:23:17 2009
@@ -47,6 +47,7 @@
private final CollectMethodData methodData;
private final Type[] argTypes;
private final String[] argNames;
+  private final boolean argNamesAreReal;

private JType[] returnType = new JType[1];
private List params = new ArrayList();
@@ -54,10 +55,23 @@
private JTypeParameter currentParam = null;
private ArrayList bounds = null;

+  /**
+   * Resolve a method signature.
+   *
+   * @param resolver
+   * @param logger
+   * @param method
+   * @param typeParamLookup
+   * @param hasReturnType
+   * @param methodData
+   * @param argTypes
+   * @param argNames
+   * @param argNamesAreReal
+   */
public ResolveMethodSignature(Resolver resolver, TreeLogger logger,
JAbstractMethod method, TypeParameterLookup typeParamLookup,
boolean hasReturnType, CollectMethodData methodData, Type[] argTypes,
-  String[] argNames) {
+  String[] argNames, boolean argNamesAreReal) {
  this.resolver = resolver;
  this.logger = logger;
  this.method = method;
@@ -66,6 +80,7 @@
  this.methodData = methodData;
  this.argTypes = argTypes;
  this.argNames = argNames;
+this.argNamesAreReal = argNamesAreReal;
}

/**
@@ -103,7 +118,8 @@
declaredAnnotations);

// JParameter adds itself to the method
-  new JParameter(method, argType, argNames[i], declaredAnnotations);
+  new JParameter(method, argType, argNames[i], declaredAnnotations,
+  argNamesAreReal);
  }

  // Handle thrown exceptions
===
---  
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java

Thu Nov 12 05:54:31 2009
+++  
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java

Thu Nov 12 08:23:17 2009
@@ -307,7 +307,8 @@
argTypes[i] = Type.getType(paramTypes[i]);
  }
  ResolveMethodSignature methodResolver = new  
ResolveMethodSignature(resolver,
-failTreeLogger, method, lookup, true, methodData, argTypes,  
argNames);
+failTreeLogger, method, lookup, true, methodData, argTypes,  
argNames,
+false);
  new SignatureReader(signature).accept(methodResolver);
  methodResolver.finish();
}

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


[gwt-contrib] Re: Close MessageTransport socket on error

2009-11-12 Thread rdayal

http://gwt-code-reviews.appspot.com/102803/diff/1/3
File dev/core/src/com/google/gwt/dev/shell/remoteui/RemoteUI.java
(right):

http://gwt-code-reviews.appspot.com/102803/diff/1/3#newcode134
Line 134: try {
On 2009/11/12 02:27:11, mmendez wrote:
> I'm fine to move it, but is there a reason that the location matters?
It would
> be good to add an explanation.

> On 2009/11/11 21:49:53, rdayal wrote:
> > Do this before telling the Dev Mode server that its okay to shut
down.


If you don't close the socket first, it is possible that the devmode
server may shut down before this thread has a chance to close the
socket. If it is is the case that the JVM closes all sockets on
shutdown, then we're okay. Equivalently, if this thread is a non-daemon
thread, then the JVM should wait till it terminates before shutting down
the VM, in which case we should also be okay. However, if you move the
close call after calling setDone, then all of these assumptions do not
matter.

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

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


[gwt-contrib] [google-web-toolkit] r6872 committed - Fix a problem with local static classes, plus clean up naming, comment...

2009-11-12 Thread codesite-noreply
Revision: 6872
Author: j...@google.com
Date: Thu Nov 12 08:22:02 2009
Log: Fix a problem with local static classes, plus clean up naming, comments
and formatting.

Patch by: jat
Review by: rice

http://code.google.com/p/google-web-toolkit/source/detail?r=6872

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectMethodData.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTest.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/CollectClassDataTest.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
 
Thu Nov 12 06:59:32 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
 
Thu Nov 12 08:22:02 2009
@@ -93,6 +93,9 @@
/**
 * Returns the binary name of a type. This is the same name that would be
 * returned by {...@link Class#getName()} for this type.
+   *
+   * @param type TypeOracle type to get the name for
+   * @return binary name for a type
 */
public static String computeBinaryClassName(JType type) {
  JPrimitiveType primitiveType = type.isPrimitive();
@@ -231,10 +234,18 @@

private Resolver resolver;

+  /**
+   * Construct a TypeOracleMediator.
+   */
public TypeOracleMediator() {
  this(null);
}

+  /**
+   * Construct a TypeOracleMediator.
+   *
+   * @param typeOracle TypeOracle instance to use, or null to create a new  
one
+   */
// @VisibleForTesting
public TypeOracleMediator(TypeOracle typeOracle) {
  if (typeOracle == null) {
@@ -272,8 +283,12 @@

/**
 * Adds new units to an existing TypeOracle.
+   *
+   * @param logger logger to use
+   * @param units collection of compilation units to process
 */
-  public void addNewUnits(TreeLogger logger, Collection  
units) {
+  public void addNewUnits(TreeLogger logger,
+  Collection units) {
  PerfLogger.start("TypeOracleMediator.addNewUnits");
  // First collect all class data.
  classMap = new HashMap();
@@ -349,10 +364,16 @@
  PerfLogger.end();
}

+  /**
+   * @return a map from binary class names to JRealClassType.
+   */
public Map getBinaryMapper() {
  return binaryMapper;
}

+  /**
+   * @return the TypeOracle managed by the mediator.
+   */
public TypeOracle getTypeOracle() {
  return typeOracle;
}
@@ -390,7 +411,7 @@
  String jpkgName = compiledClass.getPackageName();
  JPackage pkg = typeOracle.getOrCreatePackage(jpkgName);
  boolean isIntf = (access & Opcodes.ACC_INTERFACE) != 0;
-boolean isLocalType = classData.isLocal();
+boolean isLocalType = classData.hasNoExternalName();
  String enclosingTypeName = null;
  if (enclosingClassData != null) {
enclosingTypeName =  
InternalName.toSourceName(InternalName.getClassName(enclosingClassData.getName()));
@@ -526,7 +547,7 @@
private CollectClassData processClass(CompiledClass compiledClass) {
  byte[] classBytes = compiledClass.getBytes();
  ClassReader reader = new ClassReader(classBytes);
-CollectClassData mcv = new CollectClassData(classBytes);
+CollectClassData mcv = new CollectClassData();
  ClassVisitor cv = mcv;
  if (false) {
cv = new TraceClassVisitor(cv, new PrintWriter(System.out));
@@ -688,7 +709,7 @@
  assert classData != null;
  int access = classData.getAccess();

-assert (!classData.getClassType().isLocal());
+assert (!classData.getClassType().hasNoExternalName());

  logger = logger.branch(TreeLogger.SPAM, "Found type '"
  + type.getQualifiedSourceName() + "'", null);
===
--- /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java  
 
Thu Nov 12 06:32:35 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java  
 
Thu Nov 12 08:22:02 2009
@@ -60,47 +60,44 @@
   */
  Anonymous {
@Override
-  public boolean hasOuter() {
+  public boolean hasNoExternalName() {
  return true;
}
-
-  @Override
-  public boolean isLocal() {
-return true;
-  }
  },

  /**
   * A named class defined inside a method.
   */
  Local {
-  @Override
-  public boolean hasHiddenConstructorArg() {
-return true;
-  }
+  /*
+   * Note that we do not return true for hasHiddenConstructorArg since  
Local
+   * classes inside a static method will not have one and AFAICT there  
is no
+   * way to distinguish these cases without looking up the declaring  
method.
+   * However, since we are dropping any classes for which
+   * hasNoExternalName() returns true in  
TypeOracleMediator.addNewUnits, it
+   * doesn't matter if we leave the synthetic argument in the list.
+   */

@Override
-  public boole

[gwt-contrib] Re: allow prefetching of runAsync code

2009-11-12 Thread bobv

http://gwt-code-reviews.appspot.com/102801/diff/1/43
File dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode189
Line 189: error("Multiple runASync calls are named " + name);
The error reporting needs to produce something like this in the
TreeLogger:


Multiple runAsync calls are named " foo:
   - Foo.someMethod (Foo.java:23)
   - Bar.method (Bar.java:55)

to clearly indicate where the trouble is.

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode223
Line 223: private static String nameFromClassLiteral(JClassLiteral
classLiteral) {
Why extract this when it's used once?

http://gwt-code-reviews.appspot.com/102801/diff/1/43#newcode243
Line 243: private void execImpl() throws UnableToCompleteException {
This setup is a no-go.  The behavior of the compiler really should be
that once the AST is set up, the only reason for it to stop is that
there's an internal error.

The place to do up-front validation is in UnitProcessorImpl.process().
The upside of doing it here is that incorrect usage of runAsync() can be
reported like any other compile error (source location, etc) and not as
an internal compiler error.

http://gwt-code-reviews.appspot.com/102801/diff/1/3
File
samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/3#newcode124
Line 124: private static  List list(T... elems) {
Replace this with Arrays.asList()

http://gwt-code-reviews.appspot.com/102801/diff/1/39
File
samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/39#newcode35
Line 35: @ShowcaseStyle( {
The eclipse formatter likes to inject an extra leading space with
array-valued annotations.  One trick to ensure consistent reformatting
is to say

@Annotation(value = {})

http://gwt-code-reviews.appspot.com/102801/diff/1/45
File user/src/com/google/gwt/core/client/prefetch/Prefetcher.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/45#newcode33
Line 33: public static void prefetch(Iterable resources) {
Add a singleton convenience method.

http://gwt-code-reviews.appspot.com/102801/diff/1/45#newcode51
Line 51: throw new RuntimeException("Unknown resource type: "
IllegalArgumentException

http://gwt-code-reviews.appspot.com/102801/diff/1/47
File user/src/com/google/gwt/core/client/prefetch/RunAsyncCode.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/47#newcode57
Line 57: public boolean isLoaded() {
Extract this method into the superinterface?

http://gwt-code-reviews.appspot.com/102801/diff/1/44
File
user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java
(right):

http://gwt-code-reviews.appspot.com/102801/diff/1/44#newcode146
Line 146: private static List list(int... elems) {
Arrays.asList() instead.

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

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


Re: [gwt-contrib] Error compiling using latest build from SVN

2009-11-12 Thread Bart Guijt
I noticed the svn commit message.

Thanks for your quick help, John! Much appreciated.

Cheers,

Bart Guijt
E: b...@guijt.me
T: +31 6 30408987

On 12 nov 2009, at 16:05, John Tamplin  wrote:

> Ok, this should be fixed in trunk at r6871 and will be merged to  
> releases/2.0 shortly.
>
> -- 
> John A. Tamplin
> Software Engineer (GWT), Google
> -- 
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

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

Re: [gwt-contrib] Error compiling using latest build from SVN

2009-11-12 Thread John Tamplin
Ok, this should be fixed in trunk at r6871 and will be merged to
releases/2.0 shortly.

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

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

[gwt-contrib] [google-web-toolkit] r6871 committed - This patch for a problem discussed on GWTC, fixes a problem in getting...

2009-11-12 Thread codesite-noreply
Revision: 6871
Author: j...@google.com
Date: Thu Nov 12 06:59:32 2009
Log: This patch for a problem discussed on GWTC, fixes a problem in getting  
the real
argument names.

The path through resolveMethod that uses the descriptor works fine, but the  
one
that uses a generic signature does not pass the flag that was collected  
about
whether we have real argument names or not.

Patch by: jat
Review by: rice, bgu...@gmail.com



http://code.google.com/p/google-web-toolkit/source/detail?r=6871

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
   
/trunk/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
 
Tue Nov 10 20:42:30 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
 
Thu Nov 12 06:59:32 2009
@@ -937,14 +937,13 @@
  }

  String signature = methodData.getSignature();
-Type[] argTypes = methodData.getArgTypes();
-String[] argNames = methodData.getArgNames();
  if (signature != null) {
// If we have a signature, use it for superclass and interfaces
SignatureReader reader = new SignatureReader(signature);
ResolveMethodSignature methodResolver = new ResolveMethodSignature(
resolver, logger, method, typeParamLookup, hasReturnType,  
methodData,
-  argTypes, argNames);
+  methodData.getArgTypes(), methodData.getArgNames(),
+  methodData.hasActualArgNames());
// TraceSignatureVisitor trace = new TraceSignatureVisitor(
// methodData.getAccess());
// reader.accept(trace);
===
---  
/trunk/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
 
Thu Nov 12 06:32:35 2009
+++  
/trunk/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
 
Thu Nov 12 06:59:32 2009
@@ -47,6 +47,7 @@
private final CollectMethodData methodData;
private final Type[] argTypes;
private final String[] argNames;
+  private final boolean argNamesAreReal;

private JType[] returnType = new JType[1];
private List params = new ArrayList();
@@ -54,10 +55,23 @@
private JTypeParameter currentParam = null;
private ArrayList bounds = null;

+  /**
+   * Resolve a method signature.
+   *
+   * @param resolver
+   * @param logger
+   * @param method
+   * @param typeParamLookup
+   * @param hasReturnType
+   * @param methodData
+   * @param argTypes
+   * @param argNames
+   * @param argNamesAreReal
+   */
public ResolveMethodSignature(Resolver resolver, TreeLogger logger,
JAbstractMethod method, TypeParameterLookup typeParamLookup,
boolean hasReturnType, CollectMethodData methodData, Type[] argTypes,
-  String[] argNames) {
+  String[] argNames, boolean argNamesAreReal) {
  this.resolver = resolver;
  this.logger = logger;
  this.method = method;
@@ -66,6 +80,7 @@
  this.methodData = methodData;
  this.argTypes = argTypes;
  this.argNames = argNames;
+this.argNamesAreReal = argNamesAreReal;
}

/**
@@ -103,7 +118,8 @@
declaredAnnotations);

// JParameter adds itself to the method
-  new JParameter(method, argType, argNames[i], declaredAnnotations);
+  new JParameter(method, argType, argNames[i], declaredAnnotations,
+  argNamesAreReal);
  }

  // Handle thrown exceptions
===
---  
/trunk/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java  
 
Thu Nov 12 06:32:35 2009
+++  
/trunk/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java  
 
Thu Nov 12 06:59:32 2009
@@ -307,7 +307,8 @@
argTypes[i] = Type.getType(paramTypes[i]);
  }
  ResolveMethodSignature methodResolver = new  
ResolveMethodSignature(resolver,
-failTreeLogger, method, lookup, true, methodData, argTypes,  
argNames);
+failTreeLogger, method, lookup, true, methodData, argTypes,  
argNames,
+false);
  new SignatureReader(signature).accept(methodResolver);
  methodResolver.finish();
}

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


[gwt-contrib] Re: Fix handling of real arg names in generic methods

2009-11-12 Thread John Tamplin
On Thu, Nov 12, 2009 at 9:47 AM,  wrote:

> LGTM
>

Thanks, committed to trunk at r6871, merging to releases/2.0.

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

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

[gwt-contrib] Re: FixCompoundAssignmentNarrowing

2009-11-12 Thread spoon
Thanks, Ray!  A couple of things look like they should be changed, as
indicated in the line-by-lines.

Also, it should have a test.  CompilerTest would be a decent place to
put it.


http://gwt-code-reviews.appspot.com/102811/diff/1/2
File
dev/core/src/com/google/gwt/dev/jjs/impl/PostOptimizationCompoundAssignmentNormalizer.java
(right):

http://gwt-code-reviews.appspot.com/102811/diff/1/2#newcode73
Line 73: if (x.getLhs().getType() != x.getRhs().getType()) {
We don't need to expand that many of them, do we?  I believe we are only
in trouble if the lhs is integral and the rhs is floating point.

http://gwt-code-reviews.appspot.com/102811/diff/1/2#newcode113
Line 113: private JType widenType(JType lhsType, JType rhsType) {
This isn't the Java spec.  Here is the rule from the JLS:

If either operand is of type double, the other is converted to double.
Otherwise, if either operand is of type float, the other is converted to
float.
Otherwise, if either operand is of type long, the other is converted to
long.
Otherwise, both operands are converted to type int.

The result of the operation is then the same as that of the converted
arguments.

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

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


[gwt-contrib] Re: FixCompoundAssignmentNarrowing

2009-11-12 Thread spoon

http://gwt-code-reviews.appspot.com/102811/diff/1/3
File
dev/core/src/com/google/gwt/dev/jjs/impl/CompoundAssignmentNormalizer.java
(right):

http://gwt-code-reviews.appspot.com/102811/diff/1/3#newcode409
Line 409: protected JExpression operationToReturn(JBinaryOperation op) {
Also, I think you need to sort this file.

As a nit, I don't find this name very clear.  Perhaps something like
modifyResultOperation ?

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

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


[gwt-contrib] Re: Fix handling of real arg names in generic methods

2009-11-12 Thread rice
LGTM

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

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


[gwt-contrib] [google-web-toolkit] r6870 committed - Merge r6869 from releases/2.0 into trunk. This fixes line endings and...

2009-11-12 Thread codesite-noreply
Revision: 6870
Author: j...@google.com
Date: Thu Nov 12 06:32:35 2009
Log: Merge r6869 from releases/2.0 into trunk.  This fixes line endings and
MIME types not being set properly.

svn merge --ignore-ancestry -c6869 \
   https://google-web-toolkit.googlecode.com/svn/releases/2.0 .

http://code.google.com/p/google-web-toolkit/source/detail?r=6870

Deleted:
  /trunk/dev/core/src/com/google/gwt/dev/javac/impl
Modified:
  /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitImpl.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/ContentId.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/ErrorCompilationUnit.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/GeneratedUnit.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/InvalidCompilationUnit.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/JavaSourceParser.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/Resolver.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/TypeParameterLookup.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectAnnotationData.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectFieldData.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectMethodData.java
   
/trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectReferencesVisitor.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/CollectTypeParams.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/EmptySignatureVisitor.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/ResolveClassSignature.java
   
/trunk/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
  /trunk/dev/core/src/com/google/gwt/dev/javac/asm/ResolveTypeSignature.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/JavaSourceParserTest.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/AsmTestCase.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/CollectClassDataTest.java
   
/trunk/dev/core/test/com/google/gwt/dev/javac/asm/CollectReferencesVisitorTest.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/TestHandler.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/TestHandler1.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/TestOuter0.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/TestOuter1.java
  /trunk/dev/core/test/com/google/gwt/dev/javac/asm/TestOuter2.java

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


[gwt-contrib] Re: Comment on UsingOOPHM in google-web-toolkit

2009-11-12 Thread codesite-noreply
Comment by rda...@google.com:

@mauzepeda: Thanks for providing the summary of how to make things work  
with the current state of trunk and the plugin. I don't think it is  
necessary that gwt-dev.jar be renamed to gwt-dev-linux.jar though.


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

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


[gwt-contrib] [google-web-toolkit] r6869 committed - Fix line endings and MIME types....

2009-11-12 Thread codesite-noreply
Revision: 6869
Author: j...@google.com
Date: Thu Nov 12 05:54:31 2009
Log: Fix line endings and MIME types.

Patch by: jat
Review by: scottb (TBR)

http://code.google.com/p/google-web-toolkit/source/detail?r=6869

Deleted:
  /releases/2.0/dev/core/src/com/google/gwt/dev/javac/impl
Modified:
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/CompilationUnitImpl.java
  /releases/2.0/dev/core/src/com/google/gwt/dev/javac/ContentId.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/ErrorCompilationUnit.java
  /releases/2.0/dev/core/src/com/google/gwt/dev/javac/GeneratedUnit.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/InvalidCompilationUnit.java
  /releases/2.0/dev/core/src/com/google/gwt/dev/javac/JavaSourceParser.java
  /releases/2.0/dev/core/src/com/google/gwt/dev/javac/Resolver.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/TypeParameterLookup.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectAnnotationData.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectFieldData.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectMethodData.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectReferencesVisitor.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/CollectTypeParams.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/EmptySignatureVisitor.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/ResolveClassSignature.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
   
/releases/2.0/dev/core/src/com/google/gwt/dev/javac/asm/ResolveTypeSignature.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/JavaSourceParserTest.java
  /releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/AsmTestCase.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/CollectClassDataTest.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/CollectReferencesVisitorTest.java
   
/releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java
  /releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/TestHandler.java
  /releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/TestHandler1.java
  /releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/TestOuter0.java
  /releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/TestOuter1.java
  /releases/2.0/dev/core/test/com/google/gwt/dev/javac/asm/TestOuter2.java

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


[gwt-contrib] Fix handling of local classes

2009-11-12 Thread jat
Reviewers: Dan Rice,

Description:
This patch fixes a few problems when dealing with local classes (those
defined inside a method):
  - local classes inside a static method do not have a
synthetic constructor arg passing the containing
instance, as there isn't one
  - JSORestrictionsChecker fails on local classes because the
constant pool name can be null
  - we were doing work dealing with heuristics that would
not matter ultimately as we will toss local classes from
TypeOracle anyway

In addition, I cleaned up some naming, comments, and formatting.

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

Affected files:

/src/gwt-trunk/dev/core/src/com/google/gwt/dev/javac/JSORestrictionsChecker.java
   dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
   dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java
   dev/core/src/com/google/gwt/dev/javac/asm/CollectMethodData.java
   dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTest.java
   dev/core/test/com/google/gwt/dev/javac/asm/CollectClassDataTest.java


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


[gwt-contrib] FixCompoundAssignmentNarrowing

2009-11-12 Thread cromwellian
Reviewers: Lex,

Description:
Operations like i += d where i is an int and d is a double are not
properly truncated (narrowed) to the LHS type. This patch forces i += d
to be written as i = i + d, and applies a narrowing cast as needed, e.g.
i = (int)(i + d);



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

Affected files:
   dev/core/src/com/google/gwt/dev/jjs/impl/CompoundAssignmentNormalizer.java

dev/core/src/com/google/gwt/dev/jjs/impl/PostOptimizationCompoundAssignmentNormalizer.java


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