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

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


    }
 
    private IMXMLDefinitionNode getMXMLDefinitionNode(String[] code)
  {
    IMXMLFileNode fileNode = getMXMLFileNode(code);
    IMXMLDefinitionNode node = (IMXMLDefinitionNode)findFirstDescendantOfType(fileNode, IMXMLDefinitionNode.class);
    assertThat("getNodeID", node.getNodeID(), is(ASTNodeID.MXMLDefinitionID));
    assertThat("getName", node.getName(), is("Definition"));
    return node;
  }
View Full Code Here


  {
    String[] code = new String[]
    {
      "<fx:Definition/>"
    };
    IMXMLDefinitionNode node = getMXMLDefinitionNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getName", node.getDefinitionName(), is((String)null));
    assertThat("getContainedClassDefinitionNode", node.getContainedClassDefinitionNode(), is((IMXMLClassDefinitionNode)null));
    assertThat("getContainedClassDefinition", node.getContainedClassDefinition(), is((IClassDefinition)null));
  }
View Full Code Here

    String[] code = new String[]
    {
        "<fx:Definition>",
        "</fx:Definition>"
    };
    IMXMLDefinitionNode node = getMXMLDefinitionNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
    assertThat("getDefinitionName", node.getDefinitionName(), is((String)null));
    assertThat("getContainedClassDefinitionNode", node.getContainedClassDefinitionNode(), is((IMXMLClassDefinitionNode)null));
    assertThat("getContainedClassDefinition", node.getContainedClassDefinition(), is((IClassDefinition)null));
  }
View Full Code Here

    {
        "<fx:Definition>",
        "    <d:Sprite/>",
        "</fx:Definition>"
    };
    IMXMLDefinitionNode node = getMXMLDefinitionNode(code);
    assertThat("getChildCount", node.getChildCount(), is(1));
    assertThat("getDefinitionName", node.getDefinitionName(), is((String)null));
    assertThat("getContainedClassDefinitionNode", node.getContainedClassDefinitionNode(), is(node.getChild(0)));
    assertThat("getContainedClassDefinition", node.getContainedClassDefinition().isInstanceOf("flash.display.Sprite", project), is(true));
  }
View Full Code Here

    {
        "<fx:Definition name='MySprite'>",
        "    <d:Sprite/>",
        "</fx:Definition>"
    };
    IMXMLDefinitionNode node = getMXMLDefinitionNode(code);
    assertThat("getChildCount", node.getChildCount(), is(1));
    assertThat("getDefinitionName", node.getDefinitionName(), is("MySprite"));
    assertThat("getContainedClassDefinitionNode", node.getContainedClassDefinitionNode(), is(node.getChild(0)));
    assertThat("getContainedClassDefinition", node.getContainedClassDefinition().isInstanceOf("flash.display.Sprite", project), is(true));
  }
View Full Code Here

        "    <d:Sprite width='100'>",
        "        <d:height>100</d:height>",
        "    </d:Sprite>",
        "</fx:Definition>"
    };
    IMXMLDefinitionNode node = getMXMLDefinitionNode(code);
    assertThat("getChildCount", node.getChildCount(), is(1));
    assertThat("getDefinitionName", node.getDefinitionName(), is("MySprite"));
    assertThat("getContainedClassDefinitionNode", node.getContainedClassDefinitionNode(), is(node.getChild(0)));
    assertThat("getContainedClassDefinition", node.getContainedClassDefinition().isInstanceOf("flash.display.Sprite", project), is(true));
    assertThat("getContainedClassDefinitionNode.getChildCount", node.getContainedClassDefinitionNode().getChildCount(), is(2));
  }
View Full Code Here

TOP

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

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.