Author: hqm
Date: 2007-11-20 13:07:57 -0800 (Tue, 20 Nov 2007)
New Revision: 7338

Added:
   
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NullWriter.java
Modified:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
Log:
Change 20071120-hqm-8 by [EMAIL PROTECTED] on 2007-11-20 11:53:00 EST
    in /cygdrive/c/users/hqm/openlaszlo/trunk4
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Create null runtime, to get fast compiler warnings

New Features:

Bugs Fixed: LPP-NaN

Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: 

Documentation:

Release Notes:

Details:
    
This creates a runtime named "null", which is a subclass of DHTMLWriter that
stubs out all calls to the script compiler and media compiler. 


Tests:

smokecheck
ant lztest


lzc --runtime=null demos/calendar/calendar.lzx




Modified: 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
===================================================================
--- 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java   
    2007-11-20 17:04:46 UTC (rev 7337)
+++ 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java   
    2007-11-20 21:07:57 UTC (rev 7338)
@@ -36,9 +36,9 @@
     public static Logger SchemaLogger = Logger.getLogger("schema");
     
     public static List KNOWN_RUNTIMES =
-        Arrays.asList(new String[] {"swf7", "swf8", "swf9", "dhtml", "j2me", 
"svg"});
+        Arrays.asList(new String[] {"swf7", "swf8", "swf9", "dhtml", "j2me", 
"svg", "null"});
     public static List SCRIPT_RUNTIMES =
-        Arrays.asList(new String[] {"swf9", "dhtml", "j2me", "svg"});
+        Arrays.asList(new String[] {"swf9", "dhtml", "j2me", "svg", "null"});
     public static List SWF_RUNTIMES =
         Arrays.asList(new String[] {"swf7", "swf8"});
     
@@ -215,7 +215,9 @@
 
         String runtime = props.getProperty(env.RUNTIME_PROPERTY);
         // Must be kept in sync with server/sc/lzsc.py compile
-        if (SCRIPT_RUNTIMES.contains(runtime)) {
+        if ("null".equals(runtime)) {
+            return new NullWriter(props, ostr, mMediaCache, true, env);
+        } else if (SCRIPT_RUNTIMES.contains(runtime)) {
             return new DHTMLWriter(props, ostr, mMediaCache, true, env);
         } else {
             return new SWFWriter(props, ostr, mMediaCache, true, env);

Modified: 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java   
2007-11-20 17:04:46 UTC (rev 7337)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java   
2007-11-20 21:07:57 UTC (rev 7338)
@@ -37,8 +37,8 @@
         "  Doesn't flush script cache before compiling.",
         "",
         "Output options:",
-        "--runtime=[swf7|swf8|swf9|dhtml|j2me|svg]",
-        "  Compile to swf7, swf8, swf9, dhtml, j2me, svg",
+        "--runtime=[swf7|swf8|swf9|dhtml|j2me|svg|null]",
+        "  Compile to swf7, swf8, swf9, dhtml, j2me, svg, null",
         "--dir outputdir",
         "  Output directory.",
         "-c | --compile",

Added: 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NullWriter.java


Property changes on: 
openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NullWriter.java
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to