flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [6/8] git commit: [flex-falcon] [refs/heads/feature/maven-migration] - Added a flex-tool-api wrapper to the EXTERNC tool
Date Sat, 19 Mar 2016 12:04:48 GMT
Added a flex-tool-api wrapper to the EXTERNC tool


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

Branch: refs/heads/feature/maven-migration
Commit: 69a08def04ff9dbe88a2855f56539c7eb52054f5
Parents: 40e0fbd
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Sat Mar 19 12:42:10 2016 +0100
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Sat Mar 19 12:42:10 2016 +0100

----------------------------------------------------------------------
 .../apache/flex/compiler/clients/EXTERNC.java   | 27 +++++++++++++++++++-
 .../flex/compiler/clients/FlexJSToolGroup.java  |  1 +
 2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69a08def/compiler.jx/src/org/apache/flex/compiler/clients/EXTERNC.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/EXTERNC.java b/compiler.jx/src/org/apache/flex/compiler/clients/EXTERNC.java
index a488b90..ed96162 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/EXTERNC.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/EXTERNC.java
@@ -33,11 +33,12 @@ import org.apache.flex.compiler.problems.ICompilerProblem;
 import org.apache.flex.compiler.targets.ITarget.TargetType;
 
 import com.google.javascript.jscomp.Result;
+import org.apache.flex.tools.FlexTool;
 
 /**
  * @author Michael Schmalle
  */
-public class EXTERNC
+public class EXTERNC implements FlexTool
 {
     static enum ExitCode
     {
@@ -188,4 +189,28 @@ public class EXTERNC
         return compiler.compile();
     }
 
+    @Override
+    public String getName() {
+        // TODO: Change this to a flex-tool-api constant ...
+        return "EXTERNC";
+    }
+
+    @Override
+    public int execute(String[] args) {
+        EXTERNC generator = new EXTERNC();
+        generator.configure(args);
+        try {
+            generator.cleanOutput();
+            /*Result result =*/ generator.compile();
+            // We ignore errors for now ... they seem to be normal.
+            /*if(result.errors.length > 0) {
+                return 1;
+            }*/
+            generator.emit();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return 0;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/69a08def/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java b/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
index f7c48be..e99a5ab 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/FlexJSToolGroup.java
@@ -31,6 +31,7 @@ public class FlexJSToolGroup extends AbstractFlexToolGroup {
         super("FlexJS");
         addFlexTool(new COMPJSC(new MXMLFlexJSBackend()));
         addFlexTool(new MXMLJSC(new MXMLFlexJSBackend()));
+        addFlexTool(new EXTERNC());
     }
 
 }


Mime
View raw message