You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2017/03/31 05:09:27 UTC

[2/5] git commit: [flex-falcon] [refs/heads/feature/chart-work] - handle subcomponents

handle subcomponents


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

Branch: refs/heads/feature/chart-work
Commit: 1de54cf60c37434cb92b84275e5831818824a1cb
Parents: 2bab63d
Author: Alex Harui <ah...@apache.org>
Authored: Thu Mar 30 11:57:38 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Mar 30 11:57:38 2017 -0700

----------------------------------------------------------------------
 .../compiler/internal/graph/GoogDepsWriter.java   | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/1de54cf6/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
index c4f841d..48937fd 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/graph/GoogDepsWriter.java
@@ -515,7 +515,10 @@ public class GoogDepsWriter {
 	{
 		FileInfo fi = new FileInfo();
 		
+		int numProvides = 0;
+		int constructorCount = 0;
 	    int n = lines.size();
+	    fi.constructorLine = -1;
 	    fi.suppressLine = -1;
 	    fi.fileoverviewLine = -1;
 	    fi.googProvideLine = -1;
@@ -525,7 +528,7 @@ public class GoogDepsWriter {
 	        String line = lines.get(i);
 	        int c2;
 	        int c = line.indexOf("*/");
-	        if (c > -1 && fi.constructorLine > 0)
+	        if (c > -1 && constructorCount > 0 && constructorCount == numProvides)
 	        {
                 return fi;
 	        }
@@ -551,7 +554,12 @@ public class GoogDepsWriter {
                 }
 		        c = line.indexOf("@constructor");
 		        if (c > -1)
-		        	fi.constructorLine = i;
+		        {
+		        	if (fi.constructorLine == -1)
+		        		fi.constructorLine = i;
+		        	constructorCount++;
+		        		
+		        }
 		        else
 		        {
 			        c = line.indexOf("@interface");
@@ -571,7 +579,11 @@ public class GoogDepsWriter {
 				        	{
 					        	c = line.indexOf("goog.provide");
 					        	if (c > -1)
-					        		fi.googProvideLine = i;
+					        	{
+					        		if (fi.googProvideLine == -i)
+					        			fi.googProvideLine = i;
+					        		numProvides++;
+					        	}
 					        	else
 					        	{
 					        		c = line.indexOf("@implements");