incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmue...@apache.org
Subject [18/27] git commit: closes #35
Date Tue, 03 Jan 2012 18:39:31 GMT
closes #35


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/commit/9f1c7663
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/tree/9f1c7663
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/diff/9f1c7663

Branch: refs/heads/master
Commit: 9f1c7663e5da38d29df3e5ed1948ae45c6784b09
Parents: 1e50ade
Author: Patrick Mueller <pmuellr@yahoo.com>
Authored: Wed Oct 5 14:41:04 2011 -0400
Committer: Patrick Mueller <pmuellr@yahoo.com>
Committed: Wed Oct 5 14:41:04 2011 -0400

----------------------------------------------------------------------
 weinre.build/.gitignore                            |    1 +
 weinre.build/build.xml                             |  206 +++++----
 weinre.build/get-vendor.xml                        |   87 ++--
 weinre.build/scripts/build-client-html.py          |   34 +-
 weinre.build/scripts/build-css-properties.py       |   18 +-
 weinre.build/scripts/collect-all-json-idl.py       |   28 +-
 weinre.build/vendor.properties                     |   12 +-
 weinre.web/client/ExtensionRegistryStub.js         |    4 +-
 weinre.web/client/InspectorBackendStub.js          |    4 +-
 weinre.web/client/InspectorFrontendHostStub.js     |    6 +-
 weinre.web/demo/weinre-demo-pieces.html            |    8 +-
 weinre.web/index.html                              |   22 +-
 .../modules-scoop/weinre/client/Client.scoop       |  161 ++++++
 .../weinre/client/ConnectorList.scoop              |  157 ++++++
 .../modules-scoop/weinre/client/DOMTemplates.scoop |   74 +++
 .../weinre/client/ExtensionRegistryImpl.scoop      |   35 ++
 .../weinre/client/InspectorBackendImpl.scoop       |   73 +++
 .../weinre/client/InspectorFrontendHostImpl.scoop  |   96 ++++
 .../modules-scoop/weinre/client/RemotePanel.scoop  |  255 ++++++++++
 .../weinre/client/WeinreClientEventsImpl.scoop     |  105 ++++
 .../client/WeinreExtraTargetEventsImpl.scoop       |   48 ++
 .../modules-scoop/weinre/common/Binding.scoop      |   20 +
 .../modules-scoop/weinre/common/Callback.scoop     |   69 +++
 .../weinre/common/EventListeners.scoop             |   56 ++
 weinre.web/modules-scoop/weinre/common/Ex.scoop    |   30 ++
 .../modules-scoop/weinre/common/IDGenerator.scoop  |   53 ++
 .../modules-scoop/weinre/common/IDLTools.scoop     |  123 +++++
 .../weinre/common/MessageDispatcher.scoop          |  204 ++++++++
 .../modules-scoop/weinre/common/Native.scoop       |   43 ++
 .../modules-scoop/weinre/common/StackTrace.scoop   |   55 ++
 .../modules-scoop/weinre/common/WebSocketXhr.scoop |  211 ++++++++
 .../modules-scoop/weinre/common/Weinre.scoop       |   80 +++
 .../modules-scoop/weinre/target/CSSStore.scoop     |  391 +++++++++++++++
 .../weinre/target/CheckForProblems.scoop           |   28 +
 .../modules-scoop/weinre/target/Console.scoop      |  169 +++++++
 .../weinre/target/ElementHighlighter.scoop         |  156 ++++++
 .../weinre/target/InjectedScriptHostImpl.scoop     |   52 ++
 .../modules-scoop/weinre/target/NodeStore.scoop    |  235 +++++++++
 .../modules-scoop/weinre/target/SqlStepper.scoop   |   92 ++++
 .../modules-scoop/weinre/target/Target.scoop       |  212 ++++++++
 .../modules-scoop/weinre/target/Timeline.scoop     |  326 ++++++++++++
 .../target/WeinreExtraClientCommandsImpl.scoop     |   24 +
 .../weinre/target/WeinreTargetEventsImpl.scoop     |   39 ++
 .../modules-scoop/weinre/target/WiCSSImpl.scoop    |  156 ++++++
 .../weinre/target/WiConsoleImpl.scoop              |   36 ++
 .../modules-scoop/weinre/target/WiDOMImpl.scoop    |  188 +++++++
 .../weinre/target/WiDOMStorageImpl.scoop           |  170 +++++++
 .../weinre/target/WiDatabaseImpl.scoop             |  171 +++++++
 .../weinre/target/WiInspectorImpl.scoop            |   65 +++
 .../weinre/target/WiRuntimeImpl.scoop              |   55 ++
 weinre.web/modules/weinre/client/Client.coffee     |  140 +++++
 weinre.web/modules/weinre/client/Client.scoop      |  161 ------
 .../modules/weinre/client/ConnectorList.coffee     |  138 +++++
 .../modules/weinre/client/ConnectorList.scoop      |  157 ------
 .../modules/weinre/client/DOMTemplates.coffee      |   57 +++
 .../modules/weinre/client/DOMTemplates.scoop       |   74 ---
 .../weinre/client/ExtensionRegistryImpl.coffee     |   35 ++
 .../weinre/client/ExtensionRegistryImpl.scoop      |   35 --
 .../weinre/client/InspectorBackendImpl.coffee      |   70 +++
 .../weinre/client/InspectorBackendImpl.scoop       |   73 ---
 .../weinre/client/InspectorFrontendHostImpl.coffee |   87 ++++
 .../weinre/client/InspectorFrontendHostImpl.scoop  |   96 ----
 .../modules/weinre/client/RemotePanel.coffee       |  211 ++++++++
 weinre.web/modules/weinre/client/RemotePanel.scoop |  255 ----------
 .../weinre/client/WeinreClientEventsImpl.coffee    |   91 ++++
 .../weinre/client/WeinreClientEventsImpl.scoop     |  105 ----
 .../client/WeinreExtraTargetEventsImpl.coffee      |   35 ++
 .../client/WeinreExtraTargetEventsImpl.scoop       |   48 --
 weinre.web/modules/weinre/common/Binding.coffee    |   26 +
 weinre.web/modules/weinre/common/Binding.scoop     |   20 -
 weinre.web/modules/weinre/common/Callback.coffee   |   72 +++
 weinre.web/modules/weinre/common/Callback.scoop    |   69 ---
 .../modules/weinre/common/EventListeners.coffee    |   56 ++
 .../modules/weinre/common/EventListeners.scoop     |   56 --
 weinre.web/modules/weinre/common/Ex.coffee         |   31 ++
 weinre.web/modules/weinre/common/Ex.scoop          |   30 --
 .../modules/weinre/common/IDGenerator.coffee       |   41 ++
 weinre.web/modules/weinre/common/IDGenerator.scoop |   53 --
 weinre.web/modules/weinre/common/IDLTools.coffee   |  112 ++++
 weinre.web/modules/weinre/common/IDLTools.scoop    |  123 -----
 .../modules/weinre/common/MessageDispatcher.coffee |  179 +++++++
 .../modules/weinre/common/MessageDispatcher.scoop  |  204 --------
 .../modules/weinre/common/MethodNamer.coffee       |   25 +
 weinre.web/modules/weinre/common/Native.coffee     |   43 ++
 weinre.web/modules/weinre/common/Native.scoop      |   43 --
 weinre.web/modules/weinre/common/StackTrace.coffee |   55 ++
 weinre.web/modules/weinre/common/StackTrace.scoop  |   55 --
 .../modules/weinre/common/WebSocketXhr.coffee      |  202 ++++++++
 .../modules/weinre/common/WebSocketXhr.scoop       |  211 --------
 weinre.web/modules/weinre/common/Weinre.coffee     |   97 ++++
 weinre.web/modules/weinre/common/Weinre.scoop      |   80 ---
 weinre.web/modules/weinre/target/CSSStore.coffee   |  346 +++++++++++++
 weinre.web/modules/weinre/target/CSSStore.scoop    |  391 ---------------
 .../modules/weinre/target/CheckForProblems.coffee  |   30 ++
 .../modules/weinre/target/CheckForProblems.scoop   |   28 -
 weinre.web/modules/weinre/target/Console.coffee    |  164 ++++++
 weinre.web/modules/weinre/target/Console.scoop     |  169 -------
 .../weinre/target/ElementHighlighter.coffee        |  119 +++++
 .../modules/weinre/target/ElementHighlighter.scoop |  156 ------
 .../weinre/target/InjectedScriptHostImpl.coffee    |   50 ++
 .../weinre/target/InjectedScriptHostImpl.scoop     |   52 --
 weinre.web/modules/weinre/target/NodeStore.coffee  |  219 ++++++++
 weinre.web/modules/weinre/target/NodeStore.scoop   |  235 ---------
 weinre.web/modules/weinre/target/SqlStepper.coffee |   91 ++++
 weinre.web/modules/weinre/target/SqlStepper.scoop  |   92 ----
 weinre.web/modules/weinre/target/Target.coffee     |  202 ++++++++
 weinre.web/modules/weinre/target/Target.scoop      |  212 --------
 weinre.web/modules/weinre/target/Timeline.coffee   |  348 +++++++++++++
 weinre.web/modules/weinre/target/Timeline.scoop    |  326 ------------
 .../target/WeinreExtraClientCommandsImpl.coffee    |   27 +
 .../target/WeinreExtraClientCommandsImpl.scoop     |   24 -
 .../weinre/target/WeinreTargetEventsImpl.coffee    |   40 ++
 .../weinre/target/WeinreTargetEventsImpl.scoop     |   39 --
 weinre.web/modules/weinre/target/WiCSSImpl.coffee  |  122 +++++
 weinre.web/modules/weinre/target/WiCSSImpl.scoop   |  156 ------
 .../modules/weinre/target/WiConsoleImpl.coffee     |   36 ++
 .../modules/weinre/target/WiConsoleImpl.scoop      |   36 --
 weinre.web/modules/weinre/target/WiDOMImpl.coffee  |  155 ++++++
 weinre.web/modules/weinre/target/WiDOMImpl.scoop   |  188 -------
 .../modules/weinre/target/WiDOMStorageImpl.coffee  |  137 +++++
 .../modules/weinre/target/WiDOMStorageImpl.scoop   |  170 -------
 .../modules/weinre/target/WiDatabaseImpl.coffee    |  158 ++++++
 .../modules/weinre/target/WiDatabaseImpl.scoop     |  171 -------
 .../modules/weinre/target/WiInspectorImpl.coffee   |   51 ++
 .../modules/weinre/target/WiInspectorImpl.scoop    |   65 ---
 .../modules/weinre/target/WiRuntimeImpl.coffee     |   49 ++
 .../modules/weinre/target/WiRuntimeImpl.scoop      |   55 --
 127 files changed, 8898 insertions(+), 4705 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.build/.gitignore
