Examples of IClassDefinition


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

                if (qnameToDefinition.containsKey(qname))
                {
                    // The subject's resolved QName is in the linking set.
                    // Collect all "excluded" styles for this subject selector.
                    // Only check "Exclude" styles on used styles.
                    final IClassDefinition classDefinition = qnameToDefinition.get(qname);
                    final IMetaTag[] excludeMetaTags = classDefinition.getMetaTagsByName(IASLanguageConstants.EXCLUDE_META_TAG);
                    for (final IMetaTag exclude : excludeMetaTags)
                    {
                        final String kind = exclude.getAttributeValue(IASLanguageConstants.EXCLUDE_META_TAG_KIND);
                        if (IASLanguageConstants.EXCLUDE_META_TAG_STYLE.equals(kind))
                        {
View Full Code Here

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

            // without a host component class definition, there aren't any more checks we
            // can do, so just bail out.
            return;
        }

        IClassDefinition hostComponentClassDef = (IClassDefinition)hostComponentDef;
        verifySkinParts(hostComponentClassDef, project, problems);
        verifySkinStates(hostComponentClassDef, project, problems);
    }
View Full Code Here

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

    {
        ICommonClassNode decoratedClassNode = (ICommonClassNode)getAncestorOfType(ICommonClassNode.class);
        if (decoratedClassNode == null)
            return null;
        IWorkspace workspace = getWorkspace();
        IClassDefinition decoratedClassDefinition = decoratedClassNode.getDefinition();
        assert decoratedClassDefinition != null;
        return decoratedClassDefinition.getStyleDefinition(workspace, getName());
    }
View Full Code Here

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

        // which involves generating class member variables to embed images.
        SourceContext srcContext = new SourceContext(1024, 0);
        StringBuilder buf = srcContext.functionBuffer;
       
        Variables varContext = new Variables();
        IClassDefinition definition = (IClassDefinition)getDefinition(packageRichText);
       
        if(definition != null)
        {
            varContext.setVar(definition, NodeType.RICHTEXT);
            String elementVar = varContext.elementVar;
View Full Code Here

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

        String currentVar = varContext.elementVar;
        String contentVar = varContext.contentVar;
        String parentClass = varContext.elementClass;
        String parentChildrenVar = varContext.elementChildrenVar;
        IClassDefinition type = varContext.type;

        if (!varContext.varDeclared)
        {
            // var someElement:SomeElement = new SomeElement();
            buf.append("        var ").append(currentVar).append(":").append(parentClass).append(" = new ").append(parentClass).append("();\r\n");

            // var someContent:Array = [];
            if (contentVar != null)
                buf.append("        var ").append(contentVar).append(":Array = [];\r\n");
        }
        else
        {
            // someElement = new SomeElement();
            buf.append("        ").append(currentVar).append(" = new ").append(parentClass).append("();\r\n");

            // someContent = [];
            if (contentVar != null)
                buf.append("        ").append(contentVar).append(" = [];\r\n");
        }

        // Attributes
        generateAttributes(textNode, type, attributes, srcContext, currentVar);

        // Properties
        // Note: We process RichTextNode properties after content has been assigned.
        if (!(textNode instanceof RichTextNode))
            generateProperties(srcContext, textNode, currentVar, varContext);

        // Child Nodes
        if (children != null && children.size() > 0)
        {
            Iterator<ITextNode> iter = children.iterator();
            while (iter.hasNext())
            {
                String elementVar = null;
                ITextNode child = iter.next();
                IClassDefinition definition = null;
               
                // FXG 2.0
                if (child instanceof RichTextNode)
                {
                    definition = (IClassDefinition)getDefinition(packageRichText);
View Full Code Here

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

                String propertyName = entry.getKey();
                ITextNode node = entry.getValue();

                if (node instanceof TextLayoutFormatNode)
                {
                    IClassDefinition definition = (IClassDefinition)getDefinition(packageTextLayoutFormat);
                    if(definition != null)
                    {
                        varContext.setVar(definition, NodeType.TEXT_LAYOUT_FORMAT);
                        generateTextVariable(node, srcContext, varContext);
View Full Code Here

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

    }

    @Override
    public IClassDefinition getClassReference(ICompilerProject project)
    {
        IClassDefinition classReference = super.getClassReference(project);
        if (classReference != null)
            return classReference;

        try
        {
View Full Code Here

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

        if (percentProxy == null)
            return null;

        // Find the definition for the proxy property.
        ASScope classScope = (ASScope)propertyDefinition.getContainingScope();
        IClassDefinition classDefinition = (IClassDefinition)classScope.getDefinition();
        IDefinition proxyDefinition = classScope.getPropertyFromDef(
                project, classDefinition, percentProxy, false);
        if (!(proxyDefinition instanceof IVariableDefinition))
            return null;
View Full Code Here

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

                // TODO Add a problem subclass for this.
                ICompilerProblem problem = new MXMLSemanticProblem(childTag);
                builder.addProblem(problem);
            }

            IClassDefinition tagDefinition = (IClassDefinition)tagDef;

            // Check that the class is not final.
            if (tagDefinition.isFinal())
            {
                // TODO Add a problem subclass for this.
                ICompilerProblem problem = new MXMLSemanticProblem(childTag);
                builder.addProblem(problem);
            }
View Full Code Here

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

            includeIn = null;
            excludeFrom = null;
        }

        FlexProject project = builder.getProject();
        IClassDefinition classReference = getClassReference(project);
        if (classReference != null)
        {
            String qname = classReference.getQualifiedName();
            builder.addDependency(qname, DependencyType.EXPRESSION);
            if (id != null)
                builder.addDependency(qname, DependencyType.SIGNATURE);
        }
    }
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.