You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/12/09 06:16:58 UTC

[01/10] git commit: [flex-falcon] [refs/heads/develop] - fix when we wrap bindables

Repository: flex-falcon
Updated Branches:
  refs/heads/develop fade31b4a -> bfb8e0bba


fix when we wrap bindables


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

Branch: refs/heads/develop
Commit: 2ee09584ef0a0798411cb9b7982abfd1318193ca
Parents: 18b12c2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 2 23:18:38 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:01 2014 -0800

----------------------------------------------------------------------
 .../flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2ee09584/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 f0145ab..1799d76 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
@@ -1272,7 +1272,7 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
 	        for (IMetaInfo metaInfo : metaInfos)
 	        {
 	            String name = metaInfo.getTagName();
-	            if (name.equals("Bindable"))
+	            if (name.equals("Bindable") && metaInfo.getAllAttributes().length == 0)
 	            {
 	                isBindableSetter = true;
 	                break;


[04/10] git commit: [flex-falcon] [refs/heads/develop] - handle new flex-tool-api dependency

Posted by ah...@apache.org.
handle new flex-tool-api dependency


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

Branch: refs/heads/develop
Commit: 03fb666f0e86dd3624a93d585e51c4a6e996b2e0
Parents: fade31b
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 1 12:44:51 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:01 2014 -0800

----------------------------------------------------------------------
 compiler.jx/.classpath | 1 +
 compiler/.classpath    | 1 +
 compiler/build.xml     | 1 +
 3 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/03fb666f/compiler.jx/.classpath
----------------------------------------------------------------------
diff --git a/compiler.jx/.classpath b/compiler.jx/.classpath
index 66b7875..98e0e71 100644
--- a/compiler.jx/.classpath
+++ b/compiler.jx/.classpath
@@ -8,5 +8,6 @@
 	<classpathentry kind="lib" path="lib/args4j.jar"/>
 	<classpathentry kind="lib" path="lib/org.json.jar"/>
 	<classpathentry kind="lib" path="lib/guava.jar"/>
+	<classpathentry kind="lib" path="lib/flex-tool-api.jar"/>
 	<classpathentry kind="output" path="classes"/>
 </classpath>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/03fb666f/compiler/.classpath
----------------------------------------------------------------------
diff --git a/compiler/.classpath b/compiler/.classpath
index 90d4a6b..91a6d2a 100644
--- a/compiler/.classpath
+++ b/compiler/.classpath
@@ -12,5 +12,6 @@
 	<classpathentry kind="lib" path="lib/lzma-sdk.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="var" path="ANT_JAR"/>
+	<classpathentry kind="lib" path="lib/flex-tool-api.jar"/>
 	<classpathentry kind="output" path="generated/eclipse/bin"/>
 </classpath>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/03fb666f/compiler/build.xml
----------------------------------------------------------------------
diff --git a/compiler/build.xml b/compiler/build.xml
index 30e0bbb..ad5c132 100644
--- a/compiler/build.xml
+++ b/compiler/build.xml
@@ -819,6 +819,7 @@
                 <include name="commons-*"/>
                 <include name="guava*"/>
                 <include name="lzma*"/>
+                <include name="flex-tool-api*"/>
             </fileset>
         </copy>
         <copy file="${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc" todir="${sdk}/frameworks/libs/player/${playerglobal.version}"/>


[08/10] git commit: [flex-falcon] [refs/heads/develop] - redo how we save CSS in FalconJX

Posted by ah...@apache.org.
redo how we save CSS in FalconJX


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

Branch: refs/heads/develop
Commit: db870b15cc4ab92e838054c9439404f296bd5715
Parents: 2ee0958
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 2 23:25:20 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:02 2014 -0800

----------------------------------------------------------------------
 .../internal/codegen/mxml/MXMLBlockWalker.java  | 10 +----
 .../mxml/flexjs/MXMLFlexJSBlockWalker.java      | 30 +------------
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  | 44 --------------------
 .../mxml/flexjs/MXMLFlexJSPublisher.java        |  7 +++-
 .../codegen/mxml/vf2js/MXMLVF2JSEmitter.java    | 44 --------------------
 .../codegen/mxml/vf2js/MXMLVF2JSPublisher.java  |  7 +++-
 .../js/flexjs/JSCSSCompilationSession.java      | 34 +++++++++++----
 .../internal/projects/FlexJSProject.java        | 21 ++++++++--
 .../compiler/internal/targets/FlexJSTarget.java | 12 +-----
 9 files changed, 57 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
index bed0187..bfc9ce5 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
@@ -270,15 +270,7 @@ public class MXMLBlockWalker implements IMXMLBlockVisitor, IMXMLBlockWalker
     @Override
     public void visitStyleBlock(IMXMLStyleNode node)
     {
-        ICSSDocument css = node.getCSSDocument(errors);
-        StringBuilder sb = new StringBuilder();
-        ImmutableList<ICSSRule> rules = css.getRules();
-        for (ICSSRule rule : rules)
-        {
-            sb.append(rule.toString());
-            sb.append("\n\n");
-        }
-        ((FlexJSProject)project).cssDocument += sb.toString();
+    	// don't do anything.  subclasses should.
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
index d4a613e..8007166 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
@@ -19,30 +19,21 @@
 
 package org.apache.flex.compiler.internal.codegen.mxml.flexjs;
 
-import java.util.Collection;
-import java.util.HashSet;
 import java.util.List;
 
 import org.apache.flex.compiler.codegen.as.IASEmitter;
 import org.apache.flex.compiler.codegen.mxml.IMXMLEmitter;
 import org.apache.flex.compiler.codegen.mxml.flexjs.IMXMLFlexJSEmitter;
 import org.apache.flex.compiler.css.ICSSDocument;
-import org.apache.flex.compiler.css.ICSSRule;
-import org.apache.flex.compiler.internal.caches.CSSDocumentCache;
 import org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker;
 import org.apache.flex.compiler.internal.css.codegen.CSSCompilationSession;
-import org.apache.flex.compiler.internal.driver.js.flexjs.JSCSSCompilationSession;
-import org.apache.flex.compiler.internal.projects.FlexJSProject;
 import org.apache.flex.compiler.problems.ICompilerProblem;
 import org.apache.flex.compiler.projects.IASProject;
-import org.apache.flex.compiler.projects.IFlexProject;
 import org.apache.flex.compiler.tree.mxml.IMXMLDocumentNode;
 import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
 import org.apache.flex.compiler.tree.mxml.IMXMLStyleNode;
 import org.apache.flex.compiler.visitor.IBlockWalker;
 
-import com.google.common.collect.ImmutableList;
-
 /**
  * @author Michael Schmalle
  * @author Erik de Bruin
@@ -61,8 +52,6 @@ public class MXMLFlexJSBlockWalker extends MXMLBlockWalker
         this.mxmlEmitter = mxmlEmitter;
     }
 
-    public String encodedCSS = "";
-    
     //--------------------------------------------------------------------------
 
     @Override
@@ -85,28 +74,11 @@ public class MXMLFlexJSBlockWalker extends MXMLBlockWalker
     public void visitStyleBlock(IMXMLStyleNode node)
     {
         ICSSDocument css = node.getCSSDocument(errors);
-        StringBuilder sb = new StringBuilder();
-        ImmutableList<ICSSRule> rules = css.getRules();
-        for (ICSSRule rule : rules)
-        {
-            sb.append(rule.toString());
-            sb.append("\n\n");
-        }
-        ((FlexJSProject)project).cssDocument += sb.toString();
-        
-        // Ignore semanticProblems. They should have been collected during the semantic analysis phase already.
-        final Collection<ICompilerProblem> problems = new HashSet<ICompilerProblem>();
-        if (css == CSSDocumentCache.EMPTY_CSS_DOCUMENT)
-            return;
-        
-        final IFlexProject flexProject = (IFlexProject)getProject();
-
+                
         final CSSCompilationSession session = node.getFileNode().getCSSCompilationSession();
         if (session == null)
             return;
         
-        session.setKeepAllTypeSelectors(true);
-        encodedCSS = ((JSCSSCompilationSession)session).getEncodedCSS(flexProject, problems);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/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 40f145f..218621f 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
@@ -212,8 +212,6 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
 
         emitBindingData(cname, cdef);
 
-        emitEncodedCSS(cname);
-        
     }
 
     public void emitSubDocument(IMXMLComponentNode node)
@@ -289,8 +287,6 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
 
         emitBindingData(cname, cdef);
 
-        emitEncodedCSS(cname);
-
         descriptorTree = oldDescriptorTree;
         propertiesTree = oldPropertiesTree;
         events = oldEvents;
@@ -1665,35 +1661,6 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
     //--------------------------------------------------------------------------
     //    JS output
     //--------------------------------------------------------------------------
-
-    private void emitEncodedCSS(String cname)
-    {
-        String s = ((MXMLFlexJSBlockWalker)getMXMLWalker()).encodedCSS;
-        if (!s.isEmpty())
-        {
-            int reqidx = s.indexOf(JSGoogEmitterTokens.GOOG_REQUIRE.getToken());
-            if (reqidx != -1)
-                s = s.substring(0, reqidx - 1);
-
-            writeNewline();
-            writeNewline("/**");
-            writeNewline(" * @expose");
-            writeNewline(" */");
-            StringBuilder sb = new StringBuilder();
-            sb.append(cname);
-            sb.append(ASEmitterTokens.MEMBER_ACCESS.getToken());
-            sb.append(JSEmitterTokens.PROTOTYPE.getToken());
-            sb.append(ASEmitterTokens.MEMBER_ACCESS.getToken());
-            sb.append("cssData");
-            sb.append(ASEmitterTokens.SPACE.getToken() +
-                        ASEmitterTokens.EQUAL.getToken() +
-                        ASEmitterTokens.SPACE.getToken() +
-                        ASEmitterTokens.SQUARE_OPEN.getToken());
-            sb.append(s);
-            write(sb.toString());
-            writeNewline();
-        }
-    }
     
     private void emitHeader(IMXMLDocumentNode node)
     {
@@ -1773,17 +1740,6 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
             }
         }
 
