Package org.apache.flex.compiler.internal.scopes

Examples of org.apache.flex.compiler.internal.scopes.ASScope


            return null;
       
        String importName = getImportName();
        IReference importReference = ReferenceFactory.packageQualifiedReference(
            project.getWorkspace(), importName);
        ASScope scope = (ASScope)getScopeNode().getScope();
        return importReference.resolve(project, scope, null, true);
    }
View Full Code Here


        // Set up the params for the setter
        ParameterDefinition param = new ParameterDefinition("");
        param.setTypeReference(typeRef);
        setter.setParameters(new ParameterDefinition[] {param});
        setter.setTypeReference(typeRef);
        ASScope setterContainedScope = new FunctionScope(containingScope);
        setter.setContainedScope(setterContainedScope);
        setterContainedScope.addDefinition(param);
        setter.setReturnTypeReference(ReferenceFactory.builtinReference(IASLanguageConstants.BuiltinType.VOID));

        return setter;
    }
View Full Code Here

    private static void saveScope(IMXMLNode node, BindingDatabase bindingDataBase)
    {
        // Later (for code gen), we will need a scope, so let's save it here.
        IScopedNode scopedNode = node.getContainingScope();
        IASScope iscope = scopedNode.getScope();
        ASScope scope = (ASScope)iscope;
        bindingDataBase.setScope(scope);
    }
View Full Code Here

        return sb.toString();
    }

    public ASFileScope getFileScope()
    {
        ASScope scope = getASScope();
        assert scope != null;
        while (!(scope instanceof ASFileScope))
        {
            scope = scope.getContainingScope();
            assert scope != null;
        }
        return (ASFileScope)scope;
    }
View Full Code Here

                    else
                        scope = typeScope.getInstanceScope();
                }
            }
        }
        ASScope asScope = scope instanceof ASScope ? (ASScope)scope : null;
        return asScope;
    }
View Full Code Here

        }

        @Override
        public INamespaceDefinition resolveNamespaceReference(ICompilerProject project)
        {
            ASScope scope = getScope();
            assert getScope() != null;

            String baseName = getBaseName();

            IDefinition definition = null;
            IDefinition base = baseRef.resolve(project, scope, DependencyType.EXPRESSION, true);
            if( base != null )
            {
                IDefinition baseType = base.resolveType(project);
                if( baseType != null )
                {
                    if( needsForwardRefPredicate() )
                    {
                        definition = scope.getPropertyFromDef(project, baseType, baseName, getForwardReferencePredicate(), false);
                    }
                    else
                    {
                        definition = scope.getPropertyFromDef(project, baseType, baseName, false);
                    }
                }
            }

            INamespaceDefinition ns = definition instanceof INamespaceDefinition ? (INamespaceDefinition)definition : null;
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.scopes.ASScope

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.