flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject git commit: [flex-falcon] [refs/heads/feature/maven-migration-test] - - Merged upstream changes
Date Fri, 22 Apr 2016 14:23:29 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/feature/maven-migration-test 584093001 -> 285887330


- Merged upstream changes


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

Branch: refs/heads/feature/maven-migration-test
Commit: 2858873304a18cc356b975f15fbf06f6d3a1654f
Parents: 5840930
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Fri Apr 22 16:22:36 2016 +0200
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Fri Apr 22 16:22:36 2016 +0200

----------------------------------------------------------------------
 .../compiler/clients/ExternCConfiguration.java  |  30 +--
 .../externals/reference/ClassReference.java     | 182 +++++++++----------
 .../codegen/js/jx/PackageHeaderEmitter.java     | 104 +++++------
 .../internal/projects/FlexJSProject.java        |  78 ++++----
 4 files changed, 197 insertions(+), 197 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/28588733/compiler-jx/src/main/java/org/apache/flex/compiler/clients/ExternCConfiguration.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/clients/ExternCConfiguration.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/clients/ExternCConfiguration.java
index c6e7212..d3118e9 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/clients/ExternCConfiguration.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/clients/ExternCConfiguration.java
@@ -45,7 +45,7 @@ public class ExternCConfiguration extends Configuration
     private File jsRoot;
 
     private File asRoot;
-    
+
     private File asClassRoot;
     private File asInterfaceRoot;
     private File asFunctionRoot;
@@ -76,9 +76,9 @@ public class ExternCConfiguration extends Configuration
     @Mapping("as-root")
     public void setASRoot(ConfigurationValue cfgval, String filename) throws CannotOpen
     {
-    	setASRoot(new File(FilenameNormalization.normalize(getOutputPath(cfgval, filename))));
+        setASRoot(new File(FilenameNormalization.normalize(getOutputPath(cfgval, filename))));
     }
-    
+
     public void setASRoot(File file)
     {
         this.asRoot = file;
@@ -179,8 +179,8 @@ public class ExternCConfiguration extends Configuration
     @InfiniteArguments
     public void setExternal(ConfigurationValue cfgval, String[] vals) throws IOException,
CannotOpen
     {
-    	for (String val : vals)
-    		addExternal(resolvePathStrict(val, cfgval));
+        for (String val : vals)
+            addExternal(resolvePathStrict(val, cfgval));
     }
 
     @Config(allowMultiple = true, isPath = true)
@@ -192,7 +192,7 @@ public class ExternCConfiguration extends Configuration
         for (String val : vals)
             addExternalExtern(resolvePathStrict(val, cfgval));
     }
-    
+
     public boolean isExternalExtern(BaseReference reference)
     {
         String sourceFileName = reference.getNode().getSourceFileName();
@@ -205,7 +205,7 @@ public class ExternCConfiguration extends Configuration
         }
         return false;
     }
