flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [64/83] [abbrv] git commit: [flex-falcon] [refs/heads/develop] - handle externs when filtering output
Date Fri, 25 Sep 2015 04:49:33 GMT
handle externs when filtering output


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

Branch: refs/heads/develop
Commit: 116cff8f4fcd6a4b818a51916f7e8c74dfae1a6f
Parents: b8a026e
Author: Alex Harui <aharui@apache.org>
Authored: Thu Sep 17 13:58:46 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Sep 22 10:35:15 2015 -0700

----------------------------------------------------------------------
 .../src/org/apache/flex/compiler/clients/COMPJSC.java        | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/116cff8f/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
index ea075c6..caf6577 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
@@ -45,6 +45,7 @@ import org.apache.flex.compiler.internal.driver.mxml.flexjs.MXMLFlexJSSWCBackend
 import org.apache.flex.compiler.internal.driver.mxml.jsc.MXMLJSCJSSWCBackend;
 import org.apache.flex.compiler.internal.driver.mxml.vf2js.MXMLVF2JSSWCBackend;
 import org.apache.flex.compiler.internal.projects.CompilerProject;
+import org.apache.flex.compiler.internal.targets.FlexJSSWCTarget;
 import org.apache.flex.compiler.internal.targets.JSTarget;
 import org.apache.flex.compiler.problems.ICompilerProblem;
 import org.apache.flex.compiler.problems.InternalCompilerProblem;
@@ -198,7 +199,9 @@ public class COMPJSC extends MXMLJSC
 
                 File outputFolder = new File(getOutputFilePath());
 
-                Collection<ICompilationUnit> reachableCompilationUnits = project.getCompilationUnits();
+                Set<String> externs = config.getExterns();
+                Collection<ICompilationUnit> roots = ((FlexJSSWCTarget)target).getReachableCompilationUnits(errors);
+                Collection<ICompilationUnit> reachableCompilationUnits = project.getReachableCompilationUnitsInSWFOrder(roots);
                 for (final ICompilationUnit cu : reachableCompilationUnits)
                 {
                     ICompilationUnit.UnitType cuType = cu.getCompilationUnitType();
@@ -206,6 +209,9 @@ public class COMPJSC extends MXMLJSC
                     if (cuType == ICompilationUnit.UnitType.AS_UNIT
                             || cuType == ICompilationUnit.UnitType.MXML_UNIT)
                     {
+                    	String symbol = cu.getQualifiedNames().get(0);
+                    	if (externs.contains(symbol)) continue;
+                    	
                         final File outputClassFile = getOutputClassFile(
                                 cu.getQualifiedNames().get(0), outputFolder);
 


Mime
View raw message