Examples of IASScope


Examples of org.apache.flex.compiler.scopes.IASScope

     */
    public boolean isContingentDefinitionNeeded(ICompilerProject project, IDefinition definition)
    {
        assert (definition.isContingent()) : "contingentNeeded() called on non-contingent definition";

        IASScope containingScope = definition.getContainingScope();

        // for now contingent definitions are only ever class members, so the containing scope def must
        // be a ClassDefinition.  In future this rule can be changed, but code to search the class
        // hierarchy will become more complex, as the whole definition resolution code needs to be updated
        assert (containingScope.getDefinition() instanceof ClassDefinition) : "contingent definitions containing scope must be a Class";
        ClassDefinition containingType = (ClassDefinition)containingScope.getDefinition();

        String contingentName = definition.getBaseName();
        for (ITypeDefinition type : definition.isStatic() ? containingType.staticTypeIterable(project, false) : containingType.typeIteratable(project, false))
        {
            ASScope typeScope = (ASScope)type.getContainedScope();
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

        return getFileScope(scope).getFilePrivateNamespaceReference();
    }

    private static ASFileScope getFileScope(IASScope scope)
    {
        IASScope currScope = scope;
        while ((currScope != null) && (!(currScope instanceof ASFileScope)))
            currScope = currScope.getContainingScope();
        assert currScope != null : "Could not traverse to a file scope!";
        return (ASFileScope)currScope;
    }
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

            if (nNode.getNameStart() != getNameStart() || nNode.getNameEnd() != getNameEnd())
                return false;
        }
        else if (classification == NamespaceClassification.CLASS_MEMBER)
        {
            IASScope type = node.getContainingScope();
            IASScope type2 = getContainingScope();
            if (type != type2)
            {
                return false;
            }
            return type == type2;
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

    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

Examples of org.apache.flex.compiler.scopes.IASScope

    }

    @Override
    public void emitPackageHeader(IPackageDefinition definition)
    {
        IASScope containedScope = definition.getContainedScope();
        ITypeDefinition type = findType(containedScope.getAllLocalDefinitions());
        if (type == null)
            return;

        writeNewline("/**");
        writeNewline(" * " + type.getQualifiedName());
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

    }

    @Override
    public void emitPackageFooter(IPackageDefinition definition)
    {
        IASScope containedScope = definition.getContainedScope();
        ITypeDefinition type = findType(containedScope.getAllLocalDefinitions());
        if (type == null)
            return;

        ITypeNode tnode = findTypeNode(definition.getNode());
        if (tnode != null)
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

        setBufferWrite(true);

        write(JSAMDEmitterTokens.DEFINE);
        write(ASEmitterTokens.PAREN_OPEN);

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

        exportWriter.addFrameworkDependencies();
        exportWriter.addImports(type);
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

    }

    @Override
    public void emitPackageContents(IPackageDefinition definition)
    {
        IASScope containedScope = definition.getContainedScope();
        ITypeDefinition type = findType(containedScope.getAllLocalDefinitions());
        if (type == null)
            return;

        write("function($exports");
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

    }

    @Override
    public void emitPackageFooter(IPackageDefinition definition)
    {
        IASScope containedScope = definition.getContainedScope();
        ITypeDefinition type = findType(containedScope.getAllLocalDefinitions());
        if (type == null)
            return;

        exportWriter.writeExports(type, true);
        exportWriter.writeExports(type, false);
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IASScope

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

    @Override
    public void emitPackageHeader(IPackageDefinition definition)
    {
        IASScope containedScope = definition.getContainedScope();
        ITypeDefinition type = findType(containedScope.getAllLocalDefinitions());
        if (type == null)
            return;

        /* goog.provide('x');\n\n */
        write(JSGoogEmitterTokens.GOOG_PROVIDE);
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.