-    
+
     public ExcludedMember isExcludedClass(ClassReference classReference)
     {
         for (ExcludedMember memeber : excludesClass)
@@ -217,7 +217,7 @@ public class ExternCConfiguration extends Configuration
     }
 
     public ExcludedMember isExcludedMember(ClassReference classReference,
-            MemberReference memberReference)
+                                           MemberReference memberReference)
     {
         if (memberReference instanceof FieldReference)
         {
@@ -248,10 +248,10 @@ public class ExternCConfiguration extends Configuration
         {
             final String className = values.get(nameIndex);
             final String name = values.get(nameIndex + 1);
-        	addExclude(className, name);
+            addExclude(className, name);
         }
     }
-    
+
     public void addExclude(String className, String name)
     {
         excludes.add(new ExcludedMember(className, name));
@@ -275,10 +275,10 @@ public class ExternCConfiguration extends Configuration
         {
             final String className = values.get(nameIndex);
             final String fieldName = values.get(nameIndex + 1);
-        	addFieldExclude(className, fieldName);
+            addFieldExclude(className, fieldName);
         }
     }
-    
+
     public void addFieldExclude(String className, String fieldName)
     {
         excludesField.add(new ExcludedMember(className, fieldName, ""));
@@ -289,8 +289,8 @@ public class ExternCConfiguration extends Configuration
     @Arguments("class")
     public void setClassExcludes(ConfigurationValue cfgval, List<String> values)
     {
-    	for (String className : values)
-    		addClassExclude(className);
+        for (String className : values)
+            addClassExclude(className);
     }
     public void addClassExclude(String className)
     {
@@ -397,7 +397,7 @@ public class ExternCConfiguration extends Configuration
         }
 
         public boolean isExcluded(ClassReference classReference,
-                MemberReference memberReference)
+                                  MemberReference memberReference)
         {
             if (memberReference == null)
             {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/28588733/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/reference/ClassReference.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/reference/ClassReference.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/reference/ClassReference.java
index fc1df39..f2131a5 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/reference/ClassReference.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/externals/reference/ClassReference.java
@@ -89,25 +89,25 @@ public class ClassReference extends BaseReference
     {
         ArrayList<FieldReference> allMethods = new ArrayList<FieldReference>();
         if (!isInterface())
-        	allMethods.addAll(staticFields.values());
+            allMethods.addAll(staticFields.values());
         allMethods.addAll(instanceFields.values());
         return allMethods;
     }
 
     public ArrayList<MethodReference> getAllMethods()
     {
-    	ArrayList<MethodReference> allMethods = new ArrayList<MethodReference>();
-    	if (!isInterface())
-    		allMethods.addAll(staticMethods.values());
-    	allMethods.addAll(instanceMethods.values());
+        ArrayList<MethodReference> allMethods = new ArrayList<MethodReference>();
+        if (!isInterface())
+            allMethods.addAll(staticMethods.values());
+        allMethods.addAll(instanceMethods.values());
         return allMethods;
     }
 
     public FieldReference getStaticField(String name)
     {
-    	return staticFields.get(name);
+        return staticFields.get(name);
     }
-    
+
     public FieldReference getInstanceField(String name)
     {
         return instanceFields.get(name);
@@ -159,7 +159,7 @@ public class ClassReference extends BaseReference
     }
 
     /**
-     * 
+     *
      * @param model
      * @param node (FUNCTION [NAME, PARAM_LIST, BLOCK]), or (ASSIGN [FUNCTION [NAME, PARAM_LIST,
BLOCK]])
      * @param qualifiedName
@@ -178,7 +178,7 @@ public class ClassReference extends BaseReference
         {
             /*
             var Foo = { ...
-            
+
             VAR 35 [jsdoc_info: JSDocInfo]
                 NAME FontFaceSetLoadStatus
                     OBJECTLIT
@@ -186,17 +186,17 @@ public class ClassReference extends BaseReference
                             STRING loaded
                         STRING_KEY LOADING
                             STRING loading
-                            
+
              Or..
-             
+
              foo.bar.baz.QualifiedEnum = { ...
-             
+
              ASSIGN 50 [jsdoc_info: JSDocInfo]
-                GETPROP 
+                GETPROP
                     GETPROP
                         ...
-                    STRING QualifiedEnum 
-                OBJECTLIT 50 
+                    STRING QualifiedEnum
+                OBJECTLIT 50
              */
 
             String overrideStringType = JSTypeUtils.toEnumTypeString(this);
@@ -242,7 +242,7 @@ public class ClassReference extends BaseReference
         {
             /*
              VAR 882 [jsdoc_info: JSDocInfo]
-                NAME Math 
+                NAME Math
                     OBJECTLIT
              */
             constructor = new NullConstructorReference(model, this, node, getBaseName(),
comment);
@@ -266,8 +266,8 @@ public class ClassReference extends BaseReference
             /*
             VAR 67 [jsdoc_info: JSDocInfo]
                 NAME VarAssignFooNoArgs
-                    FUNCTION 
-                        NAME 
+                    FUNCTION
+                        NAME
                         PARAM_LIST
                         BLOCK
              */
@@ -310,7 +310,7 @@ public class ClassReference extends BaseReference
     }
 
     private static List<String> definedPackages = new ArrayList<String>();
-    
+
     @Override
     public void emit(StringBuilder sb)
     {
@@ -320,39 +320,39 @@ public class ClassReference extends BaseReference
 
         if (outputJS)
         {
-        	sb.append("/** @fileoverview Auto-generated Externs files\n * @externs\n */\n");
-        	if (!packageName.isEmpty())
-        	{
-            	if (!definedPackages.contains(packageName))
-	        	{
-            		definedPackages.add(packageName);
-	        		String[] pieces = packageName.split("\\.");
-	        		String chain = "";
-	        		int n = pieces.length;
-	        		for (int i = 0; i < n; i++)
-	        		{
-	        			String piece = pieces[i];
-	                	sb.append("\n");
-	                	sb.append("\n");
-	        			sb.append("/**\n * @const\n * @suppress {duplicate|const} */\n");
-	        			if (chain.isEmpty())
-	        				sb.append("var " + piece + " = {};\n\n\n");
-	        			else
-	        				sb.append(chain + "." + piece + " = {}\n\n\n");
-	        			chain = chain + "." + piece;
-	        		}
-	        	}
-        	}
+            sb.append("/** @fileoverview Auto-generated Externs files\n * @externs\n */\n");
+            if (!packageName.isEmpty())
+            {
+                if (!definedPackages.contains(packageName))
+                {
+                    definedPackages.add(packageName);
+                    String[] pieces = packageName.split("\\.");
+                    String chain = "";
+                    int n = pieces.length;
+                    for (int i = 0; i < n; i++)
+                    {
+                        String piece = pieces[i];
+                        sb.append("\n");
+                        sb.append("\n");
+                        sb.append("/**\n * @const\n * @suppress {duplicate|const} */\n");
+                        if (chain.isEmpty())
+                            sb.append("var " + piece + " = {};\n\n\n");
+                        else
+                            sb.append(chain + "." + piece + " = {}\n\n\n");
+                        chain = chain + "." + piece;
+                    }
+                }
+            }
         }
         else
         {
-	        sb.append("package ");
-	        if (!packageName.equals(""))
-	            sb.append(packageName).append(" ");
-	        sb.append("{\n");
-	        sb.append("\n");
-	
-	        emitImports(sb);
+            sb.append("package ");
+            if (!packageName.equals(""))
+                sb.append(packageName).append(" ");
+            sb.append("{\n");
+            sb.append("\n");
+
+            emitImports(sb);
         }
 
         if (moduleName != null)
@@ -369,7 +369,7 @@ public class ClassReference extends BaseReference
             sb.append("]");
             sb.append("\n");
         }
-        
+
         emitComment(sb);
 
         boolean isInterface = isInterface();
@@ -385,10 +385,10 @@ public class ClassReference extends BaseReference
 
         if (!outputJS)
         {
-	        sb.append("{\n");
-	        sb.append("\n");
+            sb.append("{\n");
+            sb.append("\n");
         }
-        
+
         if (!isInterface)
         {
             emitConstructor(sb);
@@ -401,7 +401,7 @@ public class ClassReference extends BaseReference
         if (!outputJS)
         {
             sb.append("}\n");
-            sb.append("}\n"); // package        	
+            sb.append("}\n"); // package
         }
     }
 
@@ -572,9 +572,9 @@ public class ClassReference extends BaseReference
         FieldReference field = new FieldReference(getModel(), this, node, fieldName, comment,
isStatic);
 
         if (isStatic)
-        	staticFields.put(fieldName, field);
+            staticFields.put(fieldName, field);
         else
-        	instanceFields.put(fieldName, field);
+            instanceFields.put(fieldName, field);
         return field;
     }
 
@@ -584,7 +584,7 @@ public class ClassReference extends BaseReference
         if (isNamespace)
             isStatic = false;
 		*/
-    	
+
         if (comment == null)
         {
             DebugLogUtils.err("Method comment null for; " + node.getQualifiedName());
@@ -606,7 +606,7 @@ public class ClassReference extends BaseReference
         }
         else
         {
-       	    instanceMethods.put(functionName, method);
+            instanceMethods.put(functionName, method);
         }
         return method;
     }
@@ -739,11 +739,11 @@ public class ClassReference extends BaseReference
     @Override
     protected void emitCommentBody(StringBuilder sb)
     {
-    	super.emitCommentBody(sb);
-		if (isInterface())
-			sb.append(" * @interface\n");
-		else
-			sb.append(" * @constructor ");
+        super.emitCommentBody(sb);
+        if (isInterface())
+            sb.append(" * @interface\n");
+        else
+            sb.append(" * @constructor ");
         if (getComment().hasBaseType())
         {
             emitSuperClass(sb);
@@ -753,11 +753,11 @@ public class ClassReference extends BaseReference
             emitImplements(sb);
         }
     }
-    
+
     private void emitClass(StringBuilder sb)
     {
-    	if (outputJS)
-    		return;
+        if (outputJS)
+            return;
 
         sb.append("public ");
         if (isDynamic)
@@ -814,19 +814,19 @@ public class ClassReference extends BaseReference
 
     private void emitSuperClass(StringBuilder sb)
     {
-    	if (outputJS)
-    	{
-	        sb.append(" * @extends ");
-	        String value = JSTypeUtils.toClassTypeString(this);
-	        sb.append(value);
-	        sb.append("\n");
-    	}
-    	else
-    	{
-	        sb.append("extends ");
-	        String value = JSTypeUtils.toClassTypeString(this);
-	        sb.append(value);
-    	}
+        if (outputJS)
+        {
+            sb.append(" * @extends ");
+            String value = JSTypeUtils.toClassTypeString(this);
+            sb.append(value);
+            sb.append("\n");
+        }
+        else
+        {
+            sb.append("extends ");
+            String value = JSTypeUtils.toClassTypeString(this);
+            sb.append(value);
+        }
     }
 
     private void emitImplements(StringBuilder sb)
@@ -836,9 +836,9 @@ public class ClassReference extends BaseReference
             return;
 
         if (outputJS)
-        	sb.append(" * @implements ");
+            sb.append(" * @implements ");
         else
-        	sb.append("implements ");
+            sb.append("implements ");
 
         int len = implementedInterfaces.size();
         for (int i = 0; i < len; i++)
@@ -847,11 +847,11 @@ public class ClassReference extends BaseReference
 
             sb.append(value);
             if (outputJS)
-            	sb.append("\n");
+                sb.append("\n");
             else
             {
-	            if (i < len - 1)
-	                sb.append(", ");
+                if (i < len - 1)
+                    sb.append(", ");
             }
         }
 
@@ -887,14 +887,14 @@ public class ClassReference extends BaseReference
 
     public File getFile(File asSourceRoot)
     {
-    	File jsRoot = getModel().getConfiguration().getJsRoot();
-    	if (jsRoot == null)
-    	{
+        File jsRoot = getModel().getConfiguration().getJsRoot();
+        if (jsRoot == null)
+        {
             String packagePath = toPackagePath();
-            return new File(asSourceRoot, packagePath + File.separator + getBaseName() +
".as");    		
-    	}
-    	
-    	return new File(jsRoot, getBaseName() + ".js");
+            return new File(asSourceRoot, packagePath + File.separator + getBaseName() +
".as");
+        }
+
+        return new File(jsRoot, getBaseName() + ".js");
     }
 
     private String toPackagePath()

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/28588733/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
index 6ce6328..c67c0c7 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/PackageHeaderEmitter.java
@@ -93,15 +93,15 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
         {
             return;
         }
-        
+
         FlexJSProject project = (FlexJSProject) getProject();
         List<File> sourcePaths = project.getSourcePath();
         String sourceName = definition.getSourcePath();
         for (File sourcePath : sourcePaths)
         {
-            if (sourceName.startsWith(sourcePath.getAbsolutePath())) 
+            if (sourceName.startsWith(sourcePath.getAbsolutePath()))
             {
-            	sourceName = sourceName.substring(sourcePath.getAbsolutePath().length() + 1);
       	
+                sourceName = sourceName.substring(sourcePath.getAbsolutePath().length() +
1);
             }
         }
 
@@ -112,7 +112,7 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
         writeNewline(" * @fileoverview");
         writeNewline(" *");
         // need to suppress access controls so access to protected/private from defineProperties
-        // doesn't generate warnings. 
+        // doesn't generate warnings.
         writeNewline(" * @suppress {checkTypes|accessControls}");
         writeNewline(" */");
         writeNewline();
@@ -132,7 +132,7 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
     {
         // TODO (mschmalle) will remove this cast as more things get abstracted
         JSFlexJSEmitter fjs = (JSFlexJSEmitter) getEmitter();
-        
+
         getEmitter().pushSourceMapName(definition.getNode());
 
         PackageScope containedScope = (PackageScope) definition
@@ -145,40 +145,40 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
         IDefinition otherMainDefinition = null;
         if (type == null)
         {
-        	if (localDefinitions.isEmpty())
-        		return;
-        	// function or variable definition
-        	otherMainDefinition = localDefinitions.iterator().next();
+            if (localDefinitions.isEmpty())
+                return;
+            // function or variable definition
+            otherMainDefinition = localDefinitions.iterator().next();
         }
         else
         {
-	        ITypeNode typeNode = type.getNode();
-	        if (typeNode instanceof ClassNode)
-	        {
-	            ClassNode classNode = (ClassNode) typeNode;
-	            ASDocComment asDoc = (ASDocComment) classNode.getASDocComment();
-	            if (asDoc != null)
-	            {
-	                String asDocString = asDoc.commentNoEnd();
-	                String ignoreToken = JSFlexJSEmitterTokens.IGNORE_IMPORT
-	                        .getToken();
-	                int ignoreIndex = asDocString.indexOf(ignoreToken);
-	                while (ignoreIndex != -1)
-	                {
-	                    String ignorable = asDocString.substring(ignoreIndex
-	                            + ignoreToken.length());
-	                    int endIndex = ignorable.indexOf("\n");
-	                    ignorable = ignorable.substring(0, endIndex);
-	                    ignorable = ignorable.trim();
-	                    // pretend we've already written the goog.requires for this
-	                    writtenRequires.add(ignorable);
-	                    ignoreIndex = asDocString.indexOf(ignoreToken,
-	                            ignoreIndex + ignoreToken.length());
-	                }
-	            }
-	        }
+            ITypeNode typeNode = type.getNode();
+            if (typeNode instanceof ClassNode)
+            {
+                ClassNode classNode = (ClassNode) typeNode;
+                ASDocComment asDoc = (ASDocComment) classNode.getASDocComment();
+                if (asDoc != null)
+                {
+                    String asDocString = asDoc.commentNoEnd();
+                    String ignoreToken = JSFlexJSEmitterTokens.IGNORE_IMPORT
+                            .getToken();
+                    int ignoreIndex = asDocString.indexOf(ignoreToken);
+                    while (ignoreIndex != -1)
+                    {
+                        String ignorable = asDocString.substring(ignoreIndex
+                                + ignoreToken.length());
+                        int endIndex = ignorable.indexOf("\n");
+                        ignorable = ignorable.substring(0, endIndex);
+                        ignorable = ignorable.trim();
+                        // pretend we've already written the goog.requires for this
+                        writtenRequires.add(ignorable);
+                        ignoreIndex = asDocString.indexOf(ignoreToken,
+                                ignoreIndex + ignoreToken.length());
+                    }
+                }
+            }
         }
-        
+
         //        if (project == null)
         //            project = getWalker().getProject();
 
@@ -189,19 +189,19 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
         ArrayList<String> requiresList = flexProject.getRequires(cu);
         ArrayList<String> interfacesList = flexProject.getInterfaces(cu);
         ArrayList<String> externalRequiresList = flexProject.getExternalRequires(cu);
-        
+
         String cname = (type != null) ? type.getQualifiedName() : otherMainDefinition.getQualifiedName();
         writtenRequires.add(cname); // make sure we don't add ourselves
 
         boolean emitsRequires = emitRequires(requiresList, writtenRequires, cname);
         boolean emitsInterfaces = emitInterfaces(interfacesList, writtenRequires);
 
-        // erikdebruin: Add missing language feature support, with e.g. 'is' and 
+        // erikdebruin: Add missing language feature support, with e.g. 'is' and
         //              'as' operators. We don't need to worry about requiring
         //              this in every project: ADVANCED_OPTIMISATIONS will NOT
         //              include any of the code if it is not used in the project.
-        boolean makingSWC = flexProject.getSWFTarget() != null && 
-        					flexProject.getSWFTarget().getTargetType() == TargetType.SWC;
+        boolean makingSWC = flexProject.getSWFTarget() != null &&
+                flexProject.getSWFTarget().getTargetType() == TargetType.SWC;
         boolean isMainCU = flexProject.mainCU != null
                 && cu.getName().equals(flexProject.mainCU.getName());
         if (isMainCU || makingSWC)
@@ -209,16 +209,16 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
             ICompilerProject project = this.getProject();
             if (project instanceof FlexJSProject)
             {
-            	if (((FlexJSProject)project).needLanguage)
-            	{
-		            write(JSGoogEmitterTokens.GOOG_REQUIRE);
-		            write(ASEmitterTokens.PAREN_OPEN);
-		            write(ASEmitterTokens.SINGLE_QUOTE);
-		            write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
-		            write(ASEmitterTokens.SINGLE_QUOTE);
-		            write(ASEmitterTokens.PAREN_CLOSE);
-		            writeNewline(ASEmitterTokens.SEMICOLON);
-            	}
+                if (((FlexJSProject)project).needLanguage)
+                {
+                    write(JSGoogEmitterTokens.GOOG_REQUIRE);
+                    write(ASEmitterTokens.PAREN_OPEN);
+                    write(ASEmitterTokens.SINGLE_QUOTE);
+                    write(JSFlexJSEmitterTokens.LANGUAGE_QNAME);
+                    write(ASEmitterTokens.SINGLE_QUOTE);
+                    write(ASEmitterTokens.PAREN_CLOSE);
+                    writeNewline(ASEmitterTokens.SEMICOLON);
+                }
             }
         }
 
@@ -232,7 +232,7 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
         writeNewline();
         writeNewline();
     }
