flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: correct formatting and headers
Date Fri, 12 Apr 2013 18:11:36 GMT
Updated Branches:
  refs/heads/develop 31da8f27b -> 7a2ebde9c


correct formatting and headers


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

Branch: refs/heads/develop
Commit: 7a2ebde9c316a5a2bd762ce5d39600a5f4b644bb
Parents: 31da8f2
Author: Alex Harui <aharui@apache.org>
Authored: Fri Apr 12 11:11:15 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Apr 12 11:11:28 2013 -0700

----------------------------------------------------------------------
 .../compiler/internal/codegen/as/ASEmitter.java    |    2 +-
 .../codegen/js/flexjs/JSFlexJSEmitter.java         |  367 ++++++++-------
 .../codegen/js/flexjs/JSFlexJSGoogDocEmitter.java  |   40 ++-
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java     |   53 +-
 .../compiler/internal/projects/FlexJSProject.java  |   19 +-
 5 files changed, 260 insertions(+), 221 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7a2ebde9/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
index f7d6620..68a595a 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitter.java
@@ -636,7 +636,7 @@ public class ASEmitter implements IASEmitter, IEmitter
     @Override
     public void emitLocalNamedFunction(IFunctionNode node)
     {
-        FunctionNode fnode = (FunctionNode)node;
+        FunctionNode fnode = (FunctionNode) node;
         write(ASEmitterTokens.FUNCTION);
         write(ASEmitterTokens.SPACE);
         write(fnode.getName());

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7a2ebde9/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index 91bc345..5e78738 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -101,11 +101,11 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
     @Override
     public void emitClass(IClassNode node)
     {
-    	thisClass = node.getDefinition();
-    	
-    	super.emitClass(node);
+        thisClass = node.getDefinition();
+
+        super.emitClass(node);
     }
-    
+
     @Override
     public void emitField(IVariableNode node)
     {
@@ -205,12 +205,13 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
 
             if (node.isNewExpression())
             {
-            	def = node.resolveCalledExpression(getWalker().getProject());
-            	// all new calls to a class should be fully qualified names
-            	if (def instanceof ClassDefinition)
-            		write(def.getQualifiedName());
-            	else // I think we still need this for "new someVarOfTypeClass"
-            		getWalker().walk(node.getNameNode());
+                def = node.resolveCalledExpression(getWalker().getProject());
+                // all new calls to a class should be fully qualified names
+                if (def instanceof ClassDefinition)
+                    write(def.getQualifiedName());
+                else
+                    // I think we still need this for "new someVarOfTypeClass"
+                    getWalker().walk(node.getNameNode());
                 write(ASEmitterTokens.PAREN_OPEN);
                 walkArguments(node.getArgumentNodes());
                 write(ASEmitterTokens.PAREN_CLOSE);
@@ -235,18 +236,19 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         }
     }
 
-    private boolean isSameClass(IDefinition pdef, IDefinition thisClass2, ICompilerProject
project)
+    private boolean isSameClass(IDefinition pdef, IDefinition thisClass2,
+            ICompilerProject project)
     {
-    	if (pdef == thisClass2)
-    		return true;
-    
-    	// needs to be a loop
-    	if (((ClassDefinition) thisClass2).resolveBaseClass(project) == pdef)
-    		return true;
-    	
-    	return false;
+        if (pdef == thisClass2)
+            return true;
+
+        // needs to be a loop
+        if (((ClassDefinition) thisClass2).resolveBaseClass(project) == pdef)
+            return true;
+
+        return false;
     }
-    
+
     @Override
     public void emitIdentifier(IIdentifierNode node)
     {
@@ -256,9 +258,9 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                 .getAncestorOfType(IClassNode.class);
 
         String name = node.getName();
-        
+
         IDefinition def = ((IIdentifierNode) node).resolve(project);
-        
+
         ITypeDefinition type = ((IIdentifierNode) node).resolveType(project);
 
         IASNode pnode = node.getParent();
@@ -279,25 +281,23 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                     if (!(pnode instanceof FunctionNode)
                             && inode != ASTNodeID.MemberAccessExpressionID)
                     {
-                    	if (def instanceof FunctionDefinition)
-                    	{
-                    		if (((FunctionDefinition)def).getFunctionClassification() !=
-                    			IFunctionDefinition.FunctionClassification.LOCAL)
-                    			writeSelf = true;
-                    	}
-                    	else
-                    		writeSelf = true;
+                        if (def instanceof FunctionDefinition)
+                        {
+                            if (((FunctionDefinition) def)
+                                    .getFunctionClassification() != IFunctionDefinition.FunctionClassification.LOCAL)
+                                writeSelf = true;
+                        }
+                        else
+                            writeSelf = true;
                         break;
                     }
                     else if (inode == ASTNodeID.MemberAccessExpressionID
-                            && !def.isStatic() && 
-                            (pnode.getChild(0) == node ||
-                            	(pnode.getChild(0) instanceof ILanguageIdentifierNode &&
-                            			((ILanguageIdentifierNode) pnode.getChild(0))
-                                        .getKind() == ILanguageIdentifierNode.LanguageIdentifierKind.THIS)))
+                            && !def.isStatic()
+                            && (pnode.getChild(0) == node || (pnode.getChild(0) instanceof
ILanguageIdentifierNode && ((ILanguageIdentifierNode) pnode
+                                    .getChild(0)).getKind() == ILanguageIdentifierNode.LanguageIdentifierKind.THIS)))
                     {
-                    	// we are in a member access expression and it isn't a static
-                    	// and we are the left node, or the left node is 'this'
+                        // we are in a member access expression and it isn't a static
+                        // and we are the left node, or the left node is 'this'
                         String tname = type.getQualifiedName();
                         writeSelf = !tname.equalsIgnoreCase(cnode
                                 .getQualifiedName())
@@ -313,37 +313,36 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             //               well enough alone!
             if (def instanceof VariableDefinition)
             {
-        		VariableDefinition vardef = (VariableDefinition)def;
-        		IDefinition pdef = vardef.getParent();
+                VariableDefinition vardef = (VariableDefinition) def;
+                IDefinition pdef = vardef.getParent();
                 if (inode == ASTNodeID.MemberAccessExpressionID)
                 {
-                	if (pdef == thisClass && pnode.getChild(0) == node)
-                		writeSelf = true;
+                    if (pdef == thisClass && pnode.getChild(0) == node)
+                        writeSelf = true;
                 }
                 else if (inode == ASTNodeID.ContainerID)
                 {
-                	if (isSameClass(pdef, thisClass, project))
-                	{
-                		writeSelf = true;
-                		writeThis = true;
-                	}
+                    if (isSameClass(pdef, thisClass, project))
+                    {
+                        writeSelf = true;
+                        writeThis = true;
+                    }
                 }
                 else if (!(pnode instanceof ParameterNode))
                 {
-                	if (pdef == thisClass)
-                		writeSelf = true;
+                    if (pdef == thisClass)
+                        writeSelf = true;
                 }
             }
             else if (inode == ASTNodeID.ContainerID)
             {
-            	if (def instanceof FunctionDefinition)
-            	{
-            		if (((FunctionDefinition)def).getFunctionClassification() !=
-            			IFunctionDefinition.FunctionClassification.LOCAL)
-            			writeSelf = true;
-            	}
-            	else
-            		writeSelf = true;
+                if (def instanceof FunctionDefinition)
+                {
+                    if (((FunctionDefinition) def).getFunctionClassification() != IFunctionDefinition.FunctionClassification.LOCAL)
+                        writeSelf = true;
+                }
+                else
+                    writeSelf = true;
             }
             else if (inode == ASTNodeID.FunctionCallID
                     && !(def instanceof AccessorDefinition)
@@ -364,9 +363,9 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
 
         if (writeSelf && !isRunningInTestMode)
         {
-            boolean useGoogBind = inode == ASTNodeID.ContainerID && !writeThis 
-            							&& def instanceof FunctionDefinition &&
-            							!def.isStatic();
+            boolean useGoogBind = inode == ASTNodeID.ContainerID
+                    && !writeThis && def instanceof FunctionDefinition
+                    && !def.isStatic();
 
             if (useGoogBind)
             {
@@ -378,8 +377,8 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                 write(ASEmitterTokens.THIS);
             else if (def.isStatic())
             {
-            	String sname = def.getParent().getQualifiedName();
-            	write(sname);
+                String sname = def.getParent().getQualifiedName();
+                write(sname);
             }
             else
                 write(JSGoogEmitterTokens.SELF);
@@ -388,7 +387,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             if (useGoogBind)
             {
                 write(node.getName());
-                
+
                 writeToken(ASEmitterTokens.COMMA);
                 write(JSGoogEmitterTokens.SELF);
                 write(ASEmitterTokens.PAREN_CLOSE);
@@ -398,16 +397,17 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         }
         else if (def != null && def.isStatic())
         {
-        	String sname = def.getParent().getQualifiedName();
-        	write(sname);
+            String sname = def.getParent().getQualifiedName();
+            write(sname);
             write(ASEmitterTokens.MEMBER_ACCESS);
         }
 
         IDefinition parentDef = (def != null) ? def.getParent() : null;
-        boolean isNative = (parentDef != null) && NativeUtils.isNative(parentDef.getBaseName());
-        if ((def instanceof AccessorDefinition && !isNative) || 
-        		(def instanceof VariableDefinition && 
-        				((VariableDefinition)def).isBindable()))
+        boolean isNative = (parentDef != null)
+                && NativeUtils.isNative(parentDef.getBaseName());
+        if ((def instanceof AccessorDefinition && !isNative)
+                || (def instanceof VariableDefinition && ((VariableDefinition) def)
+                        .isBindable()))
         {
             IASNode anode = node
                     .getAncestorOfType(BinaryOperatorAssignmentNode.class);
@@ -415,35 +415,35 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             boolean isAssignment = false;
             if (anode != null)
             {
-            	IASNode leftNode = anode.getChild(0);
-            	if (anode == pnode)
-            	{
-            		if (node == leftNode)
-            			isAssignment = true;
-            	}
-            	else
-            	{
-	            	IASNode parentNode = pnode;
-	            	IASNode thisNode = node;
-	            	while (anode != parentNode)
-	            	{
-	            		if (parentNode instanceof IMemberAccessExpressionNode)
-	            		{
-	            			if (thisNode != parentNode.getChild(1))
-	            			{
-	            				// can't be an assignment because 
-	            				// we're on the left side of a memberaccessexpression
-	            				break;
-	            			}
-	            		}
-	            		if (parentNode == leftNode)
-	            		{
-	            			isAssignment = true;
-	            		}
-	            		thisNode = parentNode;
-	            		parentNode = parentNode.getParent();
-	            	}
-            	}
+                IASNode leftNode = anode.getChild(0);
+                if (anode == pnode)
+                {
+                    if (node == leftNode)
+                        isAssignment = true;
+                }
+                else
+                {
+                    IASNode parentNode = pnode;
+                    IASNode thisNode = node;
+                    while (anode != parentNode)
+                    {
+                        if (parentNode instanceof IMemberAccessExpressionNode)
+                        {
+                            if (thisNode != parentNode.getChild(1))
+                            {
+                                // can't be an assignment because 
+                                // we're on the left side of a memberaccessexpression
+                                break;
+                            }
+                        }
+                        if (parentNode == leftNode)
+                        {
+                            isAssignment = true;
+                        }
+                        thisNode = parentNode;
+                        parentNode = parentNode.getParent();
+                    }
+                }
             }
 
             writeGetSetPrefix(!isAssignment);
@@ -567,7 +567,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             write(ASEmitterTokens.SEMICOLON);
         }
     }
-    
+
     @Override
     public void emitBinaryOperator(IBinaryOperatorNode node)
     {
@@ -587,11 +587,11 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             int leftSideChildCount = leftSide.getChildCount();
             if (leftSideChildCount > 0)
             {
-            	IASNode childNode = leftSide.getChild(leftSideChildCount - 1);
-            	if (childNode instanceof IExpressionNode)
-            		property = (IExpressionNode) childNode;
-            	else
-            		property = leftSide;
+                IASNode childNode = leftSide.getChild(leftSideChildCount - 1);
+                if (childNode instanceof IExpressionNode)
+                    property = (IExpressionNode) childNode;
+                else
+                    property = leftSide;
             }
             else
                 property = leftSide;
@@ -634,10 +634,11 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         IDefinition def = node.resolve(project);
         boolean isStatic = false;
         if (def != null && def.isStatic())
-        	isStatic = true;
-        
-        if (!isStatic && !(leftNode instanceof ILanguageIdentifierNode &&
((ILanguageIdentifierNode) leftNode)
-                .getKind() == ILanguageIdentifierNode.LanguageIdentifierKind.THIS))
+            isStatic = true;
+
+        if (!isStatic
+                && !(leftNode instanceof ILanguageIdentifierNode && ((ILanguageIdentifierNode)
leftNode)
+                        .getKind() == ILanguageIdentifierNode.LanguageIdentifierKind.THIS))
         {
             getWalker().walk(node.getLeftOperandNode());
             write(node.getOperator().getOperatorText());
@@ -678,6 +679,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         //writeNewline();
         emitMethodScope(node.getScopedNode());
     }
+
     private void writeGetSetPrefix(boolean isGet)
     {
         if (isGet)
@@ -686,7 +688,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
             write(ASEmitterTokens.SET);
         write("_");
     }
-    
+
     @Override
     public IDocEmitter getDocEmitter()
     {
@@ -703,84 +705,85 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         if (type == null)
             return;
 
-        FlexJSProject project = (FlexJSProject)getWalker().getProject();
+        FlexJSProject project = (FlexJSProject) getWalker().getProject();
         ASProjectScope projectScope = (ASProjectScope) project.getScope();
-        ICompilationUnit cu = projectScope.getCompilationUnitForDefinition(type);
+        ICompilationUnit cu = projectScope
+                .getCompilationUnitForDefinition(type);
         ArrayList<String> list = project.getRequires(cu);
 
         String cname = type.getQualifiedName();
         ArrayList<String> writtenInstances = new ArrayList<String>();
-        writtenInstances.add(cname);	// make sure we don't add ourselves
+        writtenInstances.add(cname); // make sure we don't add ourselves
 
         if (list != null)
         {
-	        for (String imp : list)
-	        {
-	            if (imp.indexOf(JSGoogEmitterTokens.AS3.getToken()) != -1)
-	                continue;
-	
-	            if (imp.equals(cname))
-	                continue;
-	
-	            if (imp.equals("Array"))
-	            	continue;
-	            if (imp.equals("Boolean"))
-	            	continue;
-	            if (imp.equals("decodeURI"))
-	            	continue;
-	            if (imp.equals("decodeURIComponent"))
-	            	continue;
-	            if (imp.equals("encodeURI"))
-	            	continue;
-	            if (imp.equals("encodeURIComponent"))
-	            	continue;
-	            if (imp.equals("Error"))
-	            	continue;
-	            if (imp.equals("Function"))
-	            	continue;
-	            if (imp.equals("JSON"))
-	            	continue;
-	            if (imp.equals("Number"))
-	            	continue;
-	            if (imp.equals("int"))
-	            	continue;
-	            if (imp.equals("Object"))
-	            	continue;
-	            if (imp.equals("RegExp"))
-	            	continue;
-	            if (imp.equals("String"))
-	            	continue;
-	            if (imp.equals("uint"))
-	            	continue;
-	
-	            if (writtenInstances.indexOf(imp) == -1)
-	            {
-		            
-		            /* goog.require('x');\n */
-		            write(JSGoogEmitterTokens.GOOG_REQUIRE);
-		            write(ASEmitterTokens.PAREN_OPEN);
-		            write(ASEmitterTokens.SINGLE_QUOTE);
-		            write(imp);
-		            write(ASEmitterTokens.SINGLE_QUOTE);
-		            write(ASEmitterTokens.PAREN_CLOSE);
-		            writeNewline(ASEmitterTokens.SEMICOLON);
-		            writtenInstances.add(imp);
-	            }
-	        }
-	
-	        // (erikdebruin) only write 'closing' line break when there are 
-	        //               actually imports...
-	        if (list.size() > 1
-	                || (list.size() == 1 && list.get(0).indexOf(
-	                        JSGoogEmitterTokens.AS3.getToken()) == -1))
-	        {
-	            writeNewline();
-	        }
+            for (String imp : list)
+            {
+                if (imp.indexOf(JSGoogEmitterTokens.AS3.getToken()) != -1)
+                    continue;
+
+                if (imp.equals(cname))
+                    continue;
+
+                if (imp.equals("Array"))
+                    continue;
+                if (imp.equals("Boolean"))
+                    continue;
+                if (imp.equals("decodeURI"))
+                    continue;
+                if (imp.equals("decodeURIComponent"))
+                    continue;
+                if (imp.equals("encodeURI"))
+                    continue;
+                if (imp.equals("encodeURIComponent"))
+                    continue;
+                if (imp.equals("Error"))
+                    continue;
+                if (imp.equals("Function"))
+                    continue;
+                if (imp.equals("JSON"))
+                    continue;
+                if (imp.equals("Number"))
+                    continue;
+                if (imp.equals("int"))
+                    continue;
+                if (imp.equals("Object"))
+                    continue;
+                if (imp.equals("RegExp"))
+                    continue;
+                if (imp.equals("String"))
+                    continue;
+                if (imp.equals("uint"))
+                    continue;
+
+                if (writtenInstances.indexOf(imp) == -1)
+                {
+
+                    /* goog.require('x');\n */
+                    write(JSGoogEmitterTokens.GOOG_REQUIRE);
+                    write(ASEmitterTokens.PAREN_OPEN);
+                    write(ASEmitterTokens.SINGLE_QUOTE);
+                    write(imp);
+                    write(ASEmitterTokens.SINGLE_QUOTE);
+                    write(ASEmitterTokens.PAREN_CLOSE);
+                    writeNewline(ASEmitterTokens.SEMICOLON);
+                    writtenInstances.add(imp);
+                }
+            }
+
+            // (erikdebruin) only write 'closing' line break when there are 
+            //               actually imports...
+            if (list.size() > 1
+                    || (list.size() == 1 && list.get(0).indexOf(
+                            JSGoogEmitterTokens.AS3.getToken()) == -1))
+            {
+                writeNewline();
+            }
         }
     }
 
     private int foreachLoopCounter = 0;
-    
+
     @Override
     public void emitForEachLoop(IForLoopNode node)
     {
@@ -788,8 +791,9 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         IBinaryOperatorNode bnode = (IBinaryOperatorNode) node
                 .getConditionalsContainerNode().getChild(0);
         IASNode childNode = bnode.getChild(0);
-        
-        String iterName = "foreachiter" + new Integer(foreachLoopCounter).toString();
+
+        String iterName = "foreachiter"
+                + new Integer(foreachLoopCounter).toString();
         foreachLoopCounter++;
 
         write(ASEmitterTokens.FOR);
@@ -808,12 +812,12 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         writeNewline();
         if (childNode instanceof IVariableExpressionNode)
         {
-        	write(ASEmitterTokens.VAR);
+            write(ASEmitterTokens.VAR);
             write(ASEmitterTokens.SPACE);
-        	write(((IVariableNode) childNode.getChild(0)).getName());
+            write(((IVariableNode) childNode.getChild(0)).getName());
         }
         else
-        	write(((IIdentifierNode) childNode).getName());
+            write(((IIdentifierNode) childNode).getName());
         write(ASEmitterTokens.SPACE);
         write(ASEmitterTokens.EQUAL);
         write(ASEmitterTokens.SPACE);
@@ -826,7 +830,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         getWalker().walk(node.getStatementContentsNode());
         write(ASEmitterTokens.BLOCK_CLOSE);
         writeNewline();
-        
+
     }
 
     /*
@@ -914,12 +918,11 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         }
     }
     */
-    
+
     @Override
     public void emitTypedExpression(ITypedExpressionNode node)
     {
         write(JSGoogEmitterTokens.ARRAY);
     }
 
-
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7a2ebde9/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSGoogDocEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSGoogDocEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSGoogDocEmitter.java
index 7a86fd2..249086a 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSGoogDocEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSGoogDocEmitter.java
@@ -1,3 +1,21 @@
+/*
+ *
+ *  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.codegen.js.flexjs;
 
 import org.apache.flex.compiler.codegen.js.IJSEmitter;
@@ -5,16 +23,18 @@ import org.apache.flex.compiler.constants.IASKeywordConstants;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogDocEmitter;
 import org.apache.flex.compiler.tree.as.IFunctionNode;
 
-public class JSFlexJSGoogDocEmitter extends JSGoogDocEmitter {
+public class JSFlexJSGoogDocEmitter extends JSGoogDocEmitter
+{
 
-	public JSFlexJSGoogDocEmitter(IJSEmitter emitter) {
-		super(emitter);
-		// TODO Auto-generated constructor stub
-	}
+    public JSFlexJSGoogDocEmitter(IJSEmitter emitter)
+    {
+        super(emitter);
+        // TODO Auto-generated constructor stub
+    }
 
-	@Override
-	public void emitMethodAccess(IFunctionNode node)
-	{
+    @Override
+    public void emitMethodAccess(IFunctionNode node)
+    {
         String ns = node.getNamespace();
         if (ns == IASKeywordConstants.PRIVATE)
         {
@@ -26,7 +46,7 @@ public class JSFlexJSGoogDocEmitter extends JSGoogDocEmitter {
         }
         else if (ns == IASKeywordConstants.PUBLIC)
         {
-        	emitPublic(node);
+            emitPublic(node);
         }
-	}
+    }
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7a2ebde9/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 6a13004..fb68431 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -95,8 +95,8 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         IMXMLPropertySpecifierNode[] propertySpecifierNodes = node
                 .getPropertySpecifierNodes();
         if (propertySpecifierNodes != null && propertySpecifierNodes.length >
0)
-        	isMainFile = !isMXMLContentNode((IMXMLPropertySpecifierNode) node
-                .getPropertySpecifierNodes()[0]);
+            isMainFile = !isMXMLContentNode((IMXMLPropertySpecifierNode) node
+                    .getPropertySpecifierNodes()[0]);
 
         eventCounter = 0;
         idCounter = 0;
@@ -113,8 +113,8 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         // visit MXML
         IClassDefinition cdef = node.getClassDefinition();
         IASEmitter asEmitter = ((IMXMLBlockWalker) getMXMLWalker())
-        .getASEmitter();
-        ((JSFlexJSEmitter)asEmitter).thisClass = cdef;
+                .getASEmitter();
+        ((JSFlexJSEmitter) asEmitter).thisClass = cdef;
 
         // visit tags
         final int len = node.getChildCount();
@@ -304,8 +304,8 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
     {
         // top level is 'mxmlContent', skip it...
         if (descriptorTree.size() == 0)
-        	return;
-        
+            return;
+
         MXMLDescriptorSpecifier root = descriptorTree.get(0);
         root.isTopNodeInMainFile = isMainFile;
 
@@ -627,7 +627,7 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         writeNewline();
         emitHeaderLine(node.getBaseClassName());
         ArrayList<String> writtenInstances = new ArrayList<String>();
-        writtenInstances.add(cname);	// make sure we don't add ourselves
+        writtenInstances.add(cname); // make sure we don't add ourselves
         for (MXMLDescriptorSpecifier instance : instances)
         {
             String name = instance.name;
@@ -637,10 +637,11 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                 writtenInstances.add(name);
             }
         }
-        FlexJSProject project = (FlexJSProject)getMXMLWalker().getProject();
+        FlexJSProject project = (FlexJSProject) getMXMLWalker().getProject();
         ASProjectScope projectScope = (ASProjectScope) project.getScope();
         IDefinition cdef = node.getDefinition();
-        ICompilationUnit cu = projectScope.getCompilationUnitForDefinition(cdef);
+        ICompilationUnit cu = projectScope
+                .getCompilationUnitForDefinition(cdef);
         ArrayList<String> deps = project.getRequires(cu);
 
         for (String imp : deps)
@@ -652,40 +653,40 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                 continue;
 
             if (imp.equals("mx.events.PropertyChangeEvent"))
-            	continue;
+                continue;
             if (imp.equals("mx.events.PropertyChangeEventKind"))
-            	continue;
+                continue;
 
             if (imp.equals("Array"))
-            	continue;
+                continue;
             if (imp.equals("Boolean"))
-            	continue;
+                continue;
             if (imp.equals("decodeURI"))
-            	continue;
+                continue;
             if (imp.equals("decodeURIComponent"))
-            	continue;
+                continue;
             if (imp.equals("encodeURI"))
-            	continue;
+                continue;
             if (imp.equals("encodeURIComponent"))
-            	continue;
+                continue;
             if (imp.equals("Error"))
-            	continue;
+                continue;
             if (imp.equals("Function"))
-            	continue;
+                continue;
             if (imp.equals("JSON"))
-            	continue;
+                continue;
             if (imp.equals("Number"))
-            	continue;
+                continue;
             if (imp.equals("int"))
-            	continue;
+                continue;
             if (imp.equals("Object"))
-            	continue;
+                continue;
             if (imp.equals("RegExp"))
-            	continue;
+                continue;
             if (imp.equals("String"))
-            	continue;
+                continue;
             if (imp.equals("uint"))
-            	continue;
+                continue;
 
             if (writtenInstances.indexOf(imp) == -1)
             {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/7a2ebde9/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
index c4cf0cf..9b48846 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/projects/FlexJSProject.java
@@ -1,5 +1,20 @@
-/**
- * 
+/*
+ *
+ *  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.projects;
 


Mime
View raw message