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

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


public class MXMLXMLNodeTests extends MXMLInstanceNodeTests
  private IMXMLXMLNode getMXMLXMLNode(String[] code)
  {
    IMXMLFileNode fileNode = getMXMLFileNode(code);
    IMXMLXMLNode node = (IMXMLXMLNode)findFirstDescendantOfType(fileNode, IMXMLXMLNode.class);
    assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLXMLID));
    assertThat("getName", node.getName(), is("XML"));
    return node;
  }
View Full Code Here


  {
    String[] code = new String[]
    {
      "<fx:XML/>"
    };
    IMXMLXMLNode node = getMXMLXMLNode(code);
    assertThat("getXMLType", node.getXMLType(), is(IMXMLXMLNode.XML_TYPE.E4X));
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getXMLString", node.getXMLString(), is((String)null));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:XML></fx:XML>"
    };
    IMXMLXMLNode node = getMXMLXMLNode(code);
    assertThat("getXMLType", node.getXMLType(), is(IMXMLXMLNode.XML_TYPE.E4X));
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getXMLString", node.getXMLString(), is((String)null));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:XML> \t\r\n</fx:XML>"
    };
    IMXMLXMLNode node = getMXMLXMLNode(code);
    assertThat("getXMLType", node.getXMLType(), is(IMXMLXMLNode.XML_TYPE.E4X));
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getXMLString", node.getXMLString(), is((String)null));
  }
View Full Code Here

    {
      "<fx:XML>",
        "    <root/>",
      "</fx:XML>"
    };
    IMXMLXMLNode node = getMXMLXMLNode(code);
    assertThat("getXMLType", node.getXMLType(), is(IMXMLXMLNode.XML_TYPE.E4X));
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getXMLString", node.getXMLString(), is("<root/>"));
  }
View Full Code Here

        "    <root>",
        "        <a>xxx</a>",
        "    </root>",
      "</fx:XML>"
    };
    IMXMLXMLNode node = getMXMLXMLNode(code);
    assertThat("getXMLType", node.getXMLType(), is(IMXMLXMLNode.XML_TYPE.E4X));
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getXMLString", node.getXMLString(), is("<root><a>xxx</a></root>"));
  }
View Full Code Here

        "    <root>",
        "        <a b='xxx'>",
        "    </root>",
      "</fx:XML>"
    };
    IMXMLXMLNode node = getMXMLXMLNode(code);
    assertThat("getXMLType", node.getXMLType(), is(IMXMLXMLNode.XML_TYPE.E4X));
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getXMLString", node.getXMLString(), is("<root><a b=\"xxx\"></root>")); // should single quote come back as double quote?
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:XML>{a.b}</fx:XML>"
    };
    IMXMLXMLNode node = getMXMLXMLNode(code);
    assertThat("databinding node", node.getChild(0).getNodeID(), is(ASTNodeID.MXMLDataBindingID));
    assertThat("databinding node child count", node.getChild(0).getChildCount(), is(1));
    assertThat("identifier node", node.getChild(0).getChild(0).getNodeID(), is(ASTNodeID.MemberAccessExpressionID));
  }
View Full Code Here

TOP

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

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.