----------------------------------------------------------------------
diff --git a/weinre.build/.gitignore b/weinre.build/.gitignore
index b1713a9..cdd5de8 100644
--- a/weinre.build/.gitignore
+++ b/weinre.build/.gitignore
@@ -3,5 +3,6 @@ cached
 out
 tmp
 vendor
+node_modules
 
 personal.properties
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.build/build.xml
----------------------------------------------------------------------
diff --git a/weinre.build/build.xml b/weinre.build/build.xml
index 1826ebd..290139a 100644
--- a/weinre.build/build.xml
+++ b/weinre.build/build.xml
@@ -1,27 +1,27 @@
 <!--
  * weinre is available under *either* the terms of the modified BSD license *or* the
  * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
+ *
  * Copyright (c) 2010, 2011 IBM Corporation
 -->
 
-<project name="build" default="build" basedir="."> 
+<project name="build" default="build" basedir=".">
 
     <!-- ============================================================
          set properties
          ============================================================ -->
-    
+
     <property file="personal.properties" />
     <property file="build.properties" />
     <property file="vendor.properties" />
 
     <!-- hint: override in your personal.properties -->
     <property name="BUILDER" value="The Unknown Builder"/>
-    
+
     <basename property="ant.file.basename" file="${ant.file}"/>
 
     <available property="VENDOR_FOUND"   file="${VENDOR}"/>
-    
+
     <tstamp>
         <format property="TSTAMP_STARTED" pattern="HH:mm:ss"/>
     </tstamp>
@@ -29,14 +29,14 @@
     <tstamp>
         <format property="BUILD_NUMBER_DATE" pattern="yyyy-MM-dd--HH-mm-ss" timezone="GMT"/>
     </tstamp>
-    
+
     <property name="BUILD_NUMBER" value="${WEINRE_VERSION}build-${BUILD_NUMBER_DATE}"/>
-    
-    
+
+
     <!-- ============================================================
          main entry point
          ============================================================ -->
-    
+
     <target name="build" depends="build-dev">
         <antcall target="build-jar"/>
         <antcall target="build-ui-jar"/>
@@ -53,12 +53,12 @@
     <target name="clean">
         <delete dir="${OUT}"/>
         <mkdir  dir="${OUT}"/> <!-- this is an Eclipse source folder! -->
-        
+
         <delete dir="${TMP}"/>
         <delete dir="${CACHED}"/>
         <delete dir="${VENDOR}"/>
     </target>
-    
+
     <!-- ============================================================
          development-time build
          ============================================================ -->
@@ -66,14 +66,14 @@
     <target name="build-dev">
         <delete dir="${OUT}"/>
         <mkdir  dir="${OUT}"/>
-        
-        <property 
+
+        <property
             name  = "build-info-text"
             value = "weinre build ${BUILD_NUMBER} by ${BUILDER}"
         />
-        
+
         <echo file="${OUT}/build-info.txt" message="${build-info-text}"/>
-        
+
         <antcall target="build-vendor"/>
         <antcall target="compile-java"/>
         <antcall target="build-web"/>
@@ -85,7 +85,7 @@
         <tstamp>
             <format property="TSTAMP_FINISHED" pattern="HH:mm:ss"/>
         </tstamp>
-        
+
         <property name="MESSAGE_FINISHED" value="at ${TSTAMP_FINISHED} for ${ant.file}:build-dev"/>
 
         <antcall target="finished"/>
@@ -100,7 +100,7 @@
         <delete dir="../${PROJECT_SERVER}/bin"/>
         <mkdir  dir="../${PROJECT_SERVER}/bin"/>
 
-        <javac 
+        <javac
             srcdir            = "../${PROJECT_SERVER}/src"
             destdir           = "../${PROJECT_SERVER}/bin"
             debug             = "true"
@@ -113,11 +113,11 @@
             <classpath path="../${PROJECT_BUILD}/vendor/jetty/servlet-api.jar"/>
             <compilerarg value="-Xlint"/>
         </javac>
-        
+
         <delete dir="../${PROJECT_APPLICATION}/bin"/>
         <mkdir  dir="../${PROJECT_APPLICATION}/bin"/>
-        
-        <javac 
+
+        <javac
             srcdir            = "../${PROJECT_APPLICATION}/src"
             destdir           = "../${PROJECT_APPLICATION}/bin"
             debug             = "true"
@@ -129,9 +129,9 @@
             <classpath path="../${PROJECT_BUILD}/vendor/swt/cocoa-macosx-x86_64/swt.jar"/>
             <compilerarg value="-Xlint"/>
         </javac>
-        
+
     </target>
-        
+
     <!-- ============================================================
          build vendor libs
          ============================================================ -->
@@ -139,7 +139,7 @@
     <target name="build-vendor" unless="VENDOR_FOUND">
         <ant antfile="get-vendor.xml"/>
     </target>
-        
+
     <!-- ============================================================
          basic web resources
          ============================================================ -->
@@ -147,22 +147,50 @@
     <target name="build-web">
         <delete dir="${WEB}" />
         <mkdir  dir="${WEB}" />
-        
+
         <delete dir="${TMP}" />
         <mkdir  dir="${TMP}" />
 
+<!--
         <echo message="compiling scoop modules"/>
         <exec executable="python" failonerror="true" failifexecutionfails="true">
             <arg  file="vendor/scooj/scoopc.py"/>
-            <arg value="--out"/>
+            <arg value="-o"/>
             <arg  file="${TMP}/modules"/>
             <arg  file="../${PROJECT_WEB}/modules"/>
         </exec>
-            
+-->
+
+        <echo message="compiling CoffeeScript modules"/>
+        <mkdir  dir="${TMP}/modules/weinre/client" />
+        <mkdir  dir="${TMP}/modules/weinre/common" />
+        <mkdir  dir="${TMP}/modules/weinre/target" />
+
+        <echo message="compiling CoffeeScript files in: ${PROJECT_WEB}/modules/weinre/client"/>
+        <exec executable="sh" failonerror="true" failifexecutionfails="true">
+            <arg value="-c"/>
+            <arg value="node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/client ../${PROJECT_WEB}/modules/weinre/client/*.coffee"/>
+        </exec>
+
+        <echo message="compiling CoffeeScript files in: ${PROJECT_WEB}/modules/weinre/common"/>
+        <exec executable="sh" failonerror="true" failifexecutionfails="true">
+            <arg value="-c"/>
+            <arg value="node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/common ../${PROJECT_WEB}/modules/weinre/common/*.coffee"/>
+        </exec>
+
+        <echo message="compiling CoffeeScript files in: ${PROJECT_WEB}/modules/weinre/target"/>
+        <exec executable="sh" failonerror="true" failifexecutionfails="true">
+            <arg value="-c"/>
+            <arg value="node_modules/.bin/coffee --compile --bare --output ${TMP}/modules/weinre/target ../${PROJECT_WEB}/modules/weinre/target/*.coffee"/>
+        </exec>
+
+
+<!--
         <copy todir="${TMP}/modules">
             <fileset file="${VENDOR}/scooj/scooj.js"/>
         </copy>
-        
+-->
+
         <echo message="transportd-izing modules"/>
         <exec executable="python" failonerror="true" failifexecutionfails="true">
             <arg  file="vendor/modjewel/module2transportd.py"/>
@@ -175,11 +203,11 @@
         <copy todir="${WEB}">
             <fileset file="${VENDOR}/modjewel/modjewel-require.js"/>
         </copy>
-        
+
         <copy todir="${WEB}">
             <fileset file="${VENDOR}/json2/json2.js"/>
         </copy>
-        
+
         <copy todir="${WEB}">
             <fileset dir="../${PROJECT_WEB}">
                 <exclude name="versions.js"/>
@@ -193,23 +221,23 @@
         </copy>
 
         <echo message="building InjectedScript.js"/>
-        <echo 
+        <echo
             file    = "${WEB}/weinre/target/InjectedScript.js"
             message = "var injectedScriptConstructor = ${line.separator}"
         />
-        <concat 
+        <concat
             destfile = "${WEB}/weinre/target/InjectedScript.js"
             append   = "true"
         >
             <fileset file="${VENDOR}/webkit/WebCore/inspector/InjectedScriptSource.js"/>
         </concat>
-            
+
         <echo message="building versions.js"/>
         <copy todir="${WEB}">
             <fileset dir="../${PROJECT_WEB}">
                 <include name="versions.js"/>
             </fileset>
-        
+
             <filterset>
                 <filter token="WEINRE_VERSION"             value="${WEINRE_VERSION}"/>
                 <filter token="BUILD_NUMBER"               value="${BUILD_NUMBER}"/>
@@ -233,7 +261,7 @@
             <arg value="vendor/webkit/WebCore/CSSPropertyNames.in"/>
             <arg value="${WEB}/add-css-properties.js"/>
         </exec>
-        
+
     </target>
 
     <!-- ============================================================
@@ -243,9 +271,9 @@
     <target name="build-doc">
 
         <mkdir  dir="${WEB}/doc" />
-        
+
         <copy todir="${WEB}/doc" file="${OUT}/build-info.txt"/>
-        
+
         <build-html name="Building"     oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
         <build-html name="Home"         oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
         <build-html name="Installing"   oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
@@ -255,17 +283,17 @@
         <build-html name="Security"     oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
         <build-html name="TestDrive"    oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
         <build-html name="ChangeLog"    oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
-        
+
         <copy file="${WEB}/doc/Home.html" tofile="${WEB}/doc/index.html"/>
-        
+
         <copy todir="${WEB}/doc/images" file="../${PROJECT_WEB}/images/weinre-icon-64x64.png"/>
 
         <copy todir="${WEB}/doc/css">     <fileset dir="../${PROJECT_DOC}/css"/>     </copy>
         <copy todir="${WEB}/doc/images">  <fileset dir="../${PROJECT_DOC}/images"/>  </copy>
         <copy todir="${WEB}/doc/scripts"> <fileset dir="../${PROJECT_DOC}/scripts"/> </copy>
-        
+
     </target>
-    
+
     <!-- ============================================================
          convert IDL to JSON (cached)
          ============================================================ -->
@@ -275,21 +303,21 @@
             <srcfiles dir="../${PROJECT_SERVER}/interfaces"    includes="*.idl"/>
             <srcfiles dir="${VENDOR}/webkit/WebCore/inspector" includes="*.idl"/>
         </uptodate>
