Revision: 9211
Author: [email protected]
Date: Wed Nov 10 10:12:37 2010
Log: Make supportsDevMode configurable and give it a more appropriate name. Set it to false
for SSSS linkers.

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

Modified:
 /trunk/dev/core/src/com/google/gwt/core/ext/Linker.java
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
 /trunk/user/src/com/google/gwt/junit/JUnitShell.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/core/ext/Linker.java Wed Aug 18 11:12:36 2010 +++ /trunk/dev/core/src/com/google/gwt/core/ext/Linker.java Wed Nov 10 10:12:37 2010
@@ -154,7 +154,7 @@
   /**
    * Does this linker support DevMode?
    */
-  public boolean supportsDevMode() {
+  public boolean supportsDevModeInJunit(LinkerContext context) {
     // By default, linkers do not support Dev Mode
     return false;
   }
=======================================
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java Thu Oct 28 08:33:32 2010 +++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java Wed Nov 10 10:12:37 2010
@@ -132,7 +132,7 @@
   }

   @Override
-  public boolean supportsDevMode() {
+  public boolean supportsDevModeInJunit(LinkerContext context) {
     return (getHostedFilename() != "");
   }

=======================================
--- /trunk/user/src/com/google/gwt/junit/JUnitShell.java Thu Oct 28 11:37:15 2010 +++ /trunk/user/src/com/google/gwt/junit/JUnitShell.java Wed Nov 10 07:09:21 2010
@@ -15,9 +15,11 @@
  */
 package com.google.gwt.junit;

+import com.google.gwt.core.ext.Linker;
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.core.ext.UnableToCompleteException;
 import com.google.gwt.core.ext.TreeLogger.Type;
+import com.google.gwt.core.ext.linker.impl.StandardLinkerContext;
 import com.google.gwt.core.ext.typeinfo.JClassType;
 import com.google.gwt.core.ext.typeinfo.TypeOracle;
 import com.google.gwt.dev.ArgProcessorBase;
@@ -1102,7 +1104,10 @@
     if (developmentMode) {
       // BACKWARDS COMPATIBILITY: many linkers currently fail in dev mode.
       try {
- if (!module.getActivePrimaryLinker().newInstance().supportsDevMode()) {
+        Linker l = module.getActivePrimaryLinker().newInstance();
+        StandardLinkerContext context =
+          new StandardLinkerContext(getTopLogger(), module, null);
+        if (!l.supportsDevModeInJunit(context)) {
           if (module.getLinker("std") != null) {
// TODO: unfortunately, this could be race condition between dev/prod
             module.addLinker("std");

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

Reply via email to