Examples of IStyleDefinition


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

        IWorkspace w = getWorkspace();
        while (classIterator.hasNext())
        {
            IClassDefinition c = classIterator.next();
            IStyleDefinition styleDefinition = c.getStyleDefinition(w, styleName);
            if (styleDefinition != null)
                return styleDefinition;
        }

        return null;
View Full Code Here

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

    private void validateStyle(MXMLTreeBuilder builder, ISourceLocation source)
    {
        final IDefinition definition = getDefinition();
        if (definition instanceof IStyleDefinition)
        {
            final IStyleDefinition styleTag = (IStyleDefinition)definition;
            final Set<String> applicableThemes = ImmutableSet.copyOf(styleTag.getThemes());
            if (!applicableThemes.isEmpty())
            {
                final Set<String> themeNames = ImmutableSet.copyOf(builder.getProject().getThemeNames());
                final boolean isStyleValid = !Sets.intersection(themeNames, applicableThemes).isEmpty();
                if (!isStyleValid)
                {
                    final String componentType;
                    if (getParent() instanceof IMXMLClassReferenceNode)
                        componentType = ((IMXMLClassReferenceNode)getParent()).getClassReference(builder.getProject()).getBaseName();
                    else
                        componentType = "";
                    final MXMLInvalidStyleProblem problem = new MXMLInvalidStyleProblem(
                            source,
                            this.getName(),
                            componentType,
                            styleTag.getThemes());
                    builder.addProblem(problem);
                }
            }
        }
    }
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.