Package org.apache.flex.compiler.problems

Examples of org.apache.flex.compiler.problems.ICompilerProblem


    @Override
    protected String processItemDestructionPolicyAttribute(MXMLTreeBuilder builder,
                                                           IMXMLTagAttributeData attribute)
    {
        // TODO Report the correct problem.
        ICompilerProblem problem = new MXMLSemanticProblem(attribute);
        builder.addProblem(problem);
        return null;
    }
View Full Code Here


    {
        super.initializationComplete(builder, tag, info);

        if (key == null)
        {
            ICompilerProblem problem = new ResourceBundleNoKeyParameterProblem(this);
            builder.addProblem(problem);
        }

        if (bundleName == null)
        {
            ICompilerProblem problem = new ResourceBundleNoBundleParameterProblem(this);
            builder.addProblem(problem);
        }
    }
View Full Code Here

            {
                type = (ITypeDefinition)def;
            }
            else
            {
                ICompilerProblem problem = new MXMLInvalidVectorTypeAttributeProblem(attribute);
                builder.addProblem(problem);
            }
        }
        else if (attribute.isSpecialAttribute(ATTRIBUTE_FIXED))
        {
            // TODO Improve this when we implement type recognition for text values.
            value = attribute.getMXMLDialect().trim(value);
            if (value.equals(IASLanguageConstants.TRUE))
            {
                fixed = true;
            }
            else if (value.equals(IASLanguageConstants.FALSE))
            {
                fixed = false;
            }
            else
            {
                ICompilerProblem problem = new MXMLInvalidVectorFixedAttributeProblem(attribute);
                builder.addProblem(problem);
            }
        }
        else
        {
View Full Code Here

            instanceNode.setClassReference(project, (ClassDefinition)definition); // TODO Move this logic to initializeFromTag().
            instanceNode.initializeFromTag(builder, childTag);
            info.addChildNode(instanceNode);
            if (!instanceNode.getClassReference(project).isInstanceOf(type, project))
            {
                ICompilerProblem problem = new MXMLIncompatibleVectorElementProblem(childTag);
                builder.addProblem(problem);
            }
        }
        else
        {
View Full Code Here

            if (getID() != null)
                builder.addDependency(qname, DependencyType.SIGNATURE);
        }
        else
        {
            ICompilerProblem problem = new MXMLMissingVectorTypeAttributeProblem(tag);
            builder.addProblem(problem);
        }
    }
View Full Code Here

    {
        super.initializationComplete(builder, tag, info);

        if (info.hasSourceAttribute && info.hasDualContent)
        {
            ICompilerProblem problem = new MXMLDualContentProblem(tag, tag.getShortName());
            builder.addProblem(problem);
            return;
        }

        // If <fx:Style> tag has a valid 'source' attribute, the text of the node is ignored.
View Full Code Here

        if (superclassDefinition != null && superclassDefinition.isDeprecated())
        {
            IASNode problemNode = getBaseClassProblemNode(classNode, classDefinition);
            if (!SemanticUtils.hasDeprecatedAncestor(problemNode))
            {
                ICompilerProblem problem = SemanticUtils.createDeprecationProblem(superclassDefinition, problemNode);
                problems.add(problem);
            }
        }

        return (ClassDefinition)superclassDefinition;
View Full Code Here

     * which determines the problem location.
     * @return An {@link ICompilerProblem}.
     */
    public static ICompilerProblem createDeprecationProblem(IDefinition definition, IASNode site)
    {
        ICompilerProblem problem = null;

        IDeprecationInfo deprecationInfo = definition.getDeprecationInfo();

        String message = deprecationInfo.getMessage();
        if (message != null)
View Full Code Here

                    }
                }
            }
            catch (InterruptedException e)
            {
                ICompilerProblem problem = new InternalCompilerProblem2(parser.getFilename(), e, "ConfigProcessor");
                addProblem(problem);
            }
            finally
            {
                transferringConstants = false;
View Full Code Here

        IdentifierNode configNamespaceNode = (IdentifierNode)node.getNamespaceNode();
        IDefinitionSet set = configScope.getASScope().getLocalDefinitionSetByName(configNamespaceNode.getName());
        if (set == null)
        {
            IIdentifierNode namespaceNode = (IdentifierNode)node.getNamespaceNode();
            ICompilerProblem problem = new UndefinedConfigNamespaceProblem(namespaceNode, namespaceNode.getName());
            addProblem(problem);
            return false;
        }

        configScope.addItemAfterNormalization(node);
        DefinitionBase constDef = node.getDefinition();
        configScope.getASScope().addDefinition(constDef);
        if (constDef instanceof ConstantDefinition)
        {
            ConstantDefinition def = (ConstantDefinition)constDef;
            Object value = def.resolveValue(backingProject);
            if (value == ConfigConstNode.UNKNOWN_VALUE)
            {
                // Get the real source node for the problem.
                // If there isn't one, then don't make a problem - assume
                // someone else already found the cause and logged it.
                IASNode problemLocationNode = node.getAssignedValueNode();
                if (problemLocationNode != null)
                {
                    ICompilerProblem problem = new NonConstantConfigInitProblem(
                            problemLocationNode);
                    addProblem(problem);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.problems.ICompilerProblem

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.