-        
+
         <antcall target="build-json-idl-fresh"/>
-        
+
         <copy todir="${WEB}/interfaces"> <fileset dir="${CACHED}/json-idl"/></copy>
     </target>
-    
+
     <!-- ============================================================
          convert IDL to JSON (slow part)
          ============================================================ -->
-    
+
     <target name="build-json-idl-fresh" unless="JSON_IDL_UPTODATE">
 
         <delete dir="${CACHED}/json-idl"/>
         <mkdir  dir="${CACHED}/json-idl"/>
-        
+
         <simple-idl2json name="WeinreClientCommands"      oDir="${CACHED}/json-idl" iDir="../${PROJECT_SERVER}/interfaces"/>
         <simple-idl2json name="WeinreClientEvents"        oDir="${CACHED}/json-idl" iDir="../${PROJECT_SERVER}/interfaces"/>
         <simple-idl2json name="WeinreTargetCommands"      oDir="${CACHED}/json-idl" iDir="../${PROJECT_SERVER}/interfaces"/>
@@ -298,12 +326,12 @@
         <simple-idl2json name="WeinreExtraTargetEvents"   oDir="${CACHED}/json-idl" iDir="../${PROJECT_SERVER}/interfaces"/>
 
         <simple-idl2json name="InjectedScriptHost"    oDir="${CACHED}/json-idl" iDir="${VENDOR}/webkit/WebCore/inspector"/>
-        
+
         <simple-idl2json name="Inspector"             oDir="${CACHED}/json-idl" iDir="${VENDOR}/webkit/WebCore/inspector">
             <arg value="--anyType"/>
             <arg value="Value"/>
         </simple-idl2json>
-        
+
         <simple-idl2json name="InspectorFrontendHost" oDir="${CACHED}/json-idl" iDir="${VENDOR}/webkit/WebCore/inspector">
             <arg value="--anyType"/>
             <arg value="MouseEvent"/>
@@ -329,24 +357,24 @@
          ============================================================ -->
 
     <target name="build-target">
-        
+
         <mkdir dir="${WEB}/target"/>
-        
+
         <exec executable="python" failonerror="true" failifexecutionfails="true">
             <arg file="scripts/build-target-scripts.py"/>
             <arg file="../${PROJECT_WEB}/demo/weinre-demo-pieces.html"/>
             <arg file="${WEB}"/>
             <arg file="${WEB}/target"/>
         </exec>
-        
+
     </target>
 
     <!-- ============================================================
          build the web/client files
          ============================================================ -->
-        
+
     <target name="build-client">
-        
+
         <copy todir="${WEB}/client/nls/English.lproj">
             <fileset file="${VENDOR}/webkit/WebCore/English.lproj/localizedStrings.js"/>
         </copy>
@@ -359,51 +387,51 @@
             <arg file="scripts/build-client-html.py"/>
             <arg file="${WEB}"/>
         </exec>
-        
+
     </target>
-    
+
     <!-- ============================================================
          build the main jar
          ============================================================ -->
-        
+
     <target name="build-jar">
-        
+
         <jar destfile="${OUT}/weinre.jar">
             <manifest>
                 <attribute name="Built-By" value="${ant.file.basename} - ${ant.project.name}"/>
                 <attribute name="Main-Class" value="weinre.server.Main"/>
             </manifest>
-            
+
             <fileset file="${OUT}/build-info.txt"/>
 
             <zipfileset src="${VENDOR}/jetty/jetty.jar">
                 <exclude name="about*.html"/>
                 <exclude name="META-INF/**/*"/>
             </zipfileset>
-            
+
             <zipfileset src="${VENDOR}/jetty/servlet-api.jar">
                 <exclude name="META-INF/**/*"/>
             </zipfileset>
-            
+
             <zipfileset src="${VENDOR}/cli/commons-cli.jar">
                 <exclude name="META-INF/**/*"/>
             </zipfileset>
-            
+
             <zipfileset src="${VENDOR}/json4j/json4j.jar">
                 <exclude name="META-INF/**/*"/>
             </zipfileset>
-            
+
             <fileset dir="../${PROJECT_SERVER}/bin"/>
-                
+
             <zipfileset dir="${WEB}" prefix="web"/>
         </jar>
-        
+
     </target>
 
     <!-- ============================================================
          build the ui jar
          ============================================================ -->
-        
+
     <target name="build-ui-jar">
 
         <fileset dir="../${PROJECT_APPLICATION}/bin"/>
@@ -413,22 +441,22 @@
                 <attribute name="Built-By" value="${ant.file.basename} - ${ant.project.name}"/>
                 <attribute name="Main-Class" value="weinre.application.GUIMain"/>
             </manifest>
-            
+
             <fileset file="${OUT}/build-info.txt"/>
-            
+
             <fileset dir="../${PROJECT_APPLICATION}/bin"/>
-            
+
             <zipfileset src="${VENDOR}/swt/cocoa-macosx-x86_64/swt.jar">
                 <exclude name="META-INF/**/*"/>
             </zipfileset>
         </jar>
-        
+
     </target>
 
     <!-- ============================================================
          build the mac application
          ============================================================ -->
-        
+
     <target name="build-application-mac">
         <delete dir="${OUT}/applications/mac"/>
         <mkdir  dir="${OUT}/applications/mac/weinre.app"/>
@@ -438,7 +466,7 @@
                 <exclude name="**/Info.plist"/>
             </fileset>
         </copy>
-        
+
         <copy todir="${OUT}/applications/mac/weinre.app">
             <fileset dir="../${PROJECT_APPLICATION}/resources/macosx/weinre.app">
                 <include name="**/Info.plist"/>
@@ -447,25 +475,25 @@
                 <filter token="VERSION" value="${WEINRE_VERSION}"/>
             </filterset>
         </copy>
-        
+
         <chmod file="${OUT}/applications/mac/weinre.app/Contents/MacOS/launcher" perm="+x"/>
         <copy todir="${OUT}/applications/mac/weinre.app/Contents/MacOS" file="${OUT}/weinre.jar" />
         <copy todir="${OUT}/applications/mac/weinre.app/Contents/MacOS" file="${OUT}/weinre-ui.jar"/>
         <copy todir="${OUT}/applications/mac/weinre.app/Contents/Resources" file="${OUT}/build-info.txt"/>
-        
+
     </target>
 
     <!-- ============================================================
          build the archives
          ============================================================ -->
     <target name="build-archives">
-        
+
         <!-- =================================== -->
         <delete dir="${OUT}/archives"/>
         <mkdir  dir="${OUT}/archives"/>
-        
+
         <delete dir="${OUT}/files"/>
-        
+
         <delete dir="${OUT}/files/weinre-jar"/>
         <mkdir  dir="${OUT}/files/weinre-jar"/>
         <copy todir="${OUT}/files/weinre-jar" file="${OUT}/build-info.txt"/>
@@ -487,7 +515,7 @@
             <fileset dir="${OUT}/applications/mac"/>
         </copy>
         <chmod file="${OUT}/files/weinre-mac/weinre.app/Contents/MacOS/launcher" perm="+x"/>
-        
+
         <!-- ant's zip task doesn't preserve permission bits -->
         <exec executable="zip" dir="${OUT}/files">
             <arg value="-q"/>
@@ -503,7 +531,7 @@
         <copy todir="${OUT}/files/weinre-doc">
             <fileset dir="${OUT}/web/doc"/>
         </copy>
-        
+
         <!-- ant's zip task doesn't preserve permission bits -->
         <exec executable="zip" dir="${OUT}/files">
             <arg value="-q"/>
@@ -521,7 +549,7 @@
         <copy todir="${OUT}/files/weinre-src/weinre.doc">         <fileset dir="../weinre.doc"         excludes="**/bin/"/></copy>
         <copy todir="${OUT}/files/weinre-src/weinre.server">      <fileset dir="../weinre.server"      excludes="**/bin/"/></copy>
         <copy todir="${OUT}/files/weinre-src/weinre.web">         <fileset dir="../weinre.web"         excludes="**/bin/"/></copy>
-        
+
         <!-- ant's zip task doesn't preserve permission bits -->
         <exec executable="zip" dir="${OUT}/files">
             <arg value="-q"/>
@@ -529,25 +557,25 @@
             <arg value="../archives/weinre-src-${BUILD_NUMBER}.zip"/>
             <arg value="weinre-src"/>
         </exec>
-        
+
         <!-- =================================== -->
         <delete dir="${OUT}/files"/>
-        
+
     </target>
-            
-    
+
+
     <!-- ============================================================
          done!
          ============================================================ -->
-             
+
     <target name="finished">
         <echo>ant completed successfully ${MESSAGE_FINISHED}</echo>
     </target>
-    
+
     <!-- ============================================================
          done! via growl
          ============================================================ -->
-             
+
     <target name="finished-growl" if="USE_GROWL">
         <exec os="Mac OS X" executable="growlnotify">
             <arg value="-m"/>
@@ -559,7 +587,7 @@
     <!-- ============================================================
          macro to compile IDL to JSON
          ============================================================ -->
-        
+
     <macrodef name="simple-idl2json">
        <attribute name="name"/>
        <attribute name="iDir"/>
@@ -575,11 +603,11 @@
            </exec>
        </sequential>
     </macrodef>
-                    
+
     <!-- ============================================================
          macro to compile HTML
          ============================================================ -->
-        
+
     <macrodef name="build-html">
        <attribute name="name"/>
        <attribute name="iDir"/>
@@ -600,6 +628,6 @@
            <echo>generated @{oDir}/@{name}.html</echo>
        </sequential>
     </macrodef>
-                    
+
     <!-- ============================================================ -->
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.build/get-vendor.xml
----------------------------------------------------------------------
diff --git a/weinre.build/get-vendor.xml b/weinre.build/get-vendor.xml
index 4e2b477..1984cf9 100644
--- a/weinre.build/get-vendor.xml
+++ b/weinre.build/get-vendor.xml
@@ -1,23 +1,23 @@
 <!--
  * weinre is available under *either* the terms of the modified BSD license *or* the
  * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
+ *
  * Copyright (c) 2010, 2011 IBM Corporation
 -->
 
 <project name="get-vendor" default="get-vendor" basedir=".">
-    
+
     <property file="personal.properties"/>
     <property file="build.properties"/>
     <property file="vendor.properties"/>
-    
+
     <!-- ============================================================ -->
 
     <target name="get-vendor">
         <echo>Go get some coffee, this is going to take a while</echo>
-            
+
         <delete dir="${TMP}"/>