-        String s = ((MXMLFlexJSBlockWalker)getMXMLWalker()).encodedCSS;
-        if (!s.isEmpty())
-        {
-            int reqidx = s.indexOf(JSGoogEmitterTokens.GOOG_REQUIRE.getToken());
-            if (reqidx != -1)
-            {
-                String reqs = s.substring(reqidx);
-                writeNewline(reqs);
-            }
-        }
-
         // erikdebruin: Add missing language feature support, like the 'is' and 
         //              'as' operators. We don't need to worry about requiring
         //              this in every project: ADVANCED_OPTIMISATIONS will NOT

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index 4c426bd..573fcbc 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -45,6 +45,7 @@ import org.apache.flex.compiler.config.Configuration;
 import org.apache.flex.compiler.internal.codegen.js.JSSharedData;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogPublisher;
+import org.apache.flex.compiler.internal.driver.js.flexjs.JSCSSCompilationSession;
 import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
 import org.apache.flex.compiler.internal.graph.GoogDepsWriter;
 import org.apache.flex.compiler.internal.projects.FlexJSProject;
@@ -476,7 +477,8 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
         appendString.append("\n\n");
         appendString.append(projectName);
         appendString.append(".prototype.cssData = [");
-        String s = project.cssEncoding;
+        JSCSSCompilationSession cssSession = (JSCSSCompilationSession) project.getCSSCompilationSession();
+        String s = cssSession.getEncodedCSS();
         int reqidx = s.indexOf(JSGoogEmitterTokens.GOOG_REQUIRE.getToken());
         if (reqidx != -1)
         {
@@ -571,7 +573,8 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
     private void writeCSS(String projectName, String dirPath)
             throws IOException
     {
+        JSCSSCompilationSession cssSession = (JSCSSCompilationSession) project.getCSSCompilationSession();
         writeFile(dirPath + File.separator + projectName + ".css",
-                project.cssDocument, false);
+                cssSession.emitCSS(), false);
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
index 04fb87d..b893f12 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
@@ -180,8 +180,6 @@ public class MXMLVF2JSEmitter extends MXMLEmitter implements
 
         emitBindingData(cname, cdef);
 
-        emitEncodedCSS(cname);
-        
     }
 
     public void emitSubDocument(IMXMLComponentNode node)
