flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - try to allow alternative embed class names
Date Mon, 06 Mar 2017 19:31:17 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop c1417e134 -> 445854b7e


try to allow alternative embed class names


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

Branch: refs/heads/develop
Commit: 445854b7e240d30761fe821549055130818f325f
Parents: c1417e1
Author: Alex Harui <aharui@apache.org>
Authored: Mon Mar 6 11:26:07 2017 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Mar 6 11:26:07 2017 -0800

----------------------------------------------------------------------
 .../flex/compiler/config/Configuration.java     | 20 ++++++++++++++++++++
 .../embedding/transcoders/DataTranscoder.java   |  4 +++-
 .../projects/FlexProjectConfigurator.java       |  4 +++-
 3 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/445854b7/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java b/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
index 3fbf713..fa8d612 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
@@ -1620,6 +1620,26 @@ public class Configuration
     }
 
     //
+    // 'compiler.byte-array-embed-class' option
+    //
+
+    private String byteArrayEmbedClass = "mx.core.ByteArrayAsset";
+
+    public String getByteArrayEmbedClass()
+    {
+        return byteArrayEmbedClass;
+    }
+
+    /**
+     * The class for embedded byte arrays
+     */
+    @Config(advanced = true)
+    public void setCompilerByteArrayEmbedClass(ConfigurationValue cv, String b)
+    {
+    	byteArrayEmbedClass = b;
+    }
+
+    //
     // 'compiler.states-class' option
     //
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/445854b7/compiler/src/main/java/org/apache/flex/compiler/internal/embedding/transcoders/DataTranscoder.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/embedding/transcoders/DataTranscoder.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/embedding/transcoders/DataTranscoder.java
index ff5c32e..5f76509 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/embedding/transcoders/DataTranscoder.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/embedding/transcoders/DataTranscoder.java
@@ -47,11 +47,13 @@ public class DataTranscoder extends TranscoderBase
         super(data, workspace);
     }
 
+    public static String embedClassName = CORE_PACKAGE + ".ByteArrayAsset";
+    
     @Override
     public boolean analyze(ISourceLocation location, Collection<ICompilerProblem> problems)
     {
         boolean result = super.analyze(location, problems);
-        baseClassQName = CORE_PACKAGE + ".ByteArrayAsset";
+        baseClassQName = embedClassName;
         return result;
     }
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/445854b7/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
index 3001630..d66b340 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProjectConfigurator.java
@@ -31,6 +31,7 @@ import org.apache.flex.abc.semantics.Nsset;
 import org.apache.flex.compiler.config.Configuration;
 import org.apache.flex.compiler.internal.as.codegen.BindableHelper;
 import org.apache.flex.compiler.internal.definitions.ClassDefinition;
+import org.apache.flex.compiler.internal.embedding.transcoders.DataTranscoder;
 import org.apache.flex.compiler.mxml.IMXMLTypeConstants;
 
 /**
@@ -245,7 +246,8 @@ public class FlexProjectConfigurator
             project.setProxyBaseClass(configValue);
 
             project.setStrictXML(configuration.isStrictXML());
-
+            
+            DataTranscoder.embedClassName = configuration.getByteArrayEmbedClass();
         }
     }
 }


Mime
View raw message