-    
+
     private boolean emitRequires(List<String> requiresList, List<String> writtenRequires,
String cname)
     {
         boolean emitsRequires = false;
@@ -276,7 +276,7 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
         }
         return emitsRequires;
     }
-    
+
     private boolean emitInterfaces(List<String> interfacesList, List<String>
writtenRequires)
     {
         boolean emitsInterfaces = false;
@@ -301,7 +301,7 @@ public class PackageHeaderEmitter extends JSSubEmitter implements
         }
         return emitsInterfaces;
     }
-    
+
     private boolean emitExternalRequires(List<String> externalRequiresList, List<String>
writtenRequires)
     {
         boolean emitsExternalRequires = false;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/28588733/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
index dab4843..bc6ffe7 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/projects/FlexJSProject.java
@@ -45,14 +45,14 @@ import org.apache.flex.compiler.units.ICompilationUnit;
 
 /**
  * @author aharui
- * 
+ *
  */
 public class FlexJSProject extends FlexProject
 {
 
     /**
      * Constructor
-     * 
+     *
      * @param workspace The {@code Workspace} containing this project.
      */
     public FlexJSProject(Workspace workspace)
@@ -66,12 +66,12 @@ public class FlexJSProject extends FlexProject
     private HashMap<ICompilationUnit, HashMap<String, DependencyType>> jsModules
= new HashMap<ICompilationUnit, HashMap<String, DependencyType>>();
 
     public JSGoogConfiguration config;
-    
+
     public ICompilationUnit mainCU;
 
     @Override
     public void addDependency(ICompilationUnit from, ICompilationUnit to,
-            DependencyType dt, String qname)
+                              DependencyType dt, String qname)
     {
         // ToDo (erikdebruin): add VF2JS conditional -> only use check during full SDK
compilation
         List<IDefinition> dp = to.getDefinitionPromises();
@@ -106,8 +106,8 @@ public class FlexJSProject extends FlexProject
                 }
                 else if (!isExternalLinkage(to) || qname.equals("Namespace"))
                 {
-                	if (qname.equals("XML"))
-                		needXML = true;
+                    if (qname.equals("XML"))
+                        needXML = true;
                     reqs.put(qname, dt);
                 }
                 if (jsModules.containsKey(from))
@@ -152,8 +152,8 @@ public class FlexJSProject extends FlexProject
 
                 if (!interfacesArr.containsKey(qname))
                 {
-                	if (qname.equals("org.apache.flex.core.IValuesImpl"))
-                		needCSS = true;
+                    if (qname.equals("org.apache.flex.core.IValuesImpl"))
+                        needCSS = true;
                     interfacesArr.put(qname, qname);
                 }
             }