@@ -254,8 +252,6 @@ public class MXMLVF2JSEmitter extends MXMLEmitter implements
 
         emitBindingData(cname, cdef);
 
-        emitEncodedCSS(cname);
-
         descriptorTree = oldDescriptorTree;
         propertiesTree = oldPropertiesTree;
         events = oldEvents;
@@ -1412,35 +1408,6 @@ public class MXMLVF2JSEmitter extends MXMLEmitter implements
     //--------------------------------------------------------------------------
     //    JS output
     //--------------------------------------------------------------------------
-
-    private void emitEncodedCSS(String cname)
-    {
-        String s = ((MXMLFlexJSBlockWalker)getMXMLWalker()).encodedCSS;
-        if (!s.isEmpty())
-        {
-            int reqidx = s.indexOf("goog.require");
-            if (reqidx != -1)
-                s = s.substring(0, reqidx - 1);
-
-            writeNewline();
-            writeNewline("/**");
-            writeNewline(" * @expose");
-            writeNewline(" */");
-            StringBuilder sb = new StringBuilder();
-            sb.append(cname);
-            sb.append(ASEmitterTokens.MEMBER_ACCESS.getToken());
-            sb.append(JSEmitterTokens.PROTOTYPE.getToken());
-            sb.append(ASEmitterTokens.MEMBER_ACCESS.getToken());
-            sb.append("cssData");
-            sb.append(ASEmitterTokens.SPACE.getToken() +
-                        ASEmitterTokens.EQUAL.getToken() +
-                        ASEmitterTokens.SPACE.getToken() +
-                        ASEmitterTokens.SQUARE_OPEN.getToken());
-            sb.append(s);
-            write(sb.toString());
-            writeNewline();
-        }
-    }
     
     private void emitHeader(IMXMLDocumentNode node)
     {
@@ -1520,17 +1487,6 @@ public class MXMLVF2JSEmitter extends MXMLEmitter implements
             }
         }
 
-        String s = ((MXMLFlexJSBlockWalker)getMXMLWalker()).encodedCSS;
-        if (!s.isEmpty())
-        {
-            int reqidx = s.indexOf("goog.require");
-            if (reqidx != -1)
-            {
-                String reqs = s.substring(reqidx);
-                writeNewline(reqs);
-            }
-        }
-
         // erikdebruin: Add missing language feature support, like the 'is' and 
         //              'as' operators. We don't need to worry about requiring
         //              this in every project: ADVANCED_OPTIMISATIONS will NOT

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSPublisher.java
index d927e84..164806c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSPublisher.java
@@ -34,6 +34,7 @@ import org.apache.flex.compiler.codegen.js.IJSPublisher;
 import org.apache.flex.compiler.config.Configuration;
 import org.apache.flex.compiler.internal.codegen.js.JSSharedData;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogPublisher;
+import org.apache.flex.compiler.internal.driver.js.flexjs.JSCSSCompilationSession;
 import org.apache.flex.compiler.internal.driver.js.goog.JSGoogConfiguration;
 import org.apache.flex.compiler.internal.graph.VF2JSDepsWriter;
 import org.apache.flex.compiler.internal.projects.FlexJSProject;
@@ -437,7 +438,8 @@ public class MXMLVF2JSPublisher extends JSGoogPublisher implements
         appendString.append("\n\n");
         appendString.append(projectName);
         appendString.append(".prototype.cssData = [");
