Examples of ITypeNode


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

        IASScope containedScope = definition.getContainedScope();
        ITypeDefinition type = findType(containedScope.getAllLocalDefinitions());
        if (type == null)
            return;

        ITypeNode tnode = findTypeNode(definition.getNode());
        if (tnode != null)
        {
            getWalker().walk(tnode); // IClassNode | IInterfaceNode
        }
    }
View Full Code Here

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

        return null;
    }

    private static ITypeDefinition getTypeDefinition(IDefinitionNode node)
    {
        ITypeNode tnode = (ITypeNode) node.getAncestorOfType(ITypeNode.class);
        return (ITypeDefinition) tnode.getDefinition();
    }
View Full Code Here

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

        getWalker().walk(node.getRightOperandNode());
    }

    private static ITypeDefinition getTypeDefinition(IDefinitionNode node)
    {
        ITypeNode tnode = (ITypeNode) node.getAncestorOfType(ITypeNode.class);
        return (ITypeDefinition) tnode.getDefinition();
    }
View Full Code Here

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

        IASScope containedScope = definition.getContainedScope();
        ITypeDefinition type = findType(containedScope.getAllLocalDefinitions());
        if (type == null)
            return;

        ITypeNode tnode = findTypeNode(definition.getNode());
        if (tnode != null)
        {
            /*
             * Metadata
             *
             * @type {Object.<string, Array.<Object>>}
             */
            writeNewline();
            writeNewline();
            writeNewline();
            getDoc().begin();
            writeNewline(" * Metadata");
            writeNewline(" *");
            writeNewline(" * @type {Object.<string, Array.<Object>>}");
            getDoc().end();

            // a.B.prototype.AFJS_CLASS_INFO = {  };
            write(type.getQualifiedName());
            write(ASEmitterTokens.MEMBER_ACCESS);
            write(JSEmitterTokens.PROTOTYPE);
            write(ASEmitterTokens.MEMBER_ACCESS);
            writeToken(JSFlexJSEmitterTokens.FLEXJS_CLASS_INFO);
            writeToken(ASEmitterTokens.EQUAL);
            writeToken(ASEmitterTokens.BLOCK_OPEN);
           
            // names: [{ name: '', qName: '' }]
            write(JSFlexJSEmitterTokens.NAMES);
            writeToken(ASEmitterTokens.COLON);
            write(ASEmitterTokens.SQUARE_OPEN);
            writeToken(ASEmitterTokens.BLOCK_OPEN);
            write(JSFlexJSEmitterTokens.NAME);
            writeToken(ASEmitterTokens.COLON);
            write(ASEmitterTokens.SINGLE_QUOTE);
            write(tnode.getName());
            write(ASEmitterTokens.SINGLE_QUOTE);
            writeToken(ASEmitterTokens.COMMA);
            write(JSFlexJSEmitterTokens.QNAME);
            writeToken(ASEmitterTokens.COLON);
            write(ASEmitterTokens.SINGLE_QUOTE);
            write(tnode.getQualifiedName());
            write(ASEmitterTokens.SINGLE_QUOTE);
            write(ASEmitterTokens.BLOCK_CLOSE);
            write(ASEmitterTokens.SQUARE_CLOSE);

            IExpressionNode[] enodes;
View Full Code Here

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

                + target.substring(0, target.lastIndexOf(File.separator));
        String targetFile = target.substring(
                target.lastIndexOf(File.separator) + 1, target.length());

        fileNode = compileAS(targetFile, true, targetDir, false);
        ITypeNode type = (ITypeNode) findFirstDescendantOfType(fileNode,
                ITypeNode.class);
        if (type instanceof IClassNode)
            classNode = (IClassNode) type;
        else if (type instanceof IInterfaceNode)
            interfaceNode = (IInterfaceNode) type;
View Full Code Here

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

    }

    @Override
    public void emitPackageContents(IPackageNode node)
    {
        ITypeNode tnode = findTypeNode(node);
        if (tnode != null)
        {
            indentPush();
            write(NL);
            getWalker().walk(tnode); // IClassNode | IInterfaceNode
View Full Code Here

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

        return result;
    }

    private static ITypeDefinition getTypeDefinition(IDefinitionNode node)
    {
        ITypeNode tnode = (ITypeNode) node.getAncestorOfType(ITypeNode.class);
        return (ITypeDefinition) tnode.getDefinition();
    }
View Full Code Here

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

    //--------------------------------------------------------------------------

    @Override
    public void emitPackageHeader(IPackageNode node)
    {
        ITypeNode type = findTypeNode(node);
        if (type == null)
            return;

        write("goog.provide('" + type.getQualifiedName() + "');");
        write("\n");
        write("\n");
    }
View Full Code Here

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

    }

    @Override
    public void emitPackageHeaderContents(IPackageNode node)
    {
        ITypeNode type = findTypeNode(node);
        if (type == null)
            return;

        IPackageDefinition parent = (IPackageDefinition) node.getDefinition();
        ArrayList<String> list = new ArrayList<String>();
View Full Code Here

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

    }

    @Override
    public void emitPackageContents(IPackageNode node)
    {
        ITypeNode type = findTypeNode(node);
        if (type == null)
            return;

        IClassNode cnode = (IClassNode) type;
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.