Examples of IScopedNode


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

    // Utility
    //--------------------------------------------------------------------------

    protected ITypeNode findTypeNode(IPackageNode node)
    {
        IScopedNode scope = node.getScopedNode();
        for (int i = 0; i < scope.getChildCount(); i++)
        {
            IASNode child = scope.getChild(i);
            if (child instanceof ITypeNode)
                return (ITypeNode) child;
        }
        return null;
    }
View Full Code Here

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

        return false;
    }

    protected static boolean hasBody(IFunctionNode node)
    {
        IScopedNode scope = node.getScopedNode();
        return scope.getChildCount() > 0;
    }
View Full Code Here

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

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

    private List<String> resolveImports(ITypeDefinition type)
    {
        ArrayList<String> list = new ArrayList<String>();
        IScopedNode scopeNode = type.getContainedScope().getScopeNode();
        if (scopeNode != null)
        {
            scopeNode.getAllImports(list);
        }
        else
        {
            // MXML
            ClassDefinition cdefinition = (ClassDefinition) type;
View Full Code Here

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

        return result;
    }

    protected IClassDefinition resolveClassDefinition(IFunctionNode node)
    {
        IScopedNode scope = node.getContainingScope();
        if (scope instanceof IMXMLDocumentNode)
            return ((IMXMLDocumentNode) scope).getClassDefinition();

        IClassNode cnode = (IClassNode) node
                .getAncestorOfType(IClassNode.class);
View Full Code Here

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

    }
   
    @Override
    public NamespaceClassification getNamespaceClassification()
    {
        IScopedNode scopedNode = getScopeNode();
        IASNode node = scopedNode;
       
        if (node.getParent() instanceof PackageNode)
            return NamespaceClassification.PACKAGE_MEMBER;
       
View Full Code Here

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

        if(skipSrcPath && (this instanceof IScopedNode)) {
            for (int i = 0; i < level+1; i++)
                sb.append("  ");
            sb.append("[Scope]");
            sb.append("\n");
            IScopedNode scopedNode = (IScopedNode)this;
            IASScope scope = scopedNode.getScope();
            Collection<IDefinition> definitions = scope.getAllLocalDefinitions();
            for(IDefinition def : definitions) {
                for (int i = 0; i < level+2; i++)
                    sb.append("  ");
                ((DefinitionBase)def).buildString(sb, false);
View Full Code Here

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

     *
     * @return the ASScope for this node, or null if there isn't one.
     */
    public ASScope getASScope()
    {
        IScopedNode scopeNode = getContainingScope();
        IASScope scope = scopeNode != null ? scopeNode.getScope() : null;

        // If the ScopedNode had a null scope, keep looking up the tree until we
        // find one with a non-null scope.
        // TODO: Is it a bug that an IScopedNode returns null for it's scope?
        // TODO: this seems like a leftover from block scoping - for example, a
        // TODO: ForLoopNode is an IScopedNode, but it doesn't really have a scope
        while (scope == null && scopeNode != null)
        {
            scopeNode = scopeNode.getContainingScope();
            scope = scopeNode != null ? scopeNode.getScope() : null;
        }

        if (scope instanceof TypeScope)
        {
            TypeScope typeScope = (TypeScope)scope;
View Full Code Here

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

    // Utility
    //--------------------------------------------------------------------------

    protected ITypeNode findTypeNode(IPackageNode node)
    {
        IScopedNode scope = node.getScopedNode();
        for (int i = 0; i < scope.getChildCount(); i++)
        {
            IASNode child = scope.getChild(i);
            if (child instanceof ITypeNode)
                return (ITypeNode) child;
        }
        return null;
    }
View Full Code Here

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

        return false;
    }

    protected static boolean hasBody(IFunctionNode node)
    {
        IScopedNode scope = node.getScopedNode();
        return scope.getChildCount() > 0;
    }
View Full Code Here

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

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

    private List<String> resolveImports(ITypeDefinition type)
    {
        ArrayList<String> list = new ArrayList<String>();
        IScopedNode scopeNode = type.getContainedScope().getScopeNode();
        if (scopeNode != null)
        {
            scopeNode.getAllImports(list);
        }
        else
        {
            // MXML
            ClassDefinition cdefinition = (ClassDefinition) 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.