-        String s = project.cssEncoding;
+        JSCSSCompilationSession cssSession = (JSCSSCompilationSession) project.getCSSCompilationSession();
+        String s = cssSession.getEncodedCSS();
         int reqidx = s.indexOf("goog.require");
         if (reqidx != -1)
         {
@@ -589,7 +591,8 @@ public class MXMLVF2JSPublisher extends JSGoogPublisher implements
             throws IOException
     {
         StringBuilder cssFile = new StringBuilder();
-        cssFile.append(project.cssDocument);
+        JSCSSCompilationSession cssSession = (JSCSSCompilationSession) project.getCSSCompilationSession();
+        cssFile.append(cssSession.emitCSS());
 
         writeFile(dirPath + File.separator + projectName + ".css",
                 cssFile.toString(), false);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
index 7a518d2..35525c6 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
@@ -48,12 +48,12 @@ public class JSCSSCompilationSession extends CSSCompilationSession
 
     private ArrayList<String> requires;
     
-    public String getEncodedCSS(ICompilerProject project, final Collection<ICompilerProblem> problems)
+    public String getEncodedCSS()
     {
         final ICSSDocument css = synthesisNormalizedCSS();
         StringBuilder sb = new StringBuilder();
         requires = new ArrayList<String>();
-        encodeCSS(css, sb, project, problems);
+        encodeCSS(css, sb);
         sb.append("];\n");
         for (String r : requires)
         {
@@ -76,19 +76,21 @@ public class JSCSSCompilationSession extends CSSCompilationSession
         ImmutableList<ICSSRule> rules = css.getRules();
         for (ICSSRule rule : rules)
         {
-            sb.append(rule.toString());
+        	String s = rule.toString();
+        	if (s.startsWith("global {"))
+        		s = s.replace("global {", "* {");
+            sb.append(s);
             sb.append("\n\n");
         }
     }
     
-    private void encodeCSS(ICSSDocument css, StringBuilder sb,
-            ICompilerProject project, final Collection<ICompilerProblem> problems)
+    private void encodeCSS(ICSSDocument css, StringBuilder sb)
     {
         ImmutableList<ICSSRule> rules = css.getRules();
         boolean skipcomma = true;
         for (ICSSRule rule : rules)
         {
-            String s = encodeRule(rule, project, problems);
+            String s = encodeRule(rule);
             if (s != null)
             {
                 if (skipcomma)
@@ -100,8 +102,7 @@ public class JSCSSCompilationSession extends CSSCompilationSession
         }
     }
     
-    private String encodeRule(ICSSRule rule,
-            ICompilerProject project, final Collection<ICompilerProblem> problems)
+    private String encodeRule(ICSSRule rule)
     {
         final StringBuilder result = new StringBuilder();
 
@@ -271,4 +272,21 @@ public class JSCSSCompilationSession extends CSSCompilationSession
         return result.toString();
 
     }
+    
+    @Override
+    protected boolean keepRule(ICSSRule newRule)
+    {
+    	if (super.keepRule(newRule))
+    		return true;
+    	
+    	// include all rules not found in defaults.css
+    	// theoretically, defaults.css rules were
+    	// properly added in the super call.
+    	String sp = newRule.getSourcePath();
+    	if (!sp.contains("defaults.css"))
+    		return true;
+    	
+        return false;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/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 ceacef0..9451dda 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
@@ -57,8 +57,6 @@ public class FlexJSProject extends FlexProject
     private HashMap<ICompilationUnit, HashMap<String, DependencyType>> requires = new HashMap<ICompilationUnit, HashMap<String, DependencyType>>();
 
     public ICompilationUnit mainCU;
-    public String cssDocument;
-    public String cssEncoding;
 
     @Override
     public void addDependency(ICompilationUnit from, ICompilationUnit to,
@@ -152,10 +150,27 @@ public class FlexJSProject extends FlexProject
         return null;
     }
 
+    JSCSSCompilationSession cssSession = new JSCSSCompilationSession();
+    
     @Override
     public CSSCompilationSession getCSSCompilationSession()
     {
-        return new JSCSSCompilationSession();
+    	// When building SWFs, each MXML document may have its own styles
+    	// specified by fx:Style blocks.  The CSS is separately compiled and
+    	// stored in the class definition for the MXML document.  That helps
+    	// with deferred loading of classes.  The styles and thus the
+    	// classes for an MXML document are not initialized until the MXML
+    	// class is initialized.
+    	// For JS compilation, the CSS for non-standard CSS could be done the
+    	// same way, but AFAICT, standard CSS properties are best loaded by
+    	// specifying a .CSS file in the HTML.  The CSS is probably less text
+    	// than its codegen'd representation, and the browser can probably
+    	// load a .CSS file faster than us trying to run code to update the
+    	// styles.
+    	// So, for FlexJS, all style blocks from all MXML files are gathered into
+    	// one .css file and a corresponding codegen block that is output as
+    	// part of the main .JS file.
+    	return cssSession;
     }
 
     private HashMap<IASNode, String> astCache = new HashMap<IASNode, String>();

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/db870b15/compiler.jx/src/org/apache/flex/compiler/internal/targets/FlexJSTarget.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/targets/FlexJSTarget.java b/compiler.jx/src/org/apache/flex/compiler/internal/targets/FlexJSTarget.java
index ca8a5ff..83c118b 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/targets/FlexJSTarget.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/targets/FlexJSTarget.java
@@ -144,7 +144,7 @@ public class FlexJSTarget extends JSTarget implements IJSTarget
             final Collection<ICompilerProblem> problems)
             throws InterruptedException
     {
-        JSCSSCompilationSession cssCompilationSession = new JSCSSCompilationSession();
+        JSCSSCompilationSession cssCompilationSession = (JSCSSCompilationSession) flexProject.getCSSCompilationSession();
         cssCompilationSession.setKeepAllTypeSelectors(targetSettings.keepAllTypeSelectors());
         
         // Performance heuristic: let's start compilation on all of the compilation
@@ -222,16 +222,6 @@ public class FlexJSTarget extends JSTarget implements IJSTarget
 
         cssCompilationSession.cssDocuments.addAll(activatedStyleSheets.sort());
         
-        try
-        {
-            flexProject.cssDocument = cssCompilationSession.emitCSS();
-            flexProject.cssEncoding = cssCompilationSession.getEncodedCSS(flexProject, problems);
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-        }
-
         return super.findAllCompilationUnitsToLink(compilationUnits, problems);
     }
 


[07/10] git commit: [flex-falcon] [refs/heads/develop] - instance properties need to dispatch change events

Posted by ah...@apache.org.
instance properties need to dispatch change events


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

Branch: refs/heads/develop
Commit: b99cd49e547516da470f98d392a9ebe76b18ef09
Parents: 70740be
Author: Alex Harui <ah...@apache.org>
Authored: Sun Dec 7 23:00:30 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:02 2014 -0800

----------------------------------------------------------------------
 .../internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java         | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b99cd49e/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 218621f..8ae9eaa 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
@@ -847,10 +847,13 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                 indentPush();
                 writeNewline("{");
                 indentPush();
-                writeNewline("if (value != this." + instance.id + ")");
+                writeNewline("if (value != this." + instance.id + ") {");
                 indentPop();
                 indentPop();
                 writeNewline("this." + instance.id + " = value;");
+                write("this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, '");
+                write(instance.id + "', null, value));");
+                writeNewline("}");
                 writeNewline("};");
                 writeNewline();
                 writeNewline();


[05/10] git commit: [flex-falcon] [refs/heads/develop] - AST's were getting GC'd and causing crashes. Cache them instead

Posted by ah...@apache.org.
AST's were getting GC'd and causing crashes.  Cache them instead


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

Branch: refs/heads/develop
Commit: b9619779e6b382568daad2e4102c496c59d955f1
Parents: 03fb666
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 1 12:51:11 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:01 2014 -0800

----------------------------------------------------------------------
 .../flex/compiler/internal/projects/FlexJSProject.java   |  8 ++++++++
 .../flex/compiler/internal/projects/CompilerProject.java | 11 +++++++++++
 .../internal/projects/FlexProjectConfigurator.java       |  1 +
 .../flex/compiler/internal/units/ASCompilationUnit.java  |  1 +
 .../compiler/internal/units/MXMLCompilationUnit.java     |  1 +
 5 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b9619779/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 2be9d0f..ceacef0 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
@@ -32,6 +32,7 @@ import org.apache.flex.compiler.internal.driver.js.flexjs.JSCSSCompilationSessio
 import org.apache.flex.compiler.internal.scopes.ASProjectScope.DefinitionPromise;
 import org.apache.flex.compiler.internal.tree.mxml.MXMLClassDefinitionNode;
 import org.apache.flex.compiler.internal.workspaces.Workspace;
+import org.apache.flex.compiler.tree.as.IASNode;
 import org.apache.flex.compiler.units.ICompilationUnit;
 
 /**
@@ -157,4 +158,11 @@ public class FlexJSProject extends FlexProject
         return new JSCSSCompilationSession();
     }
 
+    private HashMap<IASNode, String> astCache = new HashMap<IASNode, String>();
+    
+    @Override
+    public void addToASTCache(IASNode ast)
+    {
+        astCache.put(ast, "");
+    }
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b9619779/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java b/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
index ae2cbd5..c378d8e 100644
--- a/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
+++ b/compiler/src/org/apache/flex/compiler/internal/projects/CompilerProject.java
@@ -59,6 +59,7 @@ import org.apache.flex.compiler.scopes.IASScope;
 import org.apache.flex.compiler.targets.ISWFTarget;
 import org.apache.flex.compiler.targets.ITargetProgressMonitor;
 import org.apache.flex.compiler.targets.ITargetSettings;
+import org.apache.flex.compiler.tree.as.IASNode;
 import org.apache.flex.compiler.units.ICompilationUnit;
 import org.apache.flex.compiler.units.requests.IFileScopeRequestResult;
 import org.apache.flex.compiler.units.requests.IRequest;
@@ -945,4 +946,14 @@ public abstract class CompilerProject implements ICompilerProject
         this.enableInlining = enableInlining;
         clean();
     }
+    
+    /**
+     * Add AST to cache.  By default, not added to any cache.
+     * 
+     * @param ast The AST.
+     */
+    public void addToASTCache(IASNode ast)
+    {
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b9619779/compiler/src/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java b/compiler/src/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
index 64e5ba5..3a19838 100644
--- a/compiler/src/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
+++ b/compiler/src/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
@@ -208,6 +208,7 @@ public class FlexProjectConfigurator
             className = configValue.substring(dotIndex + 1);
             BindableHelper.NAME_PROPERTY_CHANGE_EVENT = new Name(CONSTANT_Qname, new Nsset(new Namespace(CONSTANT_PackageNs, packageName)), className);
             BindableHelper.NAMESPACE_MX_EVENTS = new Namespace(CONSTANT_PackageNs, packageName);
+            BindableHelper.PROPERTY_CHANGE_EVENT = configValue;
             
             configValue = configuration.getBindingValueChangeEventKind();
             dotIndex = configValue.lastIndexOf(".");

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b9619779/compiler/src/org/apache/flex/compiler/internal/units/ASCompilationUnit.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/units/ASCompilationUnit.java b/compiler/src/org/apache/flex/compiler/internal/units/ASCompilationUnit.java
index c4141fe..90d1958 100644
--- a/compiler/src/org/apache/flex/compiler/internal/units/ASCompilationUnit.java
+++ b/compiler/src/org/apache/flex/compiler/internal/units/ASCompilationUnit.java
@@ -437,6 +437,7 @@ public class ASCompilationUnit extends CompilationUnitBase
             final Collection<ICompilerProblem> problemCollection = ast.getProblems();
             ASSyntaxTreeRequestResult result = new ASSyntaxTreeRequestResult(this, syntaxTreeRequest, ast, includedFiles, ast.getIncludeTreeLastModified(), problemCollection);
             getProject().getWorkspace().addIncludedFilesToCompilationUnit(this, result.getIncludedFiles());
+            getProject().addToASTCache(ast);
             return result;
         }
         finally

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b9619779/compiler/src/org/apache/flex/compiler/internal/units/MXMLCompilationUnit.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/units/MXMLCompilationUnit.java b/compiler/src/org/apache/flex/compiler/internal/units/MXMLCompilationUnit.java
index f794ce7..32965c9 100644
--- a/compiler/src/org/apache/flex/compiler/internal/units/MXMLCompilationUnit.java
+++ b/compiler/src/org/apache/flex/compiler/internal/units/MXMLCompilationUnit.java
@@ -155,6 +155,7 @@ public class MXMLCompilationUnit extends CompilationUnitBase
             stopProfile(Operation.GET_SYNTAX_TREE);
         }
 
+        getProject().addToASTCache(fileNode);
         return new SyntaxTreeRequestResult(fileNode, ImmutableSet.<String>copyOf(fileScope.getSourceDependencies()), fileNode.getIncludeTreeLastModified(), problems);
     }
 


[10/10] git commit: [flex-falcon] [refs/heads/develop] - improve CSS handling in FalconJX

Posted by ah...@apache.org.
improve CSS handling in FalconJX


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

Branch: refs/heads/develop
Commit: 70740bed84c6684897bc7c17500dfc4385e50b9a
Parents: db870b1
Author: Alex Harui <ah...@apache.org>
Authored: Sun Dec 7 22:59:43 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:02 2014 -0800

----------------------------------------------------------------------
 .../internal/css/codegen/CSSCompilationSession.java     | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/70740bed/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSCompilationSession.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSCompilationSession.java b/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSCompilationSession.java
index 08626b0..7c02c6b 100644
--- a/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSCompilationSession.java
+++ b/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSCompilationSession.java
@@ -159,6 +159,16 @@ public class CSSCompilationSession
     private boolean keepAllTypeSelectors;
 
     /**
+     * Determine if a rule should be in the output
+     * 
+     * @return true if rule should be in the output
+     */
+    protected boolean keepRule(ICSSRule newRule)
+    {
+        return (keepAllTypeSelectors || activatedRules.contains(newRule));
+    }
+
+    /**
      * Synthesize a normalized CSS model from the {@link ICSSRule}'s activated
      * from {@link #singleSelectorRules}. The normalized CSS
      * does not have "@namespace" rules; Its rules come from different CSS
@@ -172,7 +182,7 @@ public class CSSCompilationSession
         {
             for (final ICSSRule newRule : cssDocument.getRules())
             {
-                if (keepAllTypeSelectors || activatedRules.contains(newRule))
+                if (keepRule(newRule))
                 {
                     addRuleToCodeGeneration(newRule);
                 }


[06/10] git commit: [flex-falcon] [refs/heads/develop] - update test

Posted by ah...@apache.org.
update test


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

Branch: refs/heads/develop
Commit: bfb8e0bbace3d5032165b96f2b3db1c478cf9a34
Parents: 15f6607
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:24:16 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:02 2014 -0800

----------------------------------------------------------------------
 .../flexjs/files/FlexJSTest_again_result.js     |  8 ++++--
 .../flexjs/files/MyInitialView_result.js        | 28 +++++++++++++++-----
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  |  7 +++--
 3 files changed, 30 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bfb8e0bb/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
index 75fffd5..7355661 100644
--- a/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/FlexJSTest_again_result.js
@@ -162,8 +162,10 @@ FlexJSTest_again.prototype.get_service = function()
  */
 FlexJSTest_again.prototype.set_service = function(value)
 {
-  if (value != this.service)
+  if (value != this.service) {
     this.service = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'service', null, value));
+  }
 };
 
 
