Package org.apache.flex.compiler.tree.mxml

Examples of org.apache.flex.compiler.tree.mxml.IMXMLPropertySpecifierNode


                {
                    IMXMLEmbedNode embedNode = (IMXMLEmbedNode)node;
                    IASNode parent = embedNode.getParent();
                    if (parent instanceof IMXMLPropertySpecifierNode)
                    {
                        IMXMLPropertySpecifierNode propertyNode = (IMXMLPropertySpecifierNode)parent;
                        IDefinition propertyDefinition = propertyNode.getDefinition();
                        if (propertyDefinition instanceof ISetterDefinition)
                        {
                            ISetterDefinition setter = (ISetterDefinition)propertyDefinition;
                            if (attributeName.equals(setter.getBaseName()))
                            {
View Full Code Here


        for (int i = 0; i < numChildren; i++)
        {
            final IASNode child = instanceNode.getChild(i);
            if (child instanceof IMXMLPropertySpecifierNode)
            {
                IMXMLPropertySpecifierNode propertyNode = (IMXMLPropertySpecifierNode)child;
                if (isDataBindingNode(propertyNode.getInstanceNode()))
                    return true;
            }
        }
        return false;
    }
View Full Code Here

       
        //-----------------------------------------------------------------------------
        // Second property set: maybe set destination and propertyName
       
        // get the property specifier node for the property the instanceNode represents
        IMXMLPropertySpecifierNode propertySpecifier = (IMXMLPropertySpecifierNode)
            instanceNode.getAncestorOfType( IMXMLPropertySpecifierNode.class);
   
        if (propertySpecifier == null)
        {
           assert false;        // I think this indicates an invalid tree...
        }
        else
        {
            // Check the parent - if it's an instance then we want to use these
            // nodes to get our property values from. If not, then it's the root
            // and we don't need to specify destination
           
            IASNode parent = propertySpecifier.getParent();
            if (parent instanceof IMXMLInstanceNode)
            {
               IMXMLInstanceNode parentInstance = (IMXMLInstanceNode)parent;
               String parentId = parentInstance.getEffectiveID();
               assert parentId != null;
               String propName = propertySpecifier.getName();
              
              
               if (getProject().getTargetSettings().getMxmlChildrenAsData())
               {
                   addItemsIL.addInstruction(OP_pushstring, "destination");
View Full Code Here

    protected void initializationComplete(MXMLTreeBuilder builder, IMXMLTagData tag, MXMLNodeInfo info)
    {
        super.initializationComplete(builder, tag, info);

        // Find 'name' property node.
        final IMXMLPropertySpecifierNode namePropertyNode = getPropertySpecifierNode(ATTRIBUTE_NAME);
        if (namePropertyNode != null)
        {
            final IMXMLInstanceNode namePropertyValueNode = namePropertyNode.getInstanceNode();
            if (namePropertyValueNode instanceof IMXMLStringNode)
            {
                final IMXMLStringNode stringNode = (IMXMLStringNode)namePropertyValueNode;
                methodName = stringNode.getValue();
            }
View Full Code Here

    protected void initializationComplete(MXMLTreeBuilder builder, IMXMLTagData tag, MXMLNodeInfo info)
    {
        super.initializationComplete(builder, tag, info);

        // Find 'name' property node.
        final IMXMLPropertySpecifierNode namePropertyNode = getPropertySpecifierNode(ATTRIBUTE_NAME);
        if (namePropertyNode != null)
        {
            final IMXMLInstanceNode namePropertyValueNode = namePropertyNode.getInstanceNode();
            if (namePropertyValueNode instanceof IMXMLStringNode)
            {
                final IMXMLStringNode stringNode = (IMXMLStringNode)namePropertyValueNode;
                operationName = stringNode.getValue();
            }
View Full Code Here

           ret = new InstructionListNode(insns);    // Wrap the IL in a node and return it
        }
        else if (parent instanceof IMXMLPropertySpecifierNode && dbnode instanceof IMXMLSingleDataBindingNode)
        {
            IMXMLPropertySpecifierNode psn = (IMXMLPropertySpecifierNode)parent;
            IDefinition d = psn.getDefinition();
            Binding b = host.getInstanceScope().getBinding(d);
            INamespaceReference ns = psn.getDefinition().getNamespaceReference();
            if (ns != NamespaceDefinition.getPublicNamespaceDefinition())
            {
                InstructionList insns = new InstructionList();
                insns.addInstruction(OP_getlocal0);
                insns.addInstruction(OP_getlocal1);
View Full Code Here

       
        //-----------------------------------------------------------------------------
        // Second property set: maybe set destination and propertyName
       
        // get the property specifier node for the property the instanceNode represents
        IMXMLPropertySpecifierNode propertySpecifier = (IMXMLPropertySpecifierNode)
            instanceNode.getAncestorOfType( IMXMLPropertySpecifierNode.class);
   
        if (propertySpecifier == null)
        {
           assert false;        // I think this indicates an invalid tree...
        }
        else
        {
            // Check the parent - if it's an instance then we want to use these
            // nodes to get our property values from. If not, then it's the root
            // and we don't need to specify destination
           
            IASNode parent = propertySpecifier.getParent();
            if (parent instanceof IMXMLInstanceNode)
            {
               IMXMLInstanceNode parentInstance = (IMXMLInstanceNode)parent;
               String parentId = parentInstance.getEffectiveID();
               assert parentId != null;
               String propName = propertySpecifier.getName();
              
               MXMLDescriptorSpecifier dest = new MXMLDescriptorSpecifier();
               dest.isProperty = true;
               dest.name = "destination";
               dest.parent = addItems;
View Full Code Here

    return "String";
  }
 
  protected IMXMLPropertySpecifierNode testMXMLPropertySpecifierNode(String[] code, String value)
  {
    IMXMLPropertySpecifierNode node = getMXMLPropertySpecifierNode(code);
    assertThat("getInstanceNode.getNodeID", node.getInstanceNode().getNodeID(), is(ASTNodeID.MXMLStringID));
    assertThat("getInstanceNode.getValue", ((IMXMLStringNode)node.getInstanceNode()).getValue(), is(value));
    return node;
  }
View Full Code Here

    return "Number";
  }
 
  protected IMXMLPropertySpecifierNode testMXMLPropertySpecifierNode(String[] code, double value)
  {
    IMXMLPropertySpecifierNode node = getMXMLPropertySpecifierNode(code);
    assertThat("getInstanceNode.getNodeID", node.getInstanceNode().getNodeID(), is(ASTNodeID.MXMLNumberID));
    assertThat("getInstanceNode.getValue", ((IMXMLNumberNode)node.getInstanceNode()).getValue(), is(value));
    return node;
  }
View Full Code Here

    return "int";
  }
 
  protected IMXMLPropertySpecifierNode testMXMLPropertySpecifierNode(String[] code, int value)
  {
    IMXMLPropertySpecifierNode node = getMXMLPropertySpecifierNode(code);
    assertThat("getInstanceNode.getNodeID", node.getInstanceNode().getNodeID(), is(ASTNodeID.MXMLIntID));
    assertThat("getInstanceNode.getValue", ((IMXMLIntNode)node.getInstanceNode()).getValue(), is(value));
    return node;
  }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.tree.mxml.IMXMLPropertySpecifierNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.