Package org.apache.flex.compiler.internal.css

Examples of org.apache.flex.compiler.internal.css.CSSFunctionCallPropertyValue


        {
            valueInstructions.addInstruction(ABCConstants.OP_pushdouble, new Double(((CSSNumberPropertyValue)value).getNumber().doubleValue()));
        }
        else if (value instanceof CSSFunctionCallPropertyValue)
        {
            final CSSFunctionCallPropertyValue functionCall = (CSSFunctionCallPropertyValue)value;
            if ("ClassReference".equals(functionCall.name))
            {
                final String className = CSSFunctionCallPropertyValue.getSingleArgumentFromRaw(functionCall.rawArguments);
                if ("null".equals(className))
                {
View Full Code Here


        for (final ICSSProperty property : cssRule.getProperties())
        {
            final ICSSPropertyValue propertyValue = property.getValue();
            if (propertyValue instanceof CSSFunctionCallPropertyValue)
            {
                final CSSFunctionCallPropertyValue functionCall = (CSSFunctionCallPropertyValue)propertyValue;
                if (CSSFunctionCallPropertyValue.CLASS_REFERENCE.equals(functionCall.name))
                {
                    // Found a ClassReference() property.
                    if ("null".equals(functionCall.rawArguments))
                    {
                        // Do nothing. ClassReference(null) resets the skin class.
                    }
                    else
                    {
                        final String qName;
                        if (CSSStringPropertyValue.isQuoted(functionCall.rawArguments))
                            qName = stripQuotes(functionCall.rawArguments);
                        else
                            qName = functionCall.rawArguments;

                        final IDefinition definition = project.resolveQNameToDefinition(qName);
                        // The definition is expected to be a class definition.
                        if (definition != null && definition instanceof IClassDefinition)
                        {
                            classReferences.add((IClassDefinition)definition);
                        }
                        else
                        {
                            final CSSUnresolvedClassReferenceProblem problem = new CSSUnresolvedClassReferenceProblem(functionCall);
                            problems.add(problem);
                        }
                    }
                }
                else if (CSSFunctionCallPropertyValue.EMBED.equals(functionCall.name))
                {
                    final String embedMetadata = String.format("[%s(%s)]", functionCall.name, functionCall.rawArguments);
                    // TODO Calling normalize here prevents an assert later
                    // in the getFileSpecification() of Workspace. The problem is that an embed
                    // in default.css inside a SWC has a source path which doesn't look normalized.
                    final String sourcePath = FilenameNormalization.normalize(functionCall.getSourcePath());
                    final MetaTagsNode metadata = ASParser.parseMetadata(project.getWorkspace(), embedMetadata,
                                                                         sourcePath, functionCall.getStart(),
                                                                         functionCall.getLine(), functionCall.getColumn(),
                                                                         problems);
                    final IMetaTagNode embedTag = metadata.getTagByName("Embed");
                    if (embedTag == null)
                    {
                        problems.add(new CSSEmbedAssetProblem(functionCall));
View Full Code Here

            {
                result.append(new Double(((CSSNumberPropertyValue)value).getNumber().doubleValue()));
            }
            else if (value instanceof CSSFunctionCallPropertyValue)
            {
                final CSSFunctionCallPropertyValue functionCall = (CSSFunctionCallPropertyValue)value;
                if ("ClassReference".equals(functionCall.name))
                {
                    final String className = CSSFunctionCallPropertyValue.getSingleArgumentFromRaw(functionCall.rawArguments);
                    if ("null".equals(className))
                    {
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.css.CSSFunctionCallPropertyValue

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.