@@ -183,8 +185,10 @@ FlexJSTest_again.prototype.get_collection = function()
  */
 FlexJSTest_again.prototype.set_collection = function(value)
 {
-  if (value != this.collection)
+  if (value != this.collection) {
     this.collection = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'collection', null, value));
+  }
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bfb8e0bb/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
index 5ce13fb..f609b5d 100644
--- a/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
+++ b/compiler.jx.tests/test-files/flexjs/files/MyInitialView_result.js
@@ -358,8 +358,10 @@ MyInitialView.prototype.get_lbl = function()
  */
 MyInitialView.prototype.set_lbl = function(value)
 {
-  if (value != this.lbl)
+  if (value != this.lbl) {
     this.lbl = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'lbl', null, value));
+  }
 };
 
 
@@ -379,8 +381,10 @@ MyInitialView.prototype.get_timerLabel = function()
  */
 MyInitialView.prototype.set_timerLabel = function(value)
 {
-  if (value != this.timerLabel)
+  if (value != this.timerLabel) {
     this.timerLabel = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'timerLabel', null, value));
+  }
 };
 
 
@@ -400,8 +404,10 @@ MyInitialView.prototype.get_cityList = function()
  */
 MyInitialView.prototype.set_cityList = function(value)
 {
-  if (value != this.cityList)
+  if (value != this.cityList) {
     this.cityList = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'cityList', null, value));