-        
+
         <delete dir="${VENDOR}"/>
         <mkdir  dir="${VENDOR}"/>
 
@@ -26,20 +26,21 @@
         <antcall target="get-json4j"/>
         <antcall target="get-jetty"/>
         <antcall target="get-scooj"/>
+        <antcall target="get-coffeescript"/>
         <antcall target="get-modjewel"/>
         <antcall target="get-web-inspector"/>
         <antcall target="get-swt-mac"/>
     </target>
-    
+
     <!-- ============================================================ -->
 
     <target name="get-cli">
         <delete dir="${VENDOR}/cli"/>
         <mkdir  dir="${VENDOR}/cli"/>
-        
+
         <delete dir="${TMP}"/>
         <mkdir  dir="${TMP}"/>
-        
+
         <get src="${CLI_URL}" dest="${TMP}/commons-cli.zip" verbose="false"/>
         <unzip src="${TMP}/commons-cli.zip" dest="${TMP}">
             <patternset>
@@ -47,20 +48,20 @@
                 <include name="${CLI_BASENAME}.jar"/>
             </patternset>
         </unzip>
-                    
-            
+
+
         <copy file="${TMP}/${CLI_BASENAME}.jar"         tofile="${VENDOR}/cli/commons-cli.jar"/>
         <copy file="${TMP}/${CLI_BASENAME}-sources.jar" tofile="${VENDOR}/cli/commons-cli-src.jar"/>
-            
+
         <delete dir="${TMP}"/>
     </target>
-    
+
     <!-- ============================================================ -->
 
     <target name="get-json4j">
         <delete dir="${VENDOR}/json4j"/>
         <mkdir  dir="${VENDOR}/json4j"/>
-        
+
         <delete dir="${TMP}"/>
         <mkdir  dir="${TMP}"/>
 
@@ -72,7 +73,7 @@
         </unzip>
 
         <copy file="${TMP}/apache-wink-${JSON4J_VERSION}/ext/wink-json4j-provider/lib/wink-json4j-${JSON4J_VERSION}.jar" tofile="${VENDOR}/json4j/json4j.jar"/>
-        
+
         <delete dir="${TMP}"/>
         <mkdir  dir="${TMP}"/>
         <get src="${JSON4J_SRC_URL}" dest="${TMP}/json4j-src.zip" verbose="false"/>
@@ -81,99 +82,109 @@
                 <include name="**/wink-json4j/src/main/java/org/apache/wink/json4j/**/*"/>
             </patternset>
         </unzip>
-        
+
         <zip destfile="${VENDOR}/json4j/json4j-src.jar" basedir="${TMP}/src"/>
 
         <delete dir="${TMP}"/>
     </target>
-    
+
     <!-- ============================================================ -->
 
     <target name="get-jetty">
         <delete dir="${VENDOR}/jetty"/>
         <mkdir  dir="${VENDOR}/jetty"/>
-        
+
         <get src="${JETTY_SRC_URL}"     dest="${VENDOR}/jetty/jetty-src.jar"   verbose="false"/>
         <get src="${JETTY_BIN_URL}"     dest="${VENDOR}/jetty/jetty.jar"       verbose="false"/>
         <get src="${JAVAX_SERVLET_URL}" dest="${VENDOR}/jetty/servlet-api.jar" verbose="false"/>
     </target>
-    
+
     <!-- ============================================================ -->
 
     <target name="get-scooj">
         <delete dir="${VENDOR}/scooj"/>
         <mkdir  dir="${VENDOR}/scooj"/>
-        
+
         <get src="${SCOOJ_URL_PREFIX}/scooj.js"  dest="${VENDOR}/scooj/scooj.js"  verbose="false"/>
         <get src="${SCOOJ_URL_PREFIX}/scoopc.py" dest="${VENDOR}/scooj/scoopc.py" verbose="false"/>
     </target>
-    
+
+    <!-- ============================================================ -->
+
+    <target name="get-coffeescript">
+        <echo message="coffee-script@${COFFEESCRIPT_VERSION}"/>
+        <exec executable="npm">
+            <arg value="install"/>
+            <arg value="coffee-script@${COFFEESCRIPT_VERSION}"/>
+        </exec>
+    </target>
+
     <!-- ============================================================ -->
 
     <target name="get-modjewel">
         <delete dir="${VENDOR}/modjewel"/>
         <mkdir  dir="${VENDOR}/modjewel"/>
-        
+
         <get src="${MODJEWEL_URL_PREFIX}/modjewel-require.js"  dest="${VENDOR}/modjewel/modjewel-require.js"  verbose="false"/>
         <get src="${MODJEWEL_URL_PREFIX}/module2transportd.py" dest="${VENDOR}/modjewel/module2transportd.py" verbose="false"/>
     </target>
-    
+
     <!-- ============================================================ -->
 
     <target name="get-web-inspector">
         <delete dir="${VENDOR}/webkit"/>
         <mkdir  dir="${VENDOR}/webkit/WebCore"/>
-        
+
         <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
             <arg value="export"/>
             <arg value="-r"/>
             <arg value="${WEBKIT_VERSION}"/>
             <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/inspector"/>
         </exec>
-        
+
         <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
             <arg value="export"/>
             <arg value="-r"/>
             <arg value="${WEBKIT_VERSION}"/>
             <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/English.lproj"/>
         </exec>
-        
+
         <exec executable="svn" dir="${VENDOR}/webkit/WebCore">
             <arg value="export"/>
             <arg value="-r"/>
             <arg value="${WEBKIT_VERSION}"/>
             <arg value="${WEBKIT_URL_PREFIX}/Source/WebCore/css/CSSPropertyNames.in"/>
         </exec>
-        
+
         <exec executable="grep" outputproperty="gpl-grep-results" dir="${VENDOR}/webkit/WebCore">
-            <arg value="-r"/>        
-            <arg value="GPL"/>        
-            <arg value="."/>        
+            <arg value="-r"/>
+            <arg value="GPL"/>
+            <arg value="."/>
         </exec>
-        
+
         <condition property="found-no-gpl-files">
             <equals arg1="" arg2="${gpl-grep-results}"/>
         </condition>
-        
+
         <fail unless="found-no-gpl-files" message="The string GPL was found in the WebKit files"/>
-            
+
     </target>
-    
+
     <!-- ============================================================ -->
 
     <target name="get-swt-mac">
         <delete dir="${VENDOR}/swt"/>
         <mkdir  dir="${VENDOR}/swt"/>
-            
+
         <delete dir="${TMP}"/>
         <mkdir dir="${TMP}"/>
-            
+
         <get src="${SWT_URL_PREFIX}/swt-${SWT_VERSION_MAJOR}-cocoa-macosx-x86_64.zip" dest="${TMP}/swt.zip" verbose="false"/>
         <unzip src="${TMP}/swt.zip" dest="${TMP}"/>
-            
+
         <copy file="${TMP}/src.zip"       tofile="${VENDOR}/swt/cocoa-macosx-x86_64/swt-src.jar"/>
         <copy file="${TMP}/swt-debug.jar" tofile="${VENDOR}/swt/cocoa-macosx-x86_64/swt.jar"/>
-        
+
         <delete dir="${TMP}"/>
     </target>
 
@@ -182,7 +193,7 @@
     <target name="get-json2">
         <delete dir="${VENDOR}/json2"/>
         <mkdir  dir="${VENDOR}/json2"/>
-        
+
         <get src="${JSON2_URL_PREFIX}/json2.js"  dest="${VENDOR}/json2/json2.js"  verbose="false"/>
     </target>
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.build/scripts/build-client-html.py
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/build-client-html.py b/weinre.build/scripts/build-client-html.py
index 690572a..5186010 100644
--- a/weinre.build/scripts/build-client-html.py
+++ b/weinre.build/scripts/build-client-html.py
@@ -3,7 +3,7 @@
 # ---
 # weinre is available under *either* the terms of the modified BSD license *or* the
 # MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
-# 
+#
 # Copyright (c) 2010, 2011 IBM Corporation
 # ---
 
@@ -19,24 +19,24 @@ def main():
         error("expecting parameters [web directory]")
 
     webDir = sys.argv[1]
-    
+
     iFileName = os.path.join(webDir, "client/inspector.html")
     oFileName = os.path.join(webDir, "client/index.html")
     moduleDir = os.path.join(webDir, "weinre")
-    
+
     if not os.path.exists(iFileName): error("file does not exist: %s" % iFileName)
     if not os.path.exists(moduleDir): error("module directory does not exist: %s" % moduleDir)
     if not os.path.isdir(moduleDir):  error("module directory is not a directory: %s" % moduleDir)
-    
+
     createIndexFile(iFileName, oFileName, moduleDir)
 
 #--------------------------------------------------------------------
 def createIndexFile(iFileName, oFileName, moduleDir):
     with open(iFileName) as iFile: lines = iFile.readlines()
-    
+
     pattern_head_start = re.compile(r"^\s*<meta http-equiv=\"content-type\".*$")
     pattern_head_end   = re.compile(r"^\s*</head>\s$")
-    
+
     newLines   = []
     foundStart = False
     foundEnd   = False
@@ -44,7 +44,7 @@ def createIndexFile(iFileName, oFileName, moduleDir):
         if pattern_head_start.match(line):
             foundStart = True
             newLines.append(line)
-            
+
             newLines.append("<!-- ========== weinre additions: starting ========== -->\n")
             newLines.extend([
                 '<meta http-equiv="X-UA-Compatible" content="chrome=1">\n'
@@ -56,27 +56,27 @@ def createIndexFile(iFileName, oFileName, moduleDir):
                 '<script type="text/javascript">require("modjewel").warnOnRecursiveRequire(true)</script>\n',
                 '<script type="text/javascript" src="../scooj.transportd.js"></script>\n',
             ])
-            
+
             for module in getModules(moduleDir):
                 newLines.append('<script type="text/javascript" src="../%s"></script>\n' % module)
-                
+
             newLines.append("<!-- ========== weinre additions: done ========== -->\n")
-            
+
         elif pattern_head_end.match(line):
             foundEnd = True
             newLines.append("<!-- ========== weinre additions: starting ========== -->\n")
             newLines.append('<link rel="stylesheet" type="text/css" href="weinre/client.css">\n')
             newLines.append('<script type="text/javascript" src="../interfaces/all-json-idls-min.js"></script>\n')
-            newLines.append('<script type="text/javascript">require("weinre/client/Client").getClass().main()</script>\n')
+            newLines.append('<script type="text/javascript">require("weinre/client/Client").main()</script>\n')
             newLines.append("<!-- ========== weinre additions: done ========== -->\n")
             newLines.append(line)
