flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject svn commit: r1454252 - /flex/falcon/trunk/compiler/src/org/apache/flex/compiler/internal/targets/FlexAppSWFTarget.java
Date Fri, 08 Mar 2013 05:11:09 GMT
Author: aharui
Date: Fri Mar  8 05:11:08 2013
New Revision: 1454252

URL: http://svn.apache.org/r1454252
Log:
Add CSS compilation to the FlexJS SWFs

Modified:
    flex/falcon/trunk/compiler/src/org/apache/flex/compiler/internal/targets/FlexAppSWFTarget.java

Modified: flex/falcon/trunk/compiler/src/org/apache/flex/compiler/internal/targets/FlexAppSWFTarget.java
URL: http://svn.apache.org/viewvc/flex/falcon/trunk/compiler/src/org/apache/flex/compiler/internal/targets/FlexAppSWFTarget.java?rev=1454252&r1=1454251&r2=1454252&view=diff
==============================================================================
--- flex/falcon/trunk/compiler/src/org/apache/flex/compiler/internal/targets/FlexAppSWFTarget.java
(original)
+++ flex/falcon/trunk/compiler/src/org/apache/flex/compiler/internal/targets/FlexAppSWFTarget.java
Fri Mar  8 05:11:08 2013
@@ -60,6 +60,7 @@ import org.apache.flex.compiler.definiti
 import org.apache.flex.compiler.definitions.INamespaceDefinition;
 import org.apache.flex.compiler.definitions.ISetterDefinition;
 import org.apache.flex.compiler.definitions.IStyleDefinition;
+import org.apache.flex.compiler.definitions.references.IReference;
 import org.apache.flex.compiler.definitions.references.IResolvedQualifiersReference;
 import org.apache.flex.compiler.definitions.references.ReferenceFactory;
 import org.apache.flex.compiler.internal.abc.ClassGeneratorHelper;
@@ -457,7 +458,7 @@ public class FlexAppSWFTarget extends Ap
         
         final FlexDelegate delegate = getDelegate();
         
-        if (!delegate.getGenerateSystemManagerAndFlexInit())
+        if (!delegate.getGenerateSystemManagerAndFlexInit() && !delegate.isFlexInfo(getRootClassDefinition()))
             return super.findAllCompilationUnitsToLink(compilationUnits, problems);
         
         // Performance heuristic: let's start compilation on all of the compilation
@@ -971,6 +972,20 @@ public class FlexAppSWFTarget extends Ap
             return generateSystemManagerAndFlexInit;
         }
         
+        public boolean isFlexInfo(ClassDefinition rootClassDef)
+        {
+            ClassDefinition superClass = (ClassDefinition)rootClassDef.resolveBaseClass(flexProject);
+            String impls[] = superClass.getImplementedInterfacesAsDisplayStrings();
+            for (String impl : impls)
+            {
+                if (impl.contains(".IFlexInfo"))
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+        
         private boolean getGenerateSystemManagerAndFlexInit()
         {
             if (generateSystemManagerAndFlexInit != null)
@@ -1184,7 +1199,7 @@ public class FlexAppSWFTarget extends Ap
                 Set<ICompilationUnit> emittedCompilationUnits,
                 Collection<ICompilerProblem> problems) throws InterruptedException
         {
-            if (getGenerateSystemManagerAndFlexInit())
+            if (getGenerateSystemManagerAndFlexInit() || isFlexInfo((ClassDefinition)mainApplicationClassDefinition))
             {
                 try
                 {



Mime
View raw message