+  }
 };
 
 
@@ -421,8 +427,10 @@ MyInitialView.prototype.get_input = function()
  */
 MyInitialView.prototype.set_input = function(value)
 {
-  if (value != this.input)
+  if (value != this.input) {
     this.input = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'input', null, value));
+  }
 };
 
 
@@ -442,8 +450,10 @@ MyInitialView.prototype.get_checkbox = function()
  */
 MyInitialView.prototype.set_checkbox = function(value)
 {
-  if (value != this.checkbox)
+  if (value != this.checkbox) {
     this.checkbox = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'checkbox', null, value));
+  }
 };
 
 
@@ -463,8 +473,10 @@ MyInitialView.prototype.get_list = function()
  */
 MyInitialView.prototype.set_list = function(value)
 {
-  if (value != this.list)
+  if (value != this.list) {
     this.list = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'list', null, value));
+  }
 };
 
 
@@ -484,8 +496,10 @@ MyInitialView.prototype.get_comboBox = function()
  */
 MyInitialView.prototype.set_comboBox = function(value)
 {
-  if (value != this.comboBox)
+  if (value != this.comboBox) {
     this.comboBox = value;
+    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, 'comboBox', null, value));
+  }
 };
 
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/bfb8e0bb/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 8ae9eaa..5cf3a17 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
@@ -44,7 +44,6 @@ import org.apache.flex.compiler.internal.codegen.databinding.StaticPropertyWatch
 import org.apache.flex.compiler.internal.codegen.databinding.WatcherInfoBase;
 import org.apache.flex.compiler.internal.codegen.databinding.WatcherInfoBase.WatcherType;
 import org.apache.flex.compiler.internal.codegen.databinding.XMLWatcherInfo;
-import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
@@ -848,11 +847,11 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                 writeNewline("{");
                 indentPush();
                 writeNewline("if (value != this." + instance.id + ") {");
-                indentPop();
-                indentPop();
                 writeNewline("this." + instance.id + " = value;");
                 write("this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(this, '");
-                write(instance.id + "', null, value));");
+                indentPop();
+                writeNewline(instance.id + "', null, value));");
+                indentPop();
                 writeNewline("}");
                 writeNewline("};");
                 writeNewline();


[03/10] git commit: [flex-falcon] [refs/heads/develop] - more improvements to handling fx:Declarations and mxmlContent

Posted by ah...@apache.org.
more improvements to handling fx:Declarations and mxmlContent


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

Branch: refs/heads/develop
Commit: a9f15d79e4f0f91ef5d7c504cfe8fb0bd21a0584
Parents: b961977
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 1 12:52:15 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:01 2014 -0800

----------------------------------------------------------------------
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  | 26 ++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a9f15d79/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 5bfe515..40f145f 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
@@ -1429,13 +1429,35 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         currentPropertySpecifier.parent = currentInstance;
 
         boolean oldInMXMLContent = inMXMLContent;
+        boolean reusingDescriptor = false;
         if (currentPropertySpecifier.name.equals("mxmlContent"))
+        {
             inMXMLContent = true;
+            ArrayList<MXMLDescriptorSpecifier> specList = 
+            	(currentInstance == null) ? descriptorTree : currentInstance.propertySpecifiers;
+            for (MXMLDescriptorSpecifier ds : specList)
+            {
+            	if (ds.name.equals("mxmlContent"))
+            	{
+            		currentPropertySpecifier = ds;
+            		reusingDescriptor = true;
+            		break;
+            	}
+            }
+        }
         
         if (currentInstance != null)
-            currentInstance.propertySpecifiers.add(currentPropertySpecifier);
+        {
+        	// we end up here for children of tags
+        	if (!reusingDescriptor)
+        		currentInstance.propertySpecifiers.add(currentPropertySpecifier);
+        }
         else if (inMXMLContent)