-        
+
         else:
             newLines.append(line)
-            
+
     if not foundStart: error("didn't find the location to start writing")
     if not foundEnd:   error("didn't find the location to finish writing")
-    
+
     with open(oFileName, "w") as oFile: oFile.writelines(newLines)
 
     log("created %s" % oFileName)
@@ -84,15 +84,15 @@ def createIndexFile(iFileName, oFileName, moduleDir):
 #--------------------------------------------------------------------
 def getModules(moduleDir):
     modules = []
-    
+
     for module in os.listdir(os.path.join(moduleDir, "common")):
         modules.append("weinre/common/%s" % module)
-    
+
     for module in os.listdir(os.path.join(moduleDir, "client")):
         modules.append("weinre/client/%s" % module)
 
     return modules
-        
+
 #--------------------------------------------------------------------
 def log(message):
     message = "%s: %s" % (PROGRAM_NAME, message)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.build/scripts/build-css-properties.py
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/build-css-properties.py b/weinre.build/scripts/build-css-properties.py
index 596e461..c6fde75 100644
--- a/weinre.build/scripts/build-css-properties.py
+++ b/weinre.build/scripts/build-css-properties.py
@@ -3,7 +3,7 @@
 # ---
 # weinre is available under *either* the terms of the modified BSD license *or* the
 # MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
-# 
+#
 # Copyright (c) 2010, 2011 IBM Corporation
 # ---
 
@@ -14,34 +14,34 @@ import json
 import optparse
 
 #--------------------------------------------------------------------
-# reads: 
+# reads:
 #   http://svn.webkit.org/repository/webkit/trunk/WebCore/css/CSSPropertyNames.in
 # writes:
-#   json array 
+#   json array
 #--------------------------------------------------------------------
 def main():
     if len(sys.argv) < 3:
         error("expecting parameters inputFile outputFile")
-        
+
     iFileName = sys.argv[1]
     oFileName = sys.argv[2]
-    
+
     if not os.path.exists(iFileName): error("input file not found: '" + iFileName + "'")
-    
+
     with open(iFileName, "r") as iFile:
         lines = iFile.readlines()
 
     properties = [line.strip() for line in lines if not line.strip().startswith("#")]
     properties = [property for property in properties if property != ""]
     properties.sort()
-        
+
     jsonString = json.dumps(properties, indent=4)
-    jsString = 'require("weinre/common/Weinre").getClass().addCSSProperties(%s)' % jsonString
+    jsString = 'require("weinre/common/Weinre").addCSSProperties(%s)' % jsonString
 
     oFile = open(oFileName, "w")
     oFile.write(jsString)
     oFile.close()
-    
+
     log("generated css properties in: " + oFileName)
 
 #--------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.build/scripts/collect-all-json-idl.py
----------------------------------------------------------------------
diff --git a/weinre.build/scripts/collect-all-json-idl.py b/weinre.build/scripts/collect-all-json-idl.py
index c9c6281..2d1d912 100644
--- a/weinre.build/scripts/collect-all-json-idl.py
+++ b/weinre.build/scripts/collect-all-json-idl.py
@@ -3,7 +3,7 @@
 # ---
 # weinre is available under *either* the terms of the modified BSD license *or* the
 # MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
-# 
+#
 # Copyright (c) 2010, 2011 IBM Corporation
 # ---
 
@@ -17,17 +17,17 @@ import optparse
 def main():
     if len(sys.argv) < 3:
         error("expecting parameters outputFile inputDir")
-        
+
     min = False
     if sys.argv[1] == "-min":
         min = True
         oFileName = sys.argv[2]
         iDirName  = sys.argv[3]
-        
+
     else:
         oFileName = sys.argv[1]
         iDirName  = sys.argv[2]
-    
+
     entries  = os.listdir(iDirName)
     if 0 == len(entries): error("no files found in '" + iDirName + "'")
 
@@ -38,26 +38,26 @@ def main():
     for entry in entries:
         iFileName = os.path.join(iDirName, entry)
         if not os.path.exists(iFileName): error("File not found: '" + iFileName + "'")
-        
+
         iFile = open(iFileName, "r")
         contents = iFile.read()
         iFile.close()
-        
+
         result.append(json.loads(contents))
-        
+
     if min:
         result = minimize(result)
         jsonString = json.dumps(result)
-    
+
     else:
         jsonString = json.dumps(result, indent=4)
-        
-    jsString = "require('weinre/common/Weinre').getClass().addIDLs(%s)" % jsonString
+
+    jsString = "require('weinre/common/Weinre').addIDLs(%s)" % jsonString
 
     oFile = open(oFileName, "w")
     oFile.write(jsString)
     oFile.close()
-    
+
     log("generated collected json idls in: " + oFileName)
 
 #--------------------------------------------------------------------
@@ -66,7 +66,7 @@ def minimize(idl):
         for interface in module["interfaces"]:
             if "extendedAttributes" in interface:
                 del interface["extendedAttributes"]
-            
+
             if "methods" in interface:
                 for method in interface["methods"]:
                     if "returns" in method:
@@ -75,12 +75,12 @@ def minimize(idl):
                         del method["callbackParameters"]
                     if "extendedAttributes" in method:
                         del method["extendedAttributes"]
-                        
+
                     if "parameters" in method:
                         for parameter in method["parameters"]:
                             if "type" in parameter:
                                 del parameter["type"]
-        
+
     return idl
 
 #--------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.build/vendor.properties
----------------------------------------------------------------------
diff --git a/weinre.build/vendor.properties b/weinre.build/vendor.properties
index 8cad8e0..bdb8f72 100644
--- a/weinre.build/vendor.properties
+++ b/weinre.build/vendor.properties
@@ -1,7 +1,7 @@
 # ---
 # weinre is available under *either* the terms of the modified BSD license *or* the
 # MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
-# 
+#
 # Copyright (c) 2011 IBM Corporation
 # ---
 
@@ -28,7 +28,7 @@ CLI_URL:        ${CLI_URL_PREFIX}/binaries/commons-cli-${CLI_VERSION}-bin.zip
 CLI_BASENAME:   commons-cli-${CLI_VERSION}/commons-cli-${CLI_VERSION}
 
 #-----------------------------------------------------------
-# location of JSON4J 
+# location of JSON4J
 #-----------------------------------------------------------
 
 JSON4J_VERSION:    1.1.2-incubating
@@ -51,7 +51,7 @@ JETTY_BIN_JAR_NAME:         jetty-all-server-${JETTY_VERSION}.jar
 JETTY_BIN_URL:              ${JETTY_URL_PREFIX}/aggregate/jetty-all-server/${JETTY_VERSION}/${JETTY_BIN_JAR_NAME}
 
 #-----------------------------------------------------------
-# location of servlet API 
+# location of servlet API
 #-----------------------------------------------------------
 
 JAVAX_SERVLET_VERSION:      2.5-20110124
@@ -77,6 +77,12 @@ SCOOJ_VERSION:    8f3534ba5a1b2fb8ea82a24eb0acedfcc6aca7b4
 SCOOJ_URL_PREFIX: https://github.com/pmuellr/scooj/raw/${SCOOJ_VERSION}
 
 #-----------------------------------------------------------
+# location of CoffeeScript
+#-----------------------------------------------------------
+
+COFFEESCRIPT_VERSION:    1.1.2
+
+#-----------------------------------------------------------
 # location of json2
 #-----------------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/client/ExtensionRegistryStub.js
----------------------------------------------------------------------
diff --git a/weinre.web/client/ExtensionRegistryStub.js b/weinre.web/client/ExtensionRegistryStub.js
index 8e30a7e..396f3f1 100644
--- a/weinre.web/client/ExtensionRegistryStub.js
+++ b/weinre.web/client/ExtensionRegistryStub.js
@@ -1,11 +1,11 @@
 /*
  * weinre is available under *either* the terms of the modified BSD license *or* the
  * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
+ *
  * Copyright (c) 2011 IBM Corporation
  */
 
 (function() {
-    var ExtensionRegistryImpl = require("weinre/client/ExtensionRegistryImpl").getClass()
+    var ExtensionRegistryImpl = require("weinre/client/ExtensionRegistryImpl")
     window.InspectorExtensionRegistry = new ExtensionRegistryImpl()
 })()

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/client/InspectorBackendStub.js
----------------------------------------------------------------------
diff --git a/weinre.web/client/InspectorBackendStub.js b/weinre.web/client/InspectorBackendStub.js
index 091c2a4..f8d41f2 100644
--- a/weinre.web/client/InspectorBackendStub.js
+++ b/weinre.web/client/InspectorBackendStub.js
@@ -1,11 +1,11 @@
 /*
  * weinre is available under *either* the terms of the modified BSD license *or* the
  * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
+ *
  * Copyright (c) 2010, 2011 IBM Corporation
  */
 
 (function() {
-    var InspectorBackendImpl = require("weinre/client/InspectorBackendImpl").getClass()
+    var InspectorBackendImpl = require("weinre/client/InspectorBackendImpl")
     window.InspectorBackend = new InspectorBackendImpl()
 })()

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/client/InspectorFrontendHostStub.js
----------------------------------------------------------------------
diff --git a/weinre.web/client/InspectorFrontendHostStub.js b/weinre.web/client/InspectorFrontendHostStub.js
index d964918..65f648b 100644
--- a/weinre.web/client/InspectorFrontendHostStub.js
+++ b/weinre.web/client/InspectorFrontendHostStub.js
@@ -1,11 +1,11 @@
 /*
  * weinre is available under *either* the terms of the modified BSD license *or* the
  * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
+ *
  * Copyright (c) 2010, 2011 IBM Corporation
  */
 
 (function() {
-    var InspectorFrontEndHostImpl = require("weinre/client/InspectorFrontendHostImpl").getClass()
-    window.InspectorFrontendHost = new InspectorFrontEndHostImpl() 
+    var InspectorFrontEndHostImpl = require("weinre/client/InspectorFrontendHostImpl")
+    window.InspectorFrontendHost = new InspectorFrontEndHostImpl()
 })()

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/demo/weinre-demo-pieces.html
----------------------------------------------------------------------
diff --git a/weinre.web/demo/weinre-demo-pieces.html b/weinre.web/demo/weinre-demo-pieces.html
index 51b261f..bb38a17 100644
--- a/weinre.web/demo/weinre-demo-pieces.html
+++ b/weinre.web/demo/weinre-demo-pieces.html
@@ -1,7 +1,7 @@
 <!--
  * weinre is available under *either* the terms of the modified BSD license *or* the
  * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
