flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [3/3] git commit: [flex-falcon] [refs/heads/develop] - Override config class to allow for new relative path to Closure Library.
Date Sun, 03 Aug 2014 10:05:27 GMT
Override config class to allow for new relative path to Closure Library.


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/e209cf3c
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/e209cf3c
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/e209cf3c

Branch: refs/heads/develop
Commit: e209cf3c969d6769d8971ab0090888963268de66
Parents: d2d5fb7
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Sun Aug 3 12:04:46 2014 +0200
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Sun Aug 3 12:04:46 2014 +0200

----------------------------------------------------------------------
 .../driver/js/vf2js/JSVF2JSConfiguration.java   | 62 ++++++++++++++++++++
 .../driver/mxml/vf2js/MXMLVF2JSBackend.java     |  4 +-
 2 files changed, 64 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e209cf3c/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/vf2js/JSVF2JSConfiguration.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/vf2js/JSVF2JSConfiguration.java
b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/vf2js/JSVF2JSConfiguration.java
new file mode 100644
index 0000000..ec431ca
--- /dev/null
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/vf2js/JSVF2JSConfiguration.java
@@ -0,0 +1,62 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.driver.js.vf2js;
+
+import org.apache.flex.compiler.clients.MXMLJSC;
+import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
+
+/**
+ * The {@link JSVF2JSConfiguration} class holds all compiler arguments needed for
+ * compiling ActionScript to JavaScript the 'goog' way.
+ * <p>
+ * Specific flags are implemented here for the configuration to be loaded by the
+ * configure() method of {@link MXMLJSC}.
+ * <p>
+ * This class inherits all compiler arguments from the MXMLC compiler.
+ * 
+ * @author Erik de Bruin
+ */
+public class JSVF2JSConfiguration extends JSGoogConfiguration
+{
+    public JSVF2JSConfiguration()
+    {
+    }
+
+    //
+    // 'closure-lib'
+    //
+
+    @Override
+    public String getClosureLib()
+    {
+        try
+        {
+            if (closureLib.equals(""))
+            {
+                closureLib = getAbsolutePathFromPathRelativeToMXMLC(
+                        "../lib/google/closure-library");
+            }
+        }
+        catch (Exception e) { /* better to try and fail... */ }
+        
+        return closureLib;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e209cf3c/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/vf2js/MXMLVF2JSBackend.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/vf2js/MXMLVF2JSBackend.java
b/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/vf2js/MXMLVF2JSBackend.java
index 8d95230..3f164d9 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/vf2js/MXMLVF2JSBackend.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/mxml/vf2js/MXMLVF2JSBackend.java
@@ -35,7 +35,7 @@ import org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker;
 import org.apache.flex.compiler.internal.codegen.mxml.MXMLWriter;
 import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSBlockWalker;
 import org.apache.flex.compiler.internal.codegen.mxml.vf2js.MXMLVF2JSEmitter;
-import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
+import org.apache.flex.compiler.internal.driver.js.vf2js.JSVF2JSConfiguration;
 import org.apache.flex.compiler.internal.driver.mxml.MXMLBackend;
 import org.apache.flex.compiler.internal.targets.FlexJSTarget;
 import org.apache.flex.compiler.internal.targets.JSTarget;
@@ -63,7 +63,7 @@ public class MXMLVF2JSBackend extends MXMLBackend
     @Override
     public Configurator createConfigurator()
     {
-        return new Configurator(JSGoogConfiguration.class);
+        return new Configurator(JSVF2JSConfiguration.class);
     }
 
     @Override


Mime
View raw message