-            descriptorTree.add(currentPropertySpecifier);
+        {
+        	// we end up here for top tags?
+        	if (!reusingDescriptor)
+        		descriptorTree.add(currentPropertySpecifier);
+        }
         else
         {
             currentPropertySpecifier.parent = propertiesTree;


[02/10] git commit: [flex-falcon] [refs/heads/develop] - more fixes to FalconJX binding codegen

Posted by ah...@apache.org.
more fixes to FalconJX binding codegen


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

Branch: refs/heads/develop
Commit: 18b12c2be6e669073b354e1ef69623d5464a7673
Parents: a9f15d7
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 1 12:53:15 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:01 2014 -0800

----------------------------------------------------------------------
 .../internal/codegen/as/ASEmitterTokens.java    |  2 +-
 .../codegen/js/flexjs/JSFlexJSEmitter.java      | 94 +++++++++++++++++++-
 .../internal/as/codegen/BindableHelper.java     |  1 +
 3 files changed, 95 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/18b12c2b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitterTokens.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitterTokens.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitterTokens.java
index d783109..9296a78 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitterTokens.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/as/ASEmitterTokens.java
@@ -127,7 +127,7 @@ public enum ASEmitterTokens implements IEmitterTokens
     //    int TOKEN_OPERATOR_BITWISE_AND = 92;
     EQUAL("="),
     //    int TOKEN_OPERATOR_NOT_EQUAL = 94;
-    //    int TOKEN_OPERATOR_STRICT_EQUAL = 95;
+    STRICT_EQUAL("==="),
     STRICT_NOT_EQUAL("!=="),
     //    int TOKEN_OPERATOR_GREATER_THAN_EQUALS = 97;
     LESS_THAN("<"),

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/18b12c2b/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 52f5303..f0145ab 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
@@ -34,6 +34,7 @@ import org.apache.flex.compiler.codegen.IASGlobalFunctionConstants;
 import org.apache.flex.compiler.codegen.IDocEmitter;
 import org.apache.flex.compiler.codegen.js.flexjs.IJSFlexJSEmitter;
 import org.apache.flex.compiler.common.ASModifier;
+import org.apache.flex.compiler.common.IMetaInfo;
 import org.apache.flex.compiler.common.ModifiersSet;
 import org.apache.flex.compiler.definitions.IClassDefinition;
 import org.apache.flex.compiler.definitions.IDefinition;
@@ -65,6 +66,7 @@ import org.apache.flex.compiler.internal.tree.as.FunctionNode;
 import org.apache.flex.compiler.internal.tree.as.MemberAccessExpressionNode;
 import org.apache.flex.compiler.internal.tree.as.ParameterNode;
 import org.apache.flex.compiler.internal.tree.as.RegExpLiteralNode;
+import org.apache.flex.compiler.internal.tree.as.SetterNode;
 import org.apache.flex.compiler.internal.tree.as.UnaryOperatorAtNode;
 import org.apache.flex.compiler.projects.ICompilerProject;
 import org.apache.flex.compiler.scopes.IASScope;
@@ -203,6 +205,14 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
                 emitAccessors((IAccessorNode) dnode);
                 write(ASEmitterTokens.SEMICOLON);
             }
+            else if (dnode.getNodeID() == ASTNodeID.BindableVariableID)
+            {
+                writeNewline();
+                writeNewline();
+                writeNewline();
+                emitField((IVariableNode) dnode);
+                write(ASEmitterTokens.SEMICOLON);
+            }
         }
     }
 
@@ -1254,6 +1264,85 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         if (type == null)
             return;
         
+        boolean isBindableSetter = false;
+        if (node instanceof SetterNode)
+        {
+	        IMetaInfo[] metaInfos = null;
+	        metaInfos = node.getMetaInfos();
+	        for (IMetaInfo metaInfo : metaInfos)
+	        {
+	            String name = metaInfo.getTagName();
+	            if (name.equals("Bindable"))
+	            {
+	                isBindableSetter = true;
+	                break;
+	            }
+	        }
+	        if (isBindableSetter)
+	        {
+	            getDoc().emitMethodDoc(fn, project);
+	            write(type.getQualifiedName());
+	            if (!node.hasModifier(ASModifier.STATIC))
+	            {
+	                write(ASEmitterTokens.MEMBER_ACCESS);
+	                write(JSEmitterTokens.PROTOTYPE);
+	            }
+
+	            write(ASEmitterTokens.MEMBER_ACCESS);
+	            writeGetSetPrefix(false);
+	            writeToken(node.getName());
+	            writeToken(ASEmitterTokens.EQUAL);
+	            write(ASEmitterTokens.FUNCTION);
+	            emitParameters(node.getParameterNodes());
+	            write(ASEmitterTokens.SPACE);
+	            writeNewline(ASEmitterTokens.BLOCK_OPEN);
+
+	            write(ASEmitterTokens.VAR);
+	            write(ASEmitterTokens.SPACE);
+	            write("oldValue");
+	            write(ASEmitterTokens.SPACE);
+	            write(ASEmitterTokens.EQUAL);
+	            write(ASEmitterTokens.SPACE);
+	            write(ASEmitterTokens.THIS);
+	            write(ASEmitterTokens.MEMBER_ACCESS);
+	            write("get_" + node.getName());
+	            write(ASEmitterTokens.PAREN_OPEN);
+	            write(ASEmitterTokens.PAREN_CLOSE);
+	            writeNewline(ASEmitterTokens.SEMICOLON);
+	            
+	            // add change check
+	            write(ASEmitterTokens.IF);
+	            write(ASEmitterTokens.SPACE);
+	            write(ASEmitterTokens.PAREN_OPEN);
+	            write("oldValue");
+	            write(ASEmitterTokens.SPACE);
+	            write(ASEmitterTokens.STRICT_EQUAL);
+	            write(ASEmitterTokens.SPACE);
+	            IParameterNode[] params = node.getParameterNodes();
+	            write(params[0].getName());
+	            write(ASEmitterTokens.PAREN_CLOSE);
+	            write(ASEmitterTokens.SPACE);
+	            write(ASEmitterTokens.RETURN);
+	            writeNewline(ASEmitterTokens.SEMICOLON);
+	
+	            write(ASEmitterTokens.THIS);
+	            write(ASEmitterTokens.MEMBER_ACCESS);
+	            write("__bindingWrappedSetter__" + node.getName());
+	            write(ASEmitterTokens.PAREN_OPEN);
+	            write(params[0].getName());
+	            write(ASEmitterTokens.PAREN_CLOSE);
+	            writeNewline(ASEmitterTokens.SEMICOLON);
+	            
+	        	// add dispatch of change event
+	            writeNewline("    this.dispatchEvent(org.apache.flex.events.ValueChangeEvent.createUpdateEvent(");
+	            writeNewline("         this, \"" + node.getName() + "\", oldValue, " + params[0].getName() + "));");
+	            write(ASEmitterTokens.BLOCK_CLOSE);
+	            writeNewline(ASEmitterTokens.SEMICOLON);
+	            writeNewline();
+	            writeNewline();
+	        }
+        }
+        
         if (project == null)
             project = getWalker().getProject();
 