+ *
  * Copyright (c) 2010, 2011 IBM Corporation
 -->
 
@@ -12,7 +12,6 @@
 
 <script src="/modjewel-require.js"></script>
 <script type="text/javascript">require("modjewel").warnOnRecursiveRequire(true)</script>
-<script src="/scooj.transportd.js"></script>
 <script src="/weinre/common/Ex.transportd.js"></script>
 <script src="/weinre/common/StackTrace.transportd.js"></script>
 <script src="/weinre/common/Weinre.transportd.js"></script>
@@ -24,6 +23,7 @@
 <script src="/weinre/common/EventListeners.transportd.js"></script>
 <script src="/weinre/common/Native.transportd.js"></script>
 <script src="/weinre/common/IDGenerator.transportd.js"></script>
+<script src="/weinre/common/MethodNamer.transportd.js"></script>
 <script src="/weinre/target/Console.transportd.js"></script>
 <script src="/add-css-properties.js"></script>
 <script src="/weinre/target/CheckForProblems.transportd.js"></script>
@@ -47,8 +47,8 @@
 <script src="/interfaces/all-json-idls-min.js"></script>
 
 <script type="text/javascript">
-    require("weinre/common/Weinre").getClass().showNotImplemented()
-    require('weinre/target/Target').getClass().main()
+    require("weinre/common/Weinre").showNotImplemented()
+    require('weinre/target/Target').main()
 </script>
 
 <link rel="stylesheet" href="weinre-demo.css">

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/index.html
----------------------------------------------------------------------
diff --git a/weinre.web/index.html b/weinre.web/index.html
index ed4f2a8..05f3e53 100644
--- a/weinre.web/index.html
+++ b/weinre.web/index.html
@@ -3,7 +3,7 @@
 <!--
  * weinre is available under *either* the terms of the modified BSD license *or* the
  * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
+ *
  * Copyright (c) 2010, 2011 IBM Corporation
 -->
 
