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

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


                    fileScope.getClassDefinitionForComponentTag(tag);

            assert fxComponentClassDefinition != null : "MXMLScopeBuilder failed to build a class for an fx:Component";

            // attach scope with the component class definition node.
            TypeScope componentClassScope = (TypeScope)fxComponentClassDefinition.getContainedScope();
            containedClassDefinitionNode.setScope(componentClassScope); // TODO Move this logic to initializeFromTag().

            // Connect node to definitions and vice versa.
            containedClassDefinitionNode.setClassReference(project, tagDefinition); // TODO Move this logic to initializeFromTag().
            containedClassDefinitionNode.setClassDefinition(fxComponentClassDefinition); // TODO Move this logic to initializeFromTag().
View Full Code Here


class TypeDefinitionBuilder implements IClassVisitor
{
    protected TypeDefinitionBuilder(final ABCScopeBuilder scopeBuilder, final TypeDefinitionBase typeDefinition)
    {
        assert typeDefinition instanceof ClassDefinition || typeDefinition instanceof InterfaceDefinition;
        this.scope = new TypeScope(null, typeDefinition);
        this.definition = typeDefinition;
        this.definition.setContainedScope(scope);
        this.scopeBuilder = scopeBuilder;
    }
View Full Code Here

            ClassDefinition classDefinition = new ClassDefinition(mname.getBaseName(), (INamespaceReference)packageNS);
            IReference baseClass = ReferenceFactory.packageQualifiedReference(getProject().getWorkspace(), getFlexProject().getResourceBundleClass());
            classDefinition.setBaseClassReference(baseClass);
            classDefinition.setExcludedClass();

            TypeScope classScope = new TypeScope(packageScope, classDefinition);
            classScope.setContainingDefinition(classDefinition);
            classDefinition.setContainedScope(classScope);
            classDefinition.setupThisAndSuper();

            packageScope.addDefinition(classDefinition);
        }
View Full Code Here

            if (documentNode != null)
            {
                ClassDefinition mainClassDefinition = fileScope.getMainClassDefinition();
                if (mainClassDefinition != null)
                {
                    TypeScope mainClassScope = (TypeScope)mainClassDefinition.getContainedScope();
                    documentNode.setScope(mainClassScope);
                }
            }
           
            // Start CSS semantic analysis.
View Full Code Here

        {
            InterfaceDefinition definition = buildDefinition();
            setDefinition(definition);
            scope.addDefinition(definition);

            TypeScope typeScope = new TypeScope(scope, contentsNode, definition);
            definition.setContainedScope(typeScope);
            scope = typeScope;

            setupCastFunction(set, definition, scope);
        }
View Full Code Here

        ClassDefinition classDefinition = new ClassDefinition(mname.getBaseName(), (INamespaceReference)packageNS);
        IReference baseClass = ReferenceFactory.packageQualifiedReference(getProject().getWorkspace(), fxgBaseClassName);
        classDefinition.setBaseClassReference(baseClass);

        TypeScope classScope = new TypeScope(packageScope, classDefinition);
        classScope.setContainingDefinition(classDefinition);
        classDefinition.setContainedScope(classScope);
        classDefinition.setupThisAndSuper();

        packageScope.addDefinition(classDefinition);
View Full Code Here

    {
        if (scope instanceof TypeScope)
        {
            // TypeScopes need to pass the class scope, or instance scope to children based on if
            // the children are static or not so that the children will be set up with the correct scope chain
            TypeScope typeScope = (TypeScope)scope;
            ASScope classScope = typeScope.getStaticScope();
            ASScope instanceScope = typeScope.getInstanceScope();

            // Populate this scope with definitions found among the relevant descendants
            List <IASNode> children = getDescendantStatements(this);
            for (IASNode child : children)
            {
View Full Code Here

        // Grr... CM clients expect the name start of the root class definition to be at 0.
        currentClassDefinition.setNameLocation(0, 0);
        packageScope.addDefinition(currentClassDefinition);
        fileScope.setMainClassDefinition(currentClassDefinition);

        currentClassScope = new TypeScope(packageScope, currentClassDefinition);
        currentClassScope.setContainingDefinition(currentClassDefinition);

        if (baseClass instanceof IResolvedQualifiersReference)
        {
            IDefinition baseDef = ((IResolvedQualifiersReference)baseClass).resolve(project);
View Full Code Here

       
        // An <fx:Definition> tag will create a new class.
        // Save off the current class definition and scope
        // because we're going to change them before recursing down.
        ClassDefinition oldClassDefinition = currentClassDefinition;
        TypeScope oldClassScope = currentClassScope;
       
        // Walk the attributes looking for 'name'.
        IMXMLTagAttributeData[] definitionTagAttrs = definitionTag.getAttributeDatas();
        String definitionName = null;
        int nameStart = -1;
View Full Code Here

       
        // An <fx:Definition> tag will create a new class.
        // Save off the current class definition and scope
        // because we're going to change them before recursing down.
        ClassDefinition oldClassDefinition = currentClassDefinition;
        TypeScope oldClassScope = currentClassScope;
       
        // Walk the attributes looking for 'className'.
        IMXMLTagAttributeData[] definitionTagAttrs = componentTag.getAttributeDatas();
        String className = null;
        int nameStart = -1;
View Full Code Here

TOP

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

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.