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

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


public class MXMLResourceNodeTests extends MXMLInstanceNodeTests
{
  private IMXMLResourceNode getMXMLResourceNode(String[] code)
  {
    IMXMLFileNode fileNode = getMXMLFileNode(code);
    IMXMLResourceNode node = (IMXMLResourceNode)findFirstDescendantOfType(fileNode, IMXMLResourceNode.class);
    assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLResourceID));
    assertThat("getName", node.getName(), is("Resource"));
    assertThat("getChildCount", node.getChildCount(), is(0));
    return node;
  }
View Full Code Here


  {
    String[] code = new String[]
    {
      "<fx:Boolean> @Resource(bundle='b1', key='k1') </fx:Boolean>"
    };
    IMXMLResourceNode node = getMXMLResourceNode(code);
    assertThat("getBundleName", node.getBundleName(), is("b1"));
    assertThat("getKey", node.getKey(), is("k1"));
    assertThat("getType", node.getType(), is(project.getBuiltinType(BuiltinType.BOOLEAN)));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:int> @Resource(bundle='b1', key='k1') </fx:int>"
    };
    IMXMLResourceNode node = getMXMLResourceNode(code);
    assertThat("getBundleName", node.getBundleName(), is("b1"));
    assertThat("getKey", node.getKey(), is("k1"));
    assertThat("getType", node.getType(), is(project.getBuiltinType(BuiltinType.INT)));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:uint> @Resource(bundle='b1', key='k1') </fx:uint>"
    };
    IMXMLResourceNode node = getMXMLResourceNode(code);
    assertThat("getBundleName", node.getBundleName(), is("b1"));
    assertThat("getKey", node.getKey(), is("k1"));
    assertThat("getType", node.getType(), is(project.getBuiltinType(BuiltinType.UINT)));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Number> @Resource(bundle='b1', key='k1') </fx:Number>"
    };
    IMXMLResourceNode node = getMXMLResourceNode(code);
    assertThat("getBundleName", node.getBundleName(), is("b1"));
    assertThat("getKey", node.getKey(), is("k1"));
    assertThat("getType", node.getType(), is(project.getBuiltinType(BuiltinType.NUMBER)));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:String> @Resource(bundle='b1', key='k1') </fx:String>"
    };
    IMXMLResourceNode node = getMXMLResourceNode(code);
    assertThat("getBundleName", node.getBundleName(), is("b1"));
    assertThat("getKey", node.getKey(), is("k1"));
    assertThat("getType", node.getType(), is(project.getBuiltinType(BuiltinType.STRING)));
  }
View Full Code Here

  {
    String[] code = new String[]
    {
      "<fx:Class> @Resource(bundle='b1', key='k1') </fx:Class>"
    };
    IMXMLResourceNode node = getMXMLResourceNode(code);
    assertThat("getBundleName", node.getBundleName(), is("b1"));
    assertThat("getKey", node.getKey(), is("k1"));
    assertThat("getType", node.getType(), is(project.getBuiltinType(BuiltinType.CLASS)));
  }
View Full Code Here

TOP

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

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.