Package org.apache.flex.compiler.internal.mxml

Examples of org.apache.flex.compiler.internal.mxml.MXMLDialect


            return false;

        String tagURI = attribute.getParent().getURI();

        IMXMLData mxmlData = attribute.getParent().getParent();
        MXMLDialect mxmlDialect = mxmlData.getMXMLDialect();
        String languageURI = mxmlDialect.getLanguageNamespace();

        boolean isPrivate = false;
        if (mxmlDialect.isEqualToOrAfter(MXMLDialect.MXML_2009))
        {
            isPrivate = !attributeURI.equals(languageURI) &&
                        !attributeURI.equals(tagURI);
        }
        return isPrivate;
View Full Code Here


     * <code>&lt;Reparent&gt;</code> tag.
     */
    protected String[] processIncludeInOrExcludeFromAttribute(
            MXMLTreeBuilder builder, IMXMLTagAttributeData attribute)
    {
        MXMLDialect mxmlDialect = builder.getMXMLDialect();
        if (mxmlDialect == MXMLDialect.MXML_2006)
        {
            ICompilerProblem problem = new MXMLAttributeVersionProblem(attribute, attribute.getName(), "2009");
            builder.addProblem(problem);
            return null;
        }

        MXMLClassDefinitionNode classNode =
                (MXMLClassDefinitionNode)getClassDefinitionNode();
        classNode.addStateDependentNode(builder, this);

        return mxmlDialect.splitAndTrim(attribute.getRawValue());
    }
View Full Code Here

            ICompilerProblem problem = new MXMLDualContentProblem(tag, tag.getShortName());
            builder.addProblem(problem);
            return;
        }

        final MXMLDialect mxmlDialect = builder.getMXMLDialect();
        final String sourcePath = tag.getParent().getFileSpecification().getPath();
        final MXMLClassDefinitionNode classNode = getContainingClassNode();
        final ASScope classScope = (ASScope)classNode.getClassDefinition().getContainedScope();
        final CompilerProject project = builder.getProject();
        final OffsetLookup offsetLookup = classScope.getFileScope().getOffsetLookup();

        setSourcePath(sourcePath);
        try
        {
            // parse inline ActionScript
            final List<ScopedBlockNode> scriptNodes = new ArrayList<ScopedBlockNode>();
            for (IMXMLUnitData unit = tag.getFirstChildUnit(); unit != null; unit = unit.getNextSiblingUnit())
            {
                if (unit instanceof IMXMLTextData)
                {
                    final IMXMLTextData mxmlTextData = (IMXMLTextData)unit;
                    String text = mxmlTextData.getCompilableText();
                    if (!mxmlDialect.isWhitespace(text))
                    {
                        // local offset at the end of the containing open script tag
                        assert offsetLookup != null : "Expected OffsetLookup on FileScope.";
                        final int localOffset = mxmlTextData.getParentUnitData().getAbsoluteEnd();
                        final int[] absoluteOffsets = offsetLookup.getAbsoluteOffset(sourcePath, localOffset);
View Full Code Here

{
    protected static MXMLInstanceNode createInstanceNode(MXMLTreeBuilder builder,
                                                         String instanceType,
                                                         NodeBase parent)
    {
        MXMLDialect mxmlDialect = builder.getMXMLDialect();

        if (instanceType.equals(IASLanguageConstants.Boolean))
            return new MXMLBooleanNode(parent);

        else if (instanceType.equals(IASLanguageConstants._int))
View Full Code Here

                                      IMXMLTagAttributeData attribute)
    {
        String value = attribute.getRawValue();

        // Falcon trims this attribute even though the old compiler didn't.
        MXMLDialect mxmlDialect = builder.getMXMLDialect();
        value = mxmlDialect.trim(value);

        // The id must be a valid ActionScript identifier.
        // Otherwise it will be null.
        if (!isValidASIdentifier(value))
        {
View Full Code Here

    }

    protected String processItemCreationPolicyAttribute(MXMLTreeBuilder builder,
                                                        IMXMLTagAttributeData attribute)
    {
        MXMLDialect mxmlDialect = builder.getMXMLDialect();
        if (mxmlDialect == MXMLDialect.MXML_2006)
        {
            ICompilerProblem problem = new MXMLAttributeVersionProblem(attribute, attribute.getName(), "2009");
            builder.addProblem(problem);
            return null;
        }

        String value = attribute.getRawValue();
        value = mxmlDialect.trim(value);

        // The itemCreationPolicy must be "immediate" or "deferred";
        // otherwise, it will be null.
        if (!value.equals(ITEM_CREATION_POLICY_IMMEDIATE) &&
            !value.equals(ITEM_CREATION_POLICY_DEFERRED))
View Full Code Here

    }

    protected String processItemDestructionPolicyAttribute(MXMLTreeBuilder builder,
                                                           IMXMLTagAttributeData attribute)
    {
        MXMLDialect mxmlDialect = builder.getMXMLDialect();
        if (mxmlDialect == MXMLDialect.MXML_2006)
        {
            ICompilerProblem problem = new MXMLAttributeVersionProblem(attribute, attribute.getName(), "2009");
            builder.addProblem(problem);
            return null;
        }

        String value = attribute.getRawValue();
        value = mxmlDialect.trim(value);

        // The itemDestructionPolicy must be "auto" or "nevet";
        // otherwise, it will be null.
        if (!value.equals(ITEM_DESTRUCTION_POLICY_AUTO) &&
            !value.equals(ITEM_DESTRUCTION_POLICY_NEVER))
View Full Code Here

    }

    private String processTargetAttribute(MXMLTreeBuilder builder,
                                          IMXMLTagAttributeData attribute)
    {
        MXMLDialect mxmlDialect = builder.getMXMLDialect();

        // Falcon trims this attribute even though the old compiler didn't.
        String value = attribute.getRawValue();
        value = mxmlDialect.trim(value);

        return value;
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.mxml.MXMLDialect

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.