@@ -1266,7 +1355,10 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
         }
 
         write(ASEmitterTokens.MEMBER_ACCESS);
-        writeGetSetPrefix(node instanceof IGetterNode);
+        if (isBindableSetter)
+        	write("__bindingWrappedSetter__");
+        else
+        	writeGetSetPrefix(node instanceof IGetterNode);
         writeToken(node.getName());
         writeToken(ASEmitterTokens.EQUAL);
         write(ASEmitterTokens.FUNCTION);

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/18b12c2b/compiler/src/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java b/compiler/src/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java
index d88a105..18e5851 100644
--- a/compiler/src/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java
+++ b/compiler/src/org/apache/flex/compiler/internal/as/codegen/BindableHelper.java
@@ -553,6 +553,7 @@ public class BindableHelper
     // Following Names are constants to use for various types & properties used in the code generated for Bindable
     //
     public static Name NAME_PROPERTY_CHANGE_EVENT = new Name(CONSTANT_Qname, new Nsset(NAMESPACE_MX_EVENTS), "PropertyChangeEvent");
+    public static String PROPERTY_CHANGE_EVENT = "mx.events.PropertyChangeEvent";
     public static Name NAME_PROPERTY_CHANGE_EVENT_KIND = new Name(CONSTANT_Qname, new Nsset(NAMESPACE_MX_EVENTS), "PropertyChangeEventKind");
     private static final Name NAME_CREATE_UPDATE_EVENT = new Name("createUpdateEvent");
 


[09/10] git commit: [flex-falcon] [refs/heads/develop] - clean up imports and other warnings

Posted by ah...@apache.org.
clean up imports and other warnings


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

Branch: refs/heads/develop
Commit: 15f6607c90629274689c207553a728a4c3689ffb
Parents: b99cd49
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 8 17:23:59 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 8 17:25:02 2014 -0800

----------------------------------------------------------------------
 .../flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java    | 5 -----
 .../internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java     | 3 +--
 .../compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java  | 2 --
 .../internal/driver/js/flexjs/JSCSSCompilationSession.java      | 3 ---
 4 files changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/15f6607c/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
index bfc9ce5..83ec265 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
@@ -23,9 +23,6 @@ import java.util.List;
 
 import org.apache.flex.compiler.codegen.as.IASEmitter;
 import org.apache.flex.compiler.codegen.mxml.IMXMLEmitter;
-import org.apache.flex.compiler.css.ICSSDocument;
-import org.apache.flex.compiler.css.ICSSRule;
-import org.apache.flex.compiler.internal.projects.FlexJSProject;
 import org.apache.flex.compiler.problems.ICompilerProblem;
 import org.apache.flex.compiler.projects.IASProject;
 import org.apache.flex.compiler.tree.as.IASNode;
@@ -64,8 +61,6 @@ import org.apache.flex.compiler.visitor.IBlockWalker;
 import org.apache.flex.compiler.visitor.mxml.IMXMLBlockVisitor;
 import org.apache.flex.compiler.visitor.mxml.IMXMLBlockWalker;
 
-import com.google.common.collect.ImmutableList;
-
 /**
  * @author Michael Schmalle
  * @author Erik de Bruin

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/15f6607c/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
index 8007166..6d374b4 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
@@ -24,7 +24,6 @@ import java.util.List;
 import org.apache.flex.compiler.codegen.as.IASEmitter;
 import org.apache.flex.compiler.codegen.mxml.IMXMLEmitter;
 import org.apache.flex.compiler.codegen.mxml.flexjs.IMXMLFlexJSEmitter;
-import org.apache.flex.compiler.css.ICSSDocument;
 import org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker;
 import org.apache.flex.compiler.internal.css.codegen.CSSCompilationSession;
 import org.apache.flex.compiler.problems.ICompilerProblem;
@@ -73,7 +72,7 @@ public class MXMLFlexJSBlockWalker extends MXMLBlockWalker
     @Override
     public void visitStyleBlock(IMXMLStyleNode node)
     {
-        ICSSDocument css = node.getCSSDocument(errors);
+        node.getCSSDocument(errors);
                 
         final CSSCompilationSession session = node.getFileNode().getCSSCompilationSession();
         if (session == null)

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/15f6607c/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
index b893f12..60702a8 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/vf2js/MXMLVF2JSEmitter.java
@@ -42,13 +42,11 @@ import org.apache.flex.compiler.internal.codegen.databinding.StaticPropertyWatch
 import org.apache.flex.compiler.internal.codegen.databinding.WatcherInfoBase;
 import org.apache.flex.compiler.internal.codegen.databinding.WatcherInfoBase.WatcherType;
 import org.apache.flex.compiler.internal.codegen.databinding.XMLWatcherInfo;
-import org.apache.flex.compiler.internal.codegen.js.JSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.vf2js.JSVF2JSEmitter;
 import org.apache.flex.compiler.internal.codegen.mxml.MXMLEmitter;
 import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLEventSpecifier;
-import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSBlockWalker;
 import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLScriptSpecifier;
 import org.apache.flex.compiler.internal.projects.FlexJSProject;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/15f6607c/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
index 35525c6..453d5d4 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java
@@ -19,7 +19,6 @@
 package org.apache.flex.compiler.internal.driver.js.flexjs;
 
 import java.util.ArrayList;
-import java.util.Collection;
 
 import org.apache.flex.compiler.constants.IASLanguageConstants;
 import org.apache.flex.compiler.css.ICSSDocument;
@@ -38,8 +37,6 @@ import org.apache.flex.compiler.internal.css.CSSNumberPropertyValue;
 import org.apache.flex.compiler.internal.css.CSSRgbColorPropertyValue;
 import org.apache.flex.compiler.internal.css.CSSStringPropertyValue;
 import org.apache.flex.compiler.internal.css.codegen.CSSCompilationSession;
-import org.apache.flex.compiler.problems.ICompilerProblem;
-import org.apache.flex.compiler.projects.ICompilerProject;
 
 import com.google.common.collect.ImmutableList;