Package org.apache.flex.compiler.internal.projects

Examples of org.apache.flex.compiler.internal.projects.FlexProject


                (MXMLClassDefinitionNode)getClassDefinitionNode();

        EnumSet<TextParsingFlags> flags = FLAGS;

        IDefinition definition = getDefinition();
        FlexProject project = builder.getProject();
        if (definition instanceof IVariableDefinition)
        {
            if (((IVariableDefinition)definition).hasCollapseWhiteSpace(project))
                flags.add(TextParsingFlags.COLLAPSE_WHITE_SPACE);
            if (((IVariableDefinition)definition).hasRichTextContent(project))
View Full Code Here


    }

    void initializeDefaultProperty(MXMLTreeBuilder builder, IVariableDefinition defaultPropertyDefinition,
                                   List<IMXMLUnitData> contentUnits)
    {
        FlexProject project = builder.getProject();

        assert (contentUnits.isEmpty()) ||
                (!builder.getFileScope().isScriptTag(contentUnits.get(0))) : "Script tags should not start a default property!";

        assert (contentUnits.isEmpty()) ||
                (!builder.getFileScope().isScriptTag(contentUnits.get(contentUnits.size() - 1))) : "Trailing script tags should be removed from default property content units!";

        // Set the location of the default property node
        // to span the tags that specify the default property value.
        setLocation(builder, contentUnits);

        String propertyTypeName = getPropertyTypeName(builder);

        // If the property is of type IDeferredInstance or ITransientDeferredInstance,
        // create an implicit MXMLDeferredInstanceNode.
        if (propertyTypeName.equals(project.getDeferredInstanceInterface()) ||
            propertyTypeName.equals(project.getTransientDeferredInstanceInterface()))
        {
            instanceNode = new MXMLDeferredInstanceNode(this);
            ((MXMLDeferredInstanceNode)instanceNode).initializeDefaultProperty(
                    builder, defaultPropertyDefinition, contentUnits);
        }
View Full Code Here

            instanceNode.initializeFromTag(builder, childTag);
        }
        else
        {
            String propertyTypeName = getPropertyTypeName(builder);
            FlexProject project = builder.getProject();

            // If the property is of type IDeferredInstance or ITransientDeferredInstance,
            // create an implicit MXMLDeferredInstanceNode.
            if (propertyTypeName.equals(project.getDeferredInstanceInterface()) ||
                propertyTypeName.equals(project.getTransientDeferredInstanceInterface()))
            {
                instanceNode = new MXMLDeferredInstanceNode(this);
                instanceNode.initializeFromTag(builder, tag);
            }
            else
View Full Code Here

    protected void initializationComplete(MXMLTreeBuilder builder, IMXMLTagData tag,
                                          MXMLNodeInfo info)
    {
        super.initializationComplete(builder, tag, info);

        FlexProject project = builder.getProject();

        // If this property is type Array, and it didn't get set to an Array tag,
        // then create an implicit Array tag and initialize it from the
        // child tags of the property tag.
        IDefinition definition = getDefinition();
View Full Code Here

        super.initializationComplete(builder, tag, info);

        children = info.getChildNodeList().toArray(new IMXMLBindingAttributeNode[0]);

        // Add an expression dependency on mx.binding.BindingManager.
        FlexProject project = builder.getProject();
        builder.addExpressionDependency(project.getBindingManagerClass());

        // Do some semantic checks.

        IMXMLTagAttributeData sourceAttribute = tag.getTagAttributeData(ATTRIBUTE_SOURCE);
        IMXMLTagAttributeData destinationAttribute = tag.getTagAttributeData(ATTRIBUTE_DESTINATION);
View Full Code Here

    @Override
    protected void processChildTag(MXMLTreeBuilder builder, IMXMLTagData tag,
                                   IMXMLTagData childTag,
                                   MXMLNodeInfo info)
    {
        FlexProject project = builder.getProject();

        // Check whether the child tag is an instance tag.
        IDefinition definition = builder.getFileScope().resolveTagToDefinition(childTag);
        if (definition instanceof ClassDefinition)
        {
            // This node should generate an instance of mx.core.DeferredInstanceFromFunction.
            String qname = project.getDeferredInstanceFromFunctionClass();
            setClassReference(project, qname);
            builder.addExpressionDependency(qname);

            childNode = MXMLInstanceNode.createInstanceNode(
                    builder, definition.getQualifiedName(), this);
View Full Code Here

    }

    void initializeDefaultProperty(MXMLTreeBuilder builder, IVariableDefinition defaultPropertyDefinition,
                                   List<IMXMLUnitData> contentUnits)
    {
        FlexProject project = builder.getProject();

        assert (contentUnits.isEmpty()) ||
                (!builder.getFileScope().isScriptTag(contentUnits.get(0))) : "Script tags should not start a default property!";

        assert (contentUnits.isEmpty()) ||
                (!builder.getFileScope().isScriptTag(contentUnits.get(contentUnits.size() - 1))) : "Trailing script tags should be removed from default property content units!";

        // Set the location of the implicit deferred instance node
        // to span the tags that specify the default property value.
        setLocation(builder, contentUnits);

        setClassReference(project, project.getDeferredInstanceFromFunctionClass());

        // Determine whether the the default property is being set to a single Array tag.
        boolean isSingleArrayTag = false;
        int n = contentUnits.size();
        if (n == 1 && contentUnits.get(0) instanceof IMXMLTagData)
View Full Code Here

    public void initializeFromFragments(MXMLTreeBuilder builder,
                                        ISourceLocation location,
                                        ISourceFragment[] fragments)
    {
        // This node represents an instance of mx.core.DeferredInstanceFromClass.
        FlexProject project = builder.getProject();
        String qname = project.getDeferredInstanceFromClassClass();
        setClassReference(project, qname);

        // Add an expression dependency on that class.
        builder.addExpressionDependency(qname);
View Full Code Here

        {
            propertyName = ((IMXMLPropertySpecifierNode)parent).getName();
            IVariableDefinition propertyDefinition =
                    (IVariableDefinition)((IMXMLPropertySpecifierNode)parent).getDefinition();
            // propertyDefinition will be null in the case of a property of an <Object> tag
            FlexProject project = builder.getProject();
            arrayElementType = propertyDefinition != null ?
                           propertyDefinition.getArrayElementType(project) :
                           IASLanguageConstants.Object;
        }
View Full Code Here

            return;
        }

        // report problem if it isn't an instance

        FlexProject project = builder.getProject();

        String tagName = builder.getFileScope().resolveTagToQualifiedName(childTag);
        if (tagName == null)
        {
            builder.addProblem(new MXMLUnresolvedTagProblem(childTag));
            return;
        }

        IDefinition definition = project.getScope().findDefinitionByName(tagName);
        if (definition instanceof ClassDefinition)
        {
            MXMLInstanceNode instanceNode =
                    MXMLInstanceNode.createInstanceNode(builder, tagName, this);
            instanceNode.setClassReference(project, (ClassDefinition)definition); // TODO Move this logic to initializeFromTag().
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.projects.FlexProject

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.