Revision: 6292 Author: [email protected] Date: Fri Oct 2 16:13:44 2009 Log: Clean up logging, add HelpInfo anchor text, remove bogus thread for JUnitShell.
http://code.google.com/p/google-web-toolkit/source/detail?r=6292 Modified: /changes/jat/abstractui/dev/core/src/com/google/gwt/core/ext/TreeLogger.java /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/HostedModeBase.java /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/SwingUI.java /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java /changes/jat/abstractui/dev/oophm/src/com/google/gwt/dev/shell/HostedModePluginObject.java /changes/jat/abstractui/dev/oophm/src/com/google/gwt/dev/shell/JavaObject.java /changes/jat/abstractui/user/src/com/google/gwt/junit/JUnitShell.java ======================================= --- /changes/jat/abstractui/dev/core/src/com/google/gwt/core/ext/TreeLogger.java Tue May 13 16:18:46 2008 +++ /changes/jat/abstractui/dev/core/src/com/google/gwt/core/ext/TreeLogger.java Fri Oct 2 16:13:44 2009 @@ -28,9 +28,17 @@ * information is interpreted and displayed is implementation-dependent. */ public abstract static class HelpInfo { + /** - * If non-null, provides a URL containing extra information about the - * problem. + * @return the text to use for an anchor if not null and getURL is non-null. + */ + public String getAnchorText() { + return null; + } + + /** + * @return a URL containing extra information about the problem, or null if + * none. */ public URL getURL() { return null; ======================================= --- /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/HostedModeBase.java Fri Oct 2 11:49:06 2009 +++ /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/HostedModeBase.java Fri Oct 2 16:13:44 2009 @@ -739,7 +739,7 @@ * @param logger TreeLogger instance to use */ public void launchStartupUrls(final TreeLogger logger) { - ensureOophmListener(); + ensureCodeServerListener(); String startupURL = ""; try { for (String prenormalized : options.getStartupURLs()) { @@ -867,14 +867,14 @@ } // Accept connections from OOPHM clients - ensureOophmListener(); + ensureCodeServerListener(); return true; } protected abstract int doStartUpServer(); - protected void ensureOophmListener() { + protected void ensureCodeServerListener() { if (listener == null) { codeServerPort = options.getPortHosted(); listener = new BrowserListener(getTopLogger(), codeServerPort, ======================================= --- /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/SwingUI.java Fri Oct 2 11:49:06 2009 +++ /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/SwingUI.java Fri Oct 2 16:13:44 2009 @@ -167,7 +167,9 @@ @Override public void initialize() { if (hostedModeBase.isHeadless()) { - topLogger = new PrintWriterTreeLogger(); + PrintWriterTreeLogger logger = new PrintWriterTreeLogger(); + logger.setMaxDetail(hostedModeBase.options.getLogLevel()); + topLogger = logger; return; } ImageIcon gwtIcon = loadImageIcon("icon24.png"); ======================================= --- /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java Fri Jun 5 07:19:33 2009 +++ /changes/jat/abstractui/dev/core/src/com/google/gwt/dev/shell/CheckForUpdates.java Fri Oct 2 16:13:44 2009 @@ -281,16 +281,22 @@ } } - public static void logUpdateAvailable(TreeLogger logger, UpdateResult result) { + public static void logUpdateAvailable(TreeLogger logger, + UpdateResult result) { if (result != null) { final URL url = result.getURL(); logger.log(TreeLogger.WARN, "A new version of GWT (" + result.getNewVersion() + ") is available", null, new HelpInfo() { - @Override - public URL getURL() { - return url; - } - }); + @Override + public String getAnchorText() { + return "Release Notes"; + } + + @Override + public URL getURL() { + return url; + } + }); } } ======================================= --- /changes/jat/abstractui/dev/oophm/src/com/google/gwt/dev/shell/HostedModePluginObject.java Tue Sep 29 11:27:01 2009 +++ /changes/jat/abstractui/dev/oophm/src/com/google/gwt/dev/shell/HostedModePluginObject.java Fri Oct 2 16:13:44 2009 @@ -161,9 +161,6 @@ return false; } // TODO: add whitelist and default-port support? - System.out.println("connect(url=" + url + ", sessionKey=" + sessionKey - + ", address=" + address + ", module=" + module + ", version=" - + version + "), window=" + System.identityHashCode(window) + ")"); try { HtmlUnitSessionHandler htmlUnitSessionHandler = new HtmlUnitSessionHandler(window); ======================================= --- /changes/jat/abstractui/dev/oophm/src/com/google/gwt/dev/shell/JavaObject.java Wed Sep 16 11:50:04 2009 +++ /changes/jat/abstractui/dev/oophm/src/com/google/gwt/dev/shell/JavaObject.java Fri Oct 2 16:13:44 2009 @@ -1,5 +1,5 @@ /* - * Copyright 2008 Google Inc. + * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -174,5 +174,4 @@ int getRefId() { return objectRef; } - -} +} ======================================= --- /changes/jat/abstractui/user/src/com/google/gwt/junit/JUnitShell.java Fri Oct 2 11:49:06 2009 +++ /changes/jat/abstractui/user/src/com/google/gwt/junit/JUnitShell.java Fri Oct 2 16:13:44 2009 @@ -85,26 +85,6 @@ */ @SuppressWarnings("deprecation") public class JUnitShell extends GWTShell { - - /** - * Thread to process the message queue until we are done. - */ - public class MessageQueueThread extends Thread { - @Override - public void run() { - while (true) { - boolean stillGoing = notDone(); - if (!stillGoing) { - setDone(); - break; - } - try { - Thread.sleep(100); - } catch (InterruptedException e) { - } - } - } - } /** * A strategy for running the test. @@ -697,14 +677,13 @@ + (developmentMode ? "development" : "production") + " mode"); return false; } - new MessageQueueThread().start(); return true; } @Override - protected void ensureOophmListener() { + protected void ensureCodeServerListener() { if (developmentMode) { - super.ensureOophmListener(); + super.ensureCodeServerListener(); } } @@ -737,7 +716,8 @@ } userAgentList += remoteUserAgents[i]; } - System.out.println("All clients connected (Limiting future permutations to: " + getTopLogger().log(TreeLogger.INFO, + "All clients connected (Limiting future permutations to: " + userAgentList + ")"); } --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