@@ -165,10 +165,10 @@ public class FlexJSProject extends FlexProject
     public boolean needLanguage;
     public boolean needCSS;
     public boolean needXML;
-    
+
     private LinkageChecker linkageChecker;
     private ITargetSettings ts;
-    
+
     // definitions that should be considered external linkage
     public Collection<String> unitTestExterns;
 
@@ -203,30 +203,30 @@ public class FlexJSProject extends FlexProject
         // in unit tests, ts may be null and LinkageChecker NPEs
         if (ts == null)
         {
-        	if (unitTestExterns != null)
-        	{
-        		try {
-        			if (!(cu instanceof SWCCompilationUnit))
-        				if (unitTestExterns.contains(cu.getQualifiedNames().get(0)))
-        					return true;
-				} catch (InterruptedException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-        	}
+            if (unitTestExterns != null)
+            {
+                try {
+                    if (!(cu instanceof SWCCompilationUnit))
+                        if (unitTestExterns.contains(cu.getQualifiedNames().get(0)))
+                            return true;
+                } catch (InterruptedException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
             return false;
         }
 
         List<String> qnames;
-		try {
-			qnames = cu.getQualifiedNames();
-	        String qname = qnames.get(0);
-	        if (qname.equals("QName"))
-	        	return false;
-		} catch (InterruptedException e1) {
-			// TODO Auto-generated catch block
-			e1.printStackTrace();
-		}
+        try {
+            qnames = cu.getQualifiedNames();
+            String qname = qnames.get(0);
+            if (qname.equals("QName"))
+                return false;
+        } catch (InterruptedException e1) {
+            // TODO Auto-generated catch block
+            e1.printStackTrace();
+        }
         try
         {
             return linkageChecker.isExternal(cu);
@@ -315,14 +315,14 @@ public class FlexJSProject extends FlexProject
     @Override
     public void setTargetSettings(ITargetSettings value)
     {
-         super.setTargetSettings(value);
-         ts = value;
-         linkageChecker = new LinkageChecker(this, value);
-         try {
-			linkageChecker.initExterns();
-		} catch (InterruptedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
+        super.setTargetSettings(value);
+        ts = value;
+        linkageChecker = new LinkageChecker(this, value);
+        try {
+            linkageChecker.initExterns();
+        } catch (InterruptedException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
     }
 }


Mime
View raw message