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:17:00 UTC
[03/10] git commit: [flex-falcon] [refs/heads/develop] - more
improvements to handling fx:Declarations and mxmlContent
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;