Package org.apache.flex.compiler.tree.as

Examples of org.apache.flex.compiler.tree.as.IFileNode


    @Override
    protected IClassNode getClassNode(String code)
    {
        String source = "package org.apache.flex {import flash.events.IEventDispatcher;import mx.logging.ILogger;import spark.components.Button;"
                + code + "}";
        IFileNode node = compileAS(source);
        IClassNode child = (IClassNode) findFirstDescendantOfType(node,
                IClassNode.class);
        return child;
    }
View Full Code Here


    }

    protected IClassNode getClassNode(String code)
    {
        String source = "package {" + code + "}";
        IFileNode node = compileAS(source);
        IClassNode child = (IClassNode) findFirstDescendantOfType(node,
                IClassNode.class);
        return child;
    }
View Full Code Here

    @Test
    public void testLocalFunction()
    {
        String fileName = "LocalFunction";

        IFileNode node = compileAS(fileName, true,
                "test-files"
                        + File.separator + "flexjs" + File.separator + "files",
                false);
       
        asBlockWalker.visitFile(node);
View Full Code Here

    @Test
    public void testFlexJSMyController()
    {
        String fileName = "controllers/MyController";

        IFileNode node = compileAS(fileName, true,
                "test-files"
                        + File.separator + "flexjs" + File.separator + "files",
                false);
       
        asBlockWalker.visitFile(node);
View Full Code Here

    @Test
    public void testFlexJSMyModel()
    {
        String fileName = "models/MyModel";

        IFileNode node = compileAS(fileName, true, "test-files"
                + File.separator + "flexjs" + File.separator + "files", false);

        asBlockWalker.visitFile(node);
       
        //writeResultToFile(writer.toString(), fileName);
View Full Code Here

{
    @Override
    @Test
    public void testPackage_Simple()
    {
        IFileNode node = compileAS("package{}");
        asBlockWalker.visitFile(node);
        assertOut("");
    }
View Full Code Here

    }

    @Test
    public void testPackage_SimpleName()
    {
        IFileNode node = compileAS("package foo {}");
        asBlockWalker.visitFile(node);
        assertOut("");
    }
View Full Code Here

    @Override
    @Test
    public void testPackage_Name()
    {
        IFileNode node = compileAS("package foo.bar.baz {}");
        asBlockWalker.visitFile(node);
        assertOut("");
    }
View Full Code Here

        // (erikdebruin) the constuctor IS the class definition, in 'goog' JS,
        //               therefor we need to write out implicit constructors
        //               (if I understand the term correctly)

        IFileNode node = compileAS("package {public class A{}}");
        asBlockWalker.visitFile(node);
        assertOut("goog.provide('A');\n\n/**\n * @constructor\n */\nA = function() {\n};");
    }
View Full Code Here

    @Override
    @Test
    public void testPackageQualified_Class()
    {
        IFileNode node = compileAS("package foo.bar.baz {public class A{}}");
        asBlockWalker.visitFile(node);
        assertOut("goog.provide('foo.bar.baz.A');\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};");
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.tree.as.IFileNode

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.