Examples of INamespaceDefinition


Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

            needsProtected = namespaceSet.contains(owningType.getProtectedNamespaceReference());

        for (ITypeDefinition type : types)
        {
            ASScope typeScope = (ASScope)type.getContainedScope();
            INamespaceDefinition protectedNamespace = null;
            if (needsProtected)
            {
                protectedNamespace = type.getProtectedNamespaceReference();
            }
            // Only lookup static properties in this scope - for any inherited scopes, we should lookup instance properties
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

        defs = getFilteredCollectionForScopeChainLookup(defs, lookupKind);

        for (ITypeDefinition type : types)
        {
            ASScope typeScope = (ASScope)type.getContainedScope();
            INamespaceDefinition protectedNamespace = null;
            if (needsProtected)
            {
                protectedNamespace = type.getProtectedNamespaceReference();
            }
            typeScope.getAllLocalProperties(project, defs, namespaceSet, protectedNamespace);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

            {
                accumulateDefinitions(referencingCU, defs, definition);
            }
            else
            {
                INamespaceDefinition ns = definition.resolveNamespace(project);
                if ((extraNamespace != null) && ((ns == extraNamespace) || (extraNamespace.equals(ns))))
                    accumulateDefinitions(referencingCU, defs, definition);
                else if (namespaceSet.contains(ns))
                    accumulateDefinitions(referencingCU, defs, definition);
            }
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

        ClassDefinition base = (ClassDefinition)cls.resolveBaseClass(project);

        if (base != null)
        {
            // Adjust the namespace if this is the protected namespace
            INamespaceDefinition namespace = resolveNamespace(project);
            if (namespace == null)
                return null; // can't resolve namespace, hence overridden function can't be resolved

            INamespaceDefinition protectedNS = cls.getProtectedNamespaceReference().resolveNamespaceReference(project);
            if (namespace.equals(protectedNS))
                namespace = base.getProtectedNamespaceReference().resolveNamespaceReference(project);

            // Look for a property with the same name as this function in the base class
            // the lookup will search up the inheritance chain, so we don't have to worry about
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

        final String name = getBaseName();
        final INamespaceReference namespaceReference = getNamespaceReference();
        final boolean isStatic = isStatic();
       
        // If the namespace is bad and dosn't resolve, then we can't find corresponding accessor.
        final INamespaceDefinition thisNamespaceDef = namespaceReference.resolveNamespaceReference(project);
        if (thisNamespaceDef == null)
            return null;
        final boolean isBindable = ((NamespaceDefinition)thisNamespaceDef).getAETNamespace().getName().equals(
                                    BindableHelper.bindableNamespaceDefinition.getAETNamespace().getName());

        final IDefinitionSet definitionSet = scope.getLocalDefinitionSetByName(name);

        if (definitionSet == null)
            return null;

        final int n = definitionSet.getSize();
        for (int i = 0; i < n; i++)
        {
            IDefinition d = definitionSet.getDefinition(i);
            if (d instanceof IAccessorDefinition)
            {
                final IAccessorDefinition definition = (IAccessorDefinition)d;
               
                // If this is a static accessor, we want another static accessor.
                // If this is an instance accessor, we want another instance accessor.
                if (definition.isStatic() == isStatic)
                {
                    // If this is a getter, we want a setter, and vice versa.
                    if (this instanceof IGetterDefinition && definition instanceof ISetterDefinition ||
                        this instanceof ISetterDefinition && definition instanceof IGetterDefinition)
                    {
                        INamespaceReference testDefRef = definition.getNamespaceReference();
                        INamespaceDefinition testNamespaceDef = testDefRef.resolveNamespaceReference(project);
                        final boolean testBindable = ((NamespaceDefinition)testNamespaceDef).getAETNamespace().getName().equals(
                                BindableHelper.bindableNamespaceDefinition.getAETNamespace().getName());
                        /* aharui: namespaces shouldn't have to match.  A subclass may only override
                         * one of the protected methods, and it was legal to have a public getter with
                         * a protected setter and other combinations like that.  Either both
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

            return namespace == this.namespaceReference;
        }

        // Otherwise, the namespaces are equivalent if they resolve to
        // equivalent namespaceReference definitions (i.e., two with the same URI).
        INamespaceDefinition ns1 = namespace.resolveNamespaceReference(project);
        INamespaceDefinition ns2 = this.namespaceReference.resolveNamespaceReference(project);
        return ((ns1 != null && ns2 != null) ? ns1.equals(ns2) : false);
    }
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

            IDefinition foundDefinition = null;
            if (lastIndexOfDot != -1)
            {
                String unqualifiedName = typeName.substring(lastIndexOfDot + 1);
                String packageName = typeName.substring(0, lastIndexOfDot);
                INamespaceDefinition packageNS = ((CompilerProject)project).getWorkspace().getPackageNamespaceDefinitionCache().get(packageName, false);
                foundDefinition = containingScope.findPropertyQualified(compilerProject, packageNS, unqualifiedName, dt, true);
            }
            else
            {
                foundDefinition = containingScope.findProperty(compilerProject, typeName, dt, true);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

        packageDefinition.setContainedScope(packageScope);

        fileScope.addDefinition(packageDefinition);

        Multiname mname = Multiname.crackDottedQName(getProject(), qname);
        INamespaceDefinition packageNS = Iterables.getOnlyElement(mname.getNamespaceSet());

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

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

                implementedInterfaces[i] = ReferenceFactory.packageQualifiedReference(project.getWorkspace(), interfaces[i].trim());
            }
        }

        Multiname mname = Multiname.crackDottedQName(this.project, qname);
        INamespaceDefinition packageNS = Iterables.getOnlyElement(mname.getNamespaceSet());
        assert packageNS instanceof INamespaceReference;
        currentClassDefinition = new ClassDefinition(mname.getBaseName(), (INamespaceReference)packageNS);
        currentClassDefinition.setLocation(rootTag);
        currentClassDefinition.setBaseClassReference(baseClass);
        currentClassDefinition.setImplementedInterfaceReferences(implementedInterfaces);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.INamespaceDefinition

            needsIBorder = !definition.isInstanceOf(TranscoderBase.CORE_PACKAGE + ".IBorder", project);
            needsIFlexDisplayObject = !definition.isInstanceOf(TranscoderBase.CORE_PACKAGE + ".IFlexDisplayObject", project);
            flexMovieClipOrSprite = definition.isInstanceOf(TranscoderBase.CORE_PACKAGE + ".FlexMovieClip", project) ||
                                    definition.isInstanceOf(TranscoderBase.CORE_PACKAGE + ".FlexSprite", project);

            final INamespaceDefinition qualifier = definition.getNamespaceReference().resolveNamespaceReference(project);
            needsBorderMetrics = needsGetter(project, qualifier, definition, "borderMetrics");
            needsMeasuredHeight = needsGetter(project, qualifier, definition, "measuredHeight");
            needsMeasuredWidth = needsGetter(project, qualifier, definition, "measuredWidth");
            needsMove = needsFunction(project, qualifier, definition, "move");
            needsSetActualSize = needsFunction(project, qualifier, definition, "setActualSize");
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.