@@ -20,9 +20,9 @@
 h1, h2 {
     padding:                0.25em 0.50em;
     background-color:       #DDD;
-    border-radius:          0.5em; 
-    -moz-border-radius:     0.5em; 
-    -webkit-border-radius:  0.5em;   
+    border-radius:          0.5em;
+    -moz-border-radius:     0.5em;
+    -webkit-border-radius:  0.5em;
 }
 td {
     vertical-align:         top;
@@ -64,21 +64,21 @@ pre, .indent {
 
 <h2>Target Bookmarklet</h2>
 
-<p>You can use this bookmarklet to inject the weinre target code into any 
+<p>You can use this bookmarklet to inject the weinre target code into any
 web page you are viewing.
 
-<p>link you can drag to your bookmarks: 
+<p>link you can drag to your bookmarks:
 
 <div class="indent">
-<span id="url-target-bookmarklet">???</span> 
+<span id="url-target-bookmarklet">???</span>
 </div>
 
-<p>bookmarklet url in a pre: 
+<p>bookmarklet url in a pre:
 <pre id="target-bookmarklet-src-pre"></pre>
 
-<p>bookmarklet url in a textarea: 
+<p>bookmarklet url in a textarea:
 <div class="indent">
-<textarea id="target-bookmarklet-src-text-area"></textarea> 
+<textarea id="target-bookmarklet-src-text-area"></textarea>
 </div>
 
 <h2>Development</h2>
@@ -100,7 +100,7 @@ web page you are viewing.
 <tr><td>modjewel:       <td> <span id="version-modjewel">???</span>
 </table>
 
-<img src="images/weinre-icon-128x128.png"> 
+<img src="images/weinre-icon-128x128.png">
 
 <script src="index.js"></script>
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules-scoop/weinre/client/Client.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules-scoop/weinre/client/Client.scoop b/weinre.web/modules-scoop/weinre/client/Client.scoop
new file mode 100644
index 0000000..73c499a
--- /dev/null
+++ b/weinre.web/modules-scoop/weinre/client/Client.scoop
@@ -0,0 +1,161 @@
+
+/*
+ * weinre is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * 
+ * Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+requireClass ../common/Native
+
+requireClass ../common/IDLTools
+requireClass ../common/Callback
+requireClass ../common/Weinre
+requireClass ../common/MessageDispatcher
+requireClass ../common/Binding
+requireClass ../common/IDGenerator
+
+requireClass ./InspectorBackendImpl
+requireClass ./InspectorFrontendHostImpl
+requireClass ./WeinreClientEventsImpl
+requireClass ./WeinreExtraTargetEventsImpl
+requireClass ./RemotePanel
+
+//-----------------------------------------------------------------------------
+class Client
+
+//-----------------------------------------------------------------------------
+init
+    var AutoConnect = true
+    
+    Weinre.showNotImplemented()
+
+//-----------------------------------------------------------------------------
+method initialize
+
+    // validate InspectorFrontendHost against IDL
+    // IDLTools.validateAgainstIDL(InspectorFrontendHostImpl, 'InspectorFrontendHost')
+
+    // add a load handler for the window
+    window.addEventListener("load", Binding(this, "onLoaded"), false)
+
+    // create the socket
+    var messageDispatcher = new MessageDispatcher("../ws/client", this._getId())
+    Weinre.messageDispatcher = messageDispatcher
+
+    // finish setting up InspectorBackend
+    InspectorBackendImpl.setupProxies()
+
+    // create the client commands proxy
+    Weinre.WeinreClientCommands = messageDispatcher.createProxy("WeinreClientCommands")
+    Weinre.WeinreExtraClientCommands = messageDispatcher.createProxy("WeinreExtraClientCommands")
+
+    messageDispatcher.registerInterface("WeinreExtraTargetEvents", new WeinreExtraTargetEventsImpl(), false)
+    
+    // register WebInspector interface
+    messageDispatcher.registerInterface("WebInspector", WebInspector, false)
+    
+    // hack
+    WebInspector.mainResource = {}
+    WebInspector.mainResource.url = location.href
+
+//-----------------------------------------------------------------------------
+method _getId
+    var hash = location.href.split("#")[1]
+    if (hash) return hash
+    return "anonymous"
+
+//-----------------------------------------------------------------------------
+method uiAvailable
+    return WebInspector.panels && WebInspector.panels.remote
+    
+//-----------------------------------------------------------------------------
+method autoConnect(value)
+    if (arguments.length >= 1) {
+        AutoConnect = !!value
+    }
+
+    return AutoConnect
+
+//-----------------------------------------------------------------------------
+method _installRemotePanel
+    WebInspector.panels.remote = new RemotePanel();
+    
+    var panel   = WebInspector.panels.remote;
+    
+    var toolbar = document.getElementById("toolbar")
+    WebInspector.addPanelToolbarIcon(toolbar, panel, toolbar.childNodes[1])
+    WebInspector.panelOrder.unshift(WebInspector.panelOrder.pop())
+    
+    WebInspector.currentPanel = panel
+    
+    var toolButtonsToHide = ["scripts"]
+    toolButtonsToHide.forEach(function(toolButtonToHide){
+        if (!WebInspector.panels[toolButtonToHide]) return
+        if (!WebInspector.panels[toolButtonToHide].toolbarItem) return
+        WebInspector.panels[toolButtonToHide].toolbarItem.style.display = "none"
+    })
+    
+    var button = document.getElementById("dock-status-bar-item")
+    if (button) button.style.display = "none"
+
+//-----------------------------------------------------------------------------
+method onLoaded
+
+    Weinre.WeinreClientCommands.registerClient(Binding(this, this.cb_registerClient))
+
+    this._installRemotePanel()
+
+    var messageDispatcher = Weinre.messageDispatcher
+    
+//  Weinre.Socket.verbose(true)
+    
+    messageDispatcher.registerInterface("WeinreClientEvents",    new WeinreClientEventsImpl(this), false)
+    messageDispatcher.registerInterface("InspectorFrontendHost", InspectorFrontendHost, false)
+
+//-----------------------------------------------------------------------------
+method cb_registerClient(clientDescription)
+    Weinre.clientDescription = clientDescription
+    
+    if (this.uiAvailable()) {
+        WebInspector.panels.remote.setCurrentClient(clientDescription.channel)
+        WebInspector.panels.remote.afterInitialConnection()
+    }
+    
+    Weinre.messageDispatcher.getWebSocket().addEventListener("close", Binding(this, this.cb_webSocketClosed))
+
+//-----------------------------------------------------------------------------
+method cb_webSocketClosed
+    
+    // use a delay, otherwise reloading will cause this stuff to flash
+    // before page is actually reloaded
+    Native.setTimeout(function() {
+        WebInspector.panels.remote.connectionClosed()
+        WebInspector.currentPanel = WebInspector.panels.remote 
+    }, 1000)
+
+//-----------------------------------------------------------------------------
+function installWebInspectorAPIsource
+
+    if ("webInspector" in window) return
+    
+    var extensionAPI = window.parent.InspectorFrontendHost.getExtensionAPI()
+    extensionAPI = extensionAPI.replace("location.hostname + location.port", "location.hostname + ':' + location.port")
+    
+    // parms are: InjectedScriptHost, inspectedWindow, injectedScriptId
+    // InjectedScriptHost is not directly referenced
+    // inspectedWindow is not directly referenced
+    // injectedScriptId is used to scope object references, appears that
+    //     each extension should have a unique value for this
+    
+    var id = IDGenerator.next()
+    console.log("installing webInspector with injectedScriptId: " + id)
+    extensionAPI += "(null,null," + id + ")"
+    return extensionAPI
+
+//-----------------------------------------------------------------------------
+static method main
+    Weinre.client = new Client()
+    Weinre.client.initialize()
+
+    window.installWebInspectorAPIsource = installWebInspectorAPIsource
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules-scoop/weinre/client/ConnectorList.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules-scoop/weinre/client/ConnectorList.scoop b/weinre.web/modules-scoop/weinre/client/ConnectorList.scoop
new file mode 100644
index 0000000..b2ad6a5
--- /dev/null
+++ b/weinre.web/modules-scoop/weinre/client/ConnectorList.scoop
@@ -0,0 +1,157 @@
+
+/*
+ * weinre is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * 
+ * Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+requireClass ./DOMTemplates as dt
+
+//-----------------------------------------------------------------------------
+class ConnectorList(title)
+    this.connectors   = {}
+    this.noneItem     = dt.LI("none")
+    this.ulConnectors = dt.UL(this.noneItem)
+    this.div          = dt.DIV(dt.H1(title), this.ulConnectors)
+    
+    this.noneItem.addStyleClass("weinre-connector-item")
+
+//-----------------------------------------------------------------------------
+method getElement
+    return this.div
+
+//-----------------------------------------------------------------------------
+method add(connector)
+    if (this.connectors[connector.channel]) return
+    
+    this.connectors[connector.channel] = connector
+    
+    var li = this.getListItem(connector)
+
+    if (this.noneItem.style.display != "none") {
+        this.noneItem.style.display = "none"
+    }
+    
+    li.addStyleClass("weinre-fadeable")
+    
+    var insertionPoint = this.getConnectorInsertionPoint(connector)
+    if (!insertionPoint) {
+        this.ulConnectors.appendChild(li)
+    }
+    else {
+        this.ulConnectors.insertBefore(li, insertionPoint)
+    }
+
+//-----------------------------------------------------------------------------
+method get(channel)
+    return this.connectors[channel]
+
+//-----------------------------------------------------------------------------
+method getNewestConnectorChannel(ignoring)
+    var newest = 0
+    
+    for (var connectorChannel in this.connectors) {
+        if (connectorChannel == ignoring) continue
+        if (connectorChannel > newest) newest = connectorChannel
+    }
+    
+    if (newest == 0) return null
+    return newest
+
+//-----------------------------------------------------------------------------
+method getConnectorInsertionPoint(connector)
+    for (var i=0; i<this.ulConnectors.childNodes.length; i++) {
+        var childNode = this.ulConnectors.childNodes[i]
+        if (null == childNode.connectorChannel) continue
+        if (childNode.connectorChannel < connector.channel) {
+            return childNode
+        }
+    }
+    
+    return null
+
+//-----------------------------------------------------------------------------
+method remove(channel, fast)
+    var self = this
+    var element = this.getConnectorElement(channel)
+    if (!element) return
+
+    var connector = this.connectors[channel]
+    if (connector) {
+        connector.closed = true
+    }
+    
+    delete this.connectors[channel]
+    
+    if (fast) {
+        this._remove(element)
+    }
+
+    else {
+        this.setState(element, "closed")
+        element.addStyleClass("weinre-fade")
+
+        window.setTimeout(function() {
+            self._remove(element)
+        }, 5000)
+    }
+
+//-----------------------------------------------------------------------------
+method _remove(element)
+    this.ulConnectors.removeChild(element)
+    if (this.getConnectors().length == 0) {
+        this.noneItem.style.display = "list-item"
+    }
+
+//-----------------------------------------------------------------------------
+method removeAll()
+    this.getConnectors().forEach(function(connector) {
+        this.remove(connector.channel, true)
+    }, this)
+
+//-----------------------------------------------------------------------------
+method getConnectors()
+    var result = []
+    for (var channel in this.connectors) {
+        if (!this.connectors.hasOwnProperty(channel)) continue
+        
+        result.push(this.connectors[channel])
+    }
+    
+    return result
+
+//-----------------------------------------------------------------------------
+method getConnectorElement(channel)
+    var connector = this.connectors[channel]
+    if (!connector) return null
+    
+    return connector.element
+
+//-----------------------------------------------------------------------------
+method setCurrent(channel)
+    this.getConnectors().forEach(function(connector) {
+        connector.element.removeStyleClass("current")
+    })
+    
+    var element = this.getConnectorElement(channel)
+    if (null == element) return
+    
+    element.addStyleClass("current")
+
+//-----------------------------------------------------------------------------
+method setState(channel, state)
+    if (typeof channel == "string") {
+        var element = this.getConnectorElement(channel)
+    }
+    else {
+        element = channel
+    }
+    
+    if (!element) return
+    
+    element.removeStyleClass("error")
+    element.removeStyleClass("closed")
+    element.removeStyleClass("connected")
+    element.removeStyleClass("not-connected")
+    element.addStyleClass(state)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules-scoop/weinre/client/DOMTemplates.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules-scoop/weinre/client/DOMTemplates.scoop b/weinre.web/modules-scoop/weinre/client/DOMTemplates.scoop
new file mode 100644
index 0000000..566c1b4
--- /dev/null
+++ b/weinre.web/modules-scoop/weinre/client/DOMTemplates.scoop
@@ -0,0 +1,74 @@
+
+/*
+ * weinre is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * 
+ * Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+//-----------------------------------------------------------------------------
+// creates functions of the form H1, H2, etc, as static methods that create a new element
+// of the specified name.  The function can take a variable number of arguments,
+// which are either child elements, strings, attributes, or properties of the element.
+//
+// - arguments which are nodes become children
+// - arguments which are strings become text node children
+// - arguments which are objects have the object's properties added as:
+//    - attributes if the property name does not begin with "$"
+//    - properties if the property name begins with "$" 
+//      (the resulting property name doesn't include "$")
+//-----------------------------------------------------------------------------
+
+requireClass ../common/Ex
+
+//-----------------------------------------------------------------------------
+class DOMTemplates
+
+//-----------------------------------------------------------------------------
+function getElementFunction(elementName)
+    return function() {
+        var element = document.createElement(elementName)
+        
+        var args = [].slice.call(arguments)
+        args.forEach(function(argument) {
+            if      (argument.nodeType)           addToElement_Node(   element, argument )
+            else if (typeof argument == "string") addToElement_String( element, argument )
+            else if (typeof argument == "object") addToElement_Object( element, argument )
+            else throw new Ex(arguments, "invalid value passed to  DOMTemplates." + elementName + "(): " + argument)
+        })
+        
+        return element
+    }
+
+//-----------------------------------------------------------------------------
+function addToElement_String(element, aString)
+    addToElement_Node(element, document.createTextNode(aString))
+
+//-----------------------------------------------------------------------------
+function addToElement_Node(element, anElement)
+    element.appendChild(anElement)
+
+//-----------------------------------------------------------------------------
+function addToElement_Object(element, anObject)
+    for (var key in anObject) {
+        if (!anObject.hasOwnProperty(key)) continue
+        
+        var val = anObject[key]
+        
+        if (key.substr(0,1) == "$") {
+            var actualKey = key.substr(1)
+            element[actualKey] = val
+        }
+        else {
+            element.setAttribute(key, val)
+        }
+    }
+
+//-----------------------------------------------------------------------------
+init 
+    var elementNames = "H1 H2 H3 H4 H5 H6 UL OL DL LI DT DD SPAN DIV A B I TT P HR BR PRE IMG CANVAS TABLE TR TD FORM INPUT BUTTON SELECT OPTGROUP OPTION TEXTAREA"
+    elementNames = elementNames.split(" ")
+    
+    elementNames.forEach(function(elementName) {
+        DOMTemplates[elementName] = getElementFunction(elementName)
+    })

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules-scoop/weinre/client/ExtensionRegistryImpl.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules-scoop/weinre/client/ExtensionRegistryImpl.scoop b/weinre.web/modules-scoop/weinre/client/ExtensionRegistryImpl.scoop
new file mode 100644
index 0000000..bee7c42
--- /dev/null
+++ b/weinre.web/modules-scoop/weinre/client/ExtensionRegistryImpl.scoop
@@ -0,0 +1,35 @@
+
+/*
+ * weinre is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * 
+ * Copyright (c) 2011 IBM Corporation
+ */
+
+requireClass ../common/Ex
+requireClass ../common/Binding
+requireClass ../common/Weinre
+
+//-----------------------------------------------------------------------------
+class ExtensionRegistryImpl
+
+//-----------------------------------------------------------------------------
+init
+    var extensions = []
+
+//-----------------------------------------------------------------------------
+method getExtensionsAsync
+    if (extensions.length) return
+    
+    Weinre.WeinreClientCommands.getExtensions(Binding(this, this._cb_getExtensions))
+        
+//-----------------------------------------------------------------------------
+method _cb_getExtensions(extensionsResult)
+    extensions = extensionsResult
+    this._installExtensions()
+    
+//-----------------------------------------------------------------------------
+method _installExtensions    
+    WebInspector.addExtensions(extensions)
+    
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules-scoop/weinre/client/InspectorBackendImpl.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules-scoop/weinre/client/InspectorBackendImpl.scoop b/weinre.web/modules-scoop/weinre/client/InspectorBackendImpl.scoop
new file mode 100644
index 0000000..a39ee09
--- /dev/null
+++ b/weinre.web/modules-scoop/weinre/client/InspectorBackendImpl.scoop
@@ -0,0 +1,73 @@
+
+/*
+ * weinre is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * 
+ * Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+requireClass ../common/Ex
+requireClass ../common/IDLTools
+requireClass ../common/MessageDispatcher
+requireClass ../common/Weinre
+
+//-----------------------------------------------------------------------------
+class InspectorBackendImpl
+    this.registeredDomainDispatchers = {}
+    MessageDispatcher.setInspectorBackend(this)
+
+//-----------------------------------------------------------------------------
+static method setupProxies
+
+    var intfNames = [
+        "ApplicationCache",
+        "BrowserDebugger",
+        "CSS",
+        "Console",
+        "DOM",
+        "DOMStorage",
+        "Database",
+        "Debugger",
+        "InjectedScript",
+        "Inspector",
+        "Network",
+        "Profiler",
+        "Runtime"
+    ]
+
+    intfNames.forEach(function(intfName) {
+        var proxy = Weinre.messageDispatcher.createProxy(intfName)
+        if (window[intfName]) {
+            throw new Ex(arguments, "backend interface '" + intfName + "' already created")
+        }
+        
+        var intf = IDLTools.getIDL(intfName)
+        if (!intf) {
+            throw new Ex(arguments, "interface not registered: '" + intfName + "'")
+        }
+
+        window[intfName] = {}
+        
+        intf.methods.forEach(function(method) {
+            var proxyMethod = InspectorBackendImpl.getProxyMethod(proxy, method)
+            InspectorBackendImpl.prototype[method.name] = proxyMethod
+            window[intfName][method.name] = proxyMethod
+        })
+    })
+    
+
+//-----------------------------------------------------------------------------
+static method getProxyMethod(proxy, method)
+    return function() {
+        return proxy[method.name].apply(proxy, arguments)
+    }
+
+//-----------------------------------------------------------------------------
+method registerDomainDispatcher(name, intf)
+    this.registeredDomainDispatchers[name] = intf
+    
+//-----------------------------------------------------------------------------
+method getRegisteredDomainDispatcher(name)
+    if (!this.registeredDomainDispatchers.hasOwnProperty(name)) return null
+    
+    return this.registeredDomainDispatchers[name]

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules-scoop/weinre/client/InspectorFrontendHostImpl.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules-scoop/weinre/client/InspectorFrontendHostImpl.scoop b/weinre.web/modules-scoop/weinre/client/InspectorFrontendHostImpl.scoop
new file mode 100644
index 0000000..cbdb6c1
--- /dev/null
+++ b/weinre.web/modules-scoop/weinre/client/InspectorFrontendHostImpl.scoop
@@ -0,0 +1,96 @@
+
+/*
+ * weinre is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * 
+ * Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+requireClass ../common/Weinre
+requireClass ../common/IDLTools
+
+//-----------------------------------------------------------------------------
+class InspectorFrontendHostImpl
+        
+    this._getPlatformAndPort()
+
+//-----------------------------------------------------------------------------
+init
+    var _extensionAPI
+    
+//-----------------------------------------------------------------------------
+method loaded
+
+//-----------------------------------------------------------------------------
+method localizedStringsURL
+    return "nls/English.lproj/localizedStrings.js";
+
+//-----------------------------------------------------------------------------
+method hiddenPanels
+//    return "audits,profiles,resources,network"
+    return "audits,profiles,network"
+//    return "audits,profiles,resources,scripts,timeline,network"
+
+//-----------------------------------------------------------------------------
+method platform
+    return "weinre"
+
+//-----------------------------------------------------------------------------
+method port
+    return "weinre"
+
+//-----------------------------------------------------------------------------
+method sendMessageToBackend(message)
+    var object = JSON.parse(message)
+    if (object[0] == "setInjectedScriptSource") {
+        object[1] = "<long script elided>"
+    }
+    Weinre.logInfo(arguments.callee.signature + "(" + JSON.stringify(object,null,4) + ")")
+
+//-----------------------------------------------------------------------------
+method setExtensionAPI(extensionAPI)
+    _extensionAPI = extensionAPI
+
+//-----------------------------------------------------------------------------
+method getExtensionAPI
+    return _extensionAPI
+
+//-----------------------------------------------------------------------------
+method inspectedURLChanged
+
+//-----------------------------------------------------------------------------
+method _getPlatformAndPort
+    this._platform       = "weinre"
+    this._platformFlavor = "weinre"
+    this._port           = "weinre"
+        
+    if (true) return
+    
+    // get values from user agent
+    var uas = navigator.userAgent
+    if      (uas.match(/mac os x/i))  this._platform = "mac"
+    else if (uas.match(/macintosh/i)) this._platform = "mac"
+    else if (uas.match(/linux/i))     this._platform = "linux"
+    else if (uas.match(/windows/i))   this._platform = "windows"
+        
+    // get values from hash value
+    var url = window.location.href
+    
+    var splits = url.split("#",2)
+    if (splits.length > 1) {
+        var properties = splits[1]
+        properties = properties.split("&")
+        
+        properties.forEach(function(property) {
+            var pieces = property.split("=")
+            if (pieces.length > 1) {
+                var key = pieces[0]
+                var val = pieces[1]
+                
+                if      (key == "platform")       this._platform       = val
+                else if (key == "platformFlavor") this._platformFlavor = val
+                else if (key == "port")           this._port           = val
+            }
+        })
+        
+    }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/9f1c7663/weinre.web/modules-scoop/weinre/client/RemotePanel.scoop
----------------------------------------------------------------------
diff --git a/weinre.web/modules-scoop/weinre/client/RemotePanel.scoop b/weinre.web/modules-scoop/weinre/client/RemotePanel.scoop
new file mode 100644
index 0000000..fe7c5b8
--- /dev/null
+++ b/weinre.web/modules-scoop/weinre/client/RemotePanel.scoop
@@ -0,0 +1,255 @@
+
+/*
+ * weinre is available under *either* the terms of the modified BSD license *or* the
+ * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * 
+ * Copyright (c) 2010, 2011 IBM Corporation
+ */
+
+requireClass ../common/Binding
+requireClass ../common/Weinre
+
+requireClass ./ConnectorList
+requireClass ./DOMTemplates as dt
+
+//-----------------------------------------------------------------------------
+class RemotePanel < WebInspector.Panel
+    super("remote")
+
+    this.initialize()
+
+//-----------------------------------------------------------------------------
+method initialize()
+    
+    // main div
+    var div = dt.DIV()
+    div.style.position = "absolute"
+    div.style.top      = "1em"
+    div.style.right    = "1em"
+    div.style.left     = "1em"
+    div.style.bottom   = "1em"
+    div.style.overflow = "auto"
+
+    // create icon
+    var icon = dt.IMG({
+        src: "../images/weinre-icon-128x128.png"
+    })
+    
+    icon.style.float = "right"
+    div.appendChild(icon)
+        
+    // create target and client lists
+    this.targetList = new TargetList()
+    this.clientList = new ClientList()
+    
+    div.appendChild(this.targetList.getElement())
+    div.appendChild(this.clientList.getElement())
+    
+    // create server properties
+    this.serverProperties = dt.DIV({
+        $className: "weinreServerProperties"
+    })
+        
+    div.appendChild(dt.H1("Server Properties"))
+    div.appendChild(this.serverProperties)
+    
+    // add main div to page
+    this.element.appendChild(div)
+    this.reset();
+
+//-----------------------------------------------------------------------------
+method addClient(client) 
+    this.clientList.add(client)
+    
+method addTarget(target) 
+    this.targetList.add(target)
+
+method getTarget(channel)
+    return this.targetList.get(channel)
+    
+method removeClient(channel) 
+    this.clientList.remove(channel)
+    
+method removeTarget(channel) 
+    this.targetList.remove(channel)
+
+method setCurrentClient(channel) 
+    this.clientList.setCurrent(channel)
+    
+method setCurrentTarget(channel) 
+    this.targetList.setCurrent(channel)
+
+method setClientState(channel, state) 
+    this.clientList.setState(channel, state)
+    
+method setTargetState(channel, state) 
+    this.targetList.setState(channel, state)
+
+//-----------------------------------------------------------------------------
+method getNewestTargetChannel(ignoring)
+    return this.targetList.getNewestConnectorChannel(ignoring)
+
+//-----------------------------------------------------------------------------
+method afterInitialConnection
+    this.clientList.afterInitialConnection()
+
+//-----------------------------------------------------------------------------
+method reset
+    this.clientList.removeAll()
+    this.targetList.removeAll()
+    
+    Weinre.WeinreClientCommands.getTargets(Binding(this, "cb_getTargets"))
+    Weinre.WeinreClientCommands.getClients(Binding(this, "cb_getClients"))
+
+//-----------------------------------------------------------------------------
+method connectionClosed
+    this.clientList.removeAll()
+    this.targetList.removeAll()
+
+//-----------------------------------------------------------------------------
+method cb_getTargets(targets)
+    targets.forEach(function(target) {
+        this.addTarget(target)
+    }, this)
+   
+    if (!Weinre.client.autoConnect()) return
+    
+    var newestTargetChannel = this.getNewestTargetChannel()
+    if (!newestTargetChannel) return
+    if (!Weinre.messageDispatcher) return
+
+    Weinre.WeinreClientCommands.connectTarget(Weinre.messageDispatcher.channel, newestTargetChannel)
+    
+    
+//-----------------------------------------------------------------------------
+method cb_getClients(clients)
+    clients.forEach(function(client) {
+        this.addClient(client)
+    }, this)
+
+//-----------------------------------------------------------------------------
+getter toolbarItemClass
+    return "remote"
+
+//-----------------------------------------------------------------------------
+getter toolbarItemLabel
+    return "Remote"
+
+//-----------------------------------------------------------------------------
+getter statusBarItems
+    return []
+
+//-----------------------------------------------------------------------------
+getter defaultFocusedElement
+    return this.contentElement
+
+//-----------------------------------------------------------------------------
+method show
+    super()
+
+//-----------------------------------------------------------------------------
+method hide()
+    super()
+
+//-----------------------------------------------------------------------------
+method setServerProperties(properties)
+    var table = "<table>"
+    var keys = []
+    for (var key in properties) {
+        keys.push(key)
+    }
+    
+    keys = keys.sort()
+    keys.forEach(function(key) {
+        val = properties[key]
+        if (typeof val == "string") {
+            val = val.escapeHTML()
+        }
+        else {
+            var finalVal = ""
+            val.forEach(function(aVal){
+                finalVal += "<li>" + aVal.escapeHTML()
+            })
+            val = "<ul>" + finalVal + "</ul>"
+        }
+        table += "<tr class='weinre-normal-text-size'><td valign='top'>" + key.escapeHTML() + ": <td>" + val
+    })
+    table += "</table>"
+    this.serverProperties.innerHTML = table
+
+//=============================================================================
+//=============================================================================
+    
+//-----------------------------------------------------------------------------
+class TargetList < ConnectorList
+    super("Targets")
+
+//-----------------------------------------------------------------------------
+method getListItem(target)
+    var self = this
+    var text = target.hostName + " [channel: " + target.channel + " id: " + target.id + "]" + " - " + target.url 
+
+    var item = dt.LI(
+        { $connectorChannel: target.channel },
+        text
+    )
+    
+    item.addStyleClass("weinre-connector-item")
+    item.addStyleClass("target")
+    
+    item.addEventListener("click", function(e) {self.connectToTarget(target.channel, e)}, false)
+
+    target.element = item
+
+    return item
+
+//-----------------------------------------------------------------------------
+method connectToTarget(targetChannel, event)
+    if (event) {
+        event.preventDefault()
+        event.stopPropagation()
+    }
+    
+    var target = this.connectors[targetChannel]
+    if (!target) return false
+    if (target.closed) return false
+    
+    Weinre.WeinreClientCommands.connectTarget(Weinre.messageDispatcher.channel, targetChannel)
+    
+    return false
+
+//=============================================================================
+//=============================================================================
+
+//-----------------------------------------------------------------------------
+class ClientList < ConnectorList
+    super("Clients")
+
+    this.noneItem.innerHTML = "Waiting for connection..."
+
+//-----------------------------------------------------------------------------
+method afterInitialConnection()
+    this.noneItem.innerHTML = "Connection lost, reload this page to reconnect."
+    this.noneItem.addStyleClass("error")
+
+//-----------------------------------------------------------------------------
+method getListItem(client)
+    var text = client.hostName + " [channel: " + client.channel + " id: " + client.id  + "]"
+    
+    var item = dt.LI(
+        { $connectorChannel: client.channel },
+        text
+    )
+
+    item.addStyleClass("weinre-connector-item")
+    item.addStyleClass("client")
+    
+    if (Weinre.messageDispatcher) {
+        if (client.channel == Weinre.messageDispatcher.channel) {
+            item.addStyleClass("current")
+        }
+    }
+
+    client.element = item
+    
+    return item


Mime
View raw message