Examples of IDefinition


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

    //

    @Override
    public IDefinition resolve(ICompilerProject project)
    {
        IDefinition def = null;
        switch (kind)
        {
            case THIS:
            case SUPER:
            {
View Full Code Here

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

                break;
            }
           
            case ANY_TYPE:
            {
                IDefinition def = resolve(project);
                // Didn't resolve to anything, just return '*'
                if (def == null)
                    type = project.getBuiltinType(IASLanguageConstants.BuiltinType.ANY_TYPE);
                else
                    type = def.resolveType(project);
                break;
            }
               
            case REST:
            {
View Full Code Here

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

     * <code>null</code> if the specified name doesn't resolve to a property, an
     * event, or a style.
     */
    public IDefinition resolveSpecifier(IClassDefinition classDefinition, String specifierName)
    {
        IDefinition definition = null;

        // From DeclarationHandler.invoke, the correct resolution
        // order is:
        // event
        // property
View Full Code Here

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

           
            ASScope classScope = ((ClassDefinition)c).getContainedScope();
            IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(propertyName);
            if (definitionSet != null)
            {
                IDefinition winner = null;
               
                int n = definitionSet.getSize();
                for (int i = 0; i < n; i++)
                {
                    IDefinition definition = definitionSet.getDefinition(i);
                   
                    // Look for vars and setters, but not getters.
                    // Remember that getters and setters implement IVariableDefinition!
                    if (definition instanceof IVariableDefinition &&
                        !(definition instanceof IGetterDefinition))
                    {
                        // TODO Add namespace logic.
                        // Can MXML set protected properties?
                        // Can MXML set mx_internal properties if you've done
                        // 'use namesapce mx_internal' in a <Script>?
                        winner = definition;
                        final INamespaceReference namespaceReference = definition.getNamespaceReference();
                        final INamespaceDefinition thisNamespaceDef = namespaceReference.resolveNamespaceReference(this);
                        final boolean isBindable = ((NamespaceDefinition)thisNamespaceDef).getAETNamespace().getName().equals(
                                BindableHelper.bindableNamespaceDefinition.getAETNamespace().getName());
                        // if we find a setter always take it, otherwise
                        // keep looking for a setter
View Full Code Here

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

        if (rootClassCompilationUnits.isEmpty())
            return ImmutableList.<ICompilerProblem>of(new FileNotFoundProblem(rootClassFileName));
       
        assert Iterables.getOnlyElement(rootClassCompilationUnits) != null : "The build should have been aborted before this point if there is no root class compilation unit.";
       
        IDefinition rootClassDefinition = rootClassRef.resolve(project);
        if (rootClassDefinition == null)
            return ImmutableList.<ICompilerProblem>of(new UnableToFindRootClassDefinitionProblem(targetSettings.getRootClassName()));
       
        return ImmutableList.<ICompilerProblem>of();
    }
View Full Code Here

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

            List<ClassDefinition> resolvedClasses = new ArrayList<ClassDefinition>(classes.size());
            Set<ICompilationUnit> frameCompilationUnits = new HashSet<ICompilationUnit>(classes.size());
            for (String frameClass : classes)
            {
                IResolvedQualifiersReference ref = ReferenceFactory.packageQualifiedReference(project.getWorkspace(), frameClass);
                IDefinition def = ref.resolve(project);
                if (def instanceof ClassDefinition)
                {
                    resolvedClasses.add((ClassDefinition)def);
                   
                    ICompilationUnit defCU = project.getScope().getCompilationUnitForDefinition(def);
View Full Code Here

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

    {
        IResolvedQualifiersReference rootClassRef = getRootClassReference();
        if (rootClassRef == null)
            return null;

        IDefinition rootClassDef = rootClassRef.resolve(project);
        if (!(rootClassDef instanceof ClassDefinition))
            return null;

        return (ClassDefinition)rootClassDef;
    }
View Full Code Here

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

         * null.
         */
        private NamespaceDefinition resolveQualifiedDirectiveReference(INamespaceDefinition resolvedQualifier, String baseName)
        {

            IDefinition definition =
                    scope.findPropertyQualified(project, forwardRefPred, resolvedQualifier, baseName, DependencyType.NAMESPACE);
            return getResolvedNamespace(project, definition);
        }
View Full Code Here

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

    public void checkFunctionDecl(IFunctionNode funcNode )
    {
        IParameterNode[] paramNodes = funcNode.getParameterNodes();
        for (IParameterNode paramNode : paramNodes)
        {
            IDefinition paramDef = paramNode.getDefinition();

            ITypeDefinition paramTypeDef = ((IVariableDefinition)paramDef).resolveType(project);
            if (!SemanticUtils.isType(paramTypeDef) )
            {
                IExpressionNode typeExpression = paramNode.getVariableTypeNode();
                String typeName =  paramDef.getTypeAsDisplayString();
                addTypeProblem(typeExpression, paramTypeDef, typeName, true);
            }
        }
    }
View Full Code Here

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

        //  Check the assignment's type logic and values.
        ITypeDefinition leftType = null;
        if ( binding.getDefinition() != null )
        {
            IDefinition leftDef = binding.getDefinition();
            leftType = binding.getDefinition().resolveType(project);
           
            IASNode rightNode = SemanticUtils.getNthChild(iNode, 1);
      
            checkImplicitConversion(rightNode, leftType);
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.