Author: johnh
Date: Tue Apr 26 00:40:55 2011
New Revision: 1096639

URL: http://svn.apache.org/viewvc?rev=1096639&view=rev
Log:
Pull out method for setting sourcemap flags.


Modified:
    
shindig/trunk/java/gadgets/src/main/java16/org/apache/shindig/gadgets/rewrite/js/ClosureJsCompiler.java

Modified: 
shindig/trunk/java/gadgets/src/main/java16/org/apache/shindig/gadgets/rewrite/js/ClosureJsCompiler.java
URL: 
http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java16/org/apache/shindig/gadgets/rewrite/js/ClosureJsCompiler.java?rev=1096639&r1=1096638&r2=1096639&view=diff
==============================================================================
--- 
shindig/trunk/java/gadgets/src/main/java16/org/apache/shindig/gadgets/rewrite/js/ClosureJsCompiler.java
 (original)
+++ 
shindig/trunk/java/gadgets/src/main/java16/org/apache/shindig/gadgets/rewrite/js/ClosureJsCompiler.java
 Tue Apr 26 00:40:55 2011
@@ -89,14 +89,18 @@ public class ClosureJsCompiler implement
     CompilerOptions options = defaultCompilerOptions();
 
     if (outputCorrelatedJs()) {
-      options.sourceMapOutputPath = "create.out";
-      options.sourceMapFormat = SourceMap.Format.LEGACY;
-      options.sourceMapDetailLevel = SourceMap.DetailLevel.ALL;
+      setSourceMapCompilerOptions(options);
     }
     
     return options;
   }
 
+  protected void setSourceMapCompilerOptions(CompilerOptions options) {
+    options.sourceMapOutputPath = "create.out";
+    options.sourceMapFormat = SourceMap.Format.LEGACY;
+    options.sourceMapDetailLevel = SourceMap.DetailLevel.ALL;
+  }
+
   @VisibleForTesting
   Compiler newCompiler() {
     BasicErrorManager errorManager = new BasicErrorManager() {


Reply via email to