Examples of StylesContainer


Examples of flex2.compiler.css.StylesContainer

        {
            CompilationUnit u = (CompilationUnit) units.get(i);

            if (u.isRoot())
            {
                StylesContainer stylesContainer =
                    (StylesContainer) symbolTable.getContext().getAttribute(StylesContainer.class.getName());
                StylesContainer rootStylesContainer = u.getStylesContainer();

                // If the backgroundColor wasn't specified inline, go looking for it in CSS.
                if ((u.swfMetaData == null) || (u.swfMetaData.getValue("backgroundColor") == null))
                {
                    QName qName = u.topLevelDefinitions.last();
                   
                    if (qName != null)
                    {
                        String def = qName.toString();
                        lookupBackgroundColor(stylesContainer, rootStylesContainer, u.styleName,
                                              NameFormatter.toDot(def), symbolTable, configuration);
                    }
                }

                if (rootStylesContainer != null)
                {
                    // Swap in root's Logger, so warnings get associated correctly.
                    Logger originalLogger = ThreadLocalToolkit.getLogger();
                    ThreadLocalToolkit.setLogger(u.getSource().getLogger());
                    rootStylesContainer.validate(symbolTable, nameMappings, u.getStandardDefs(),
                                                 compilerConfiguration.getThemeNames(), null);
                    ThreadLocalToolkit.setLogger(originalLogger);
                }

                Source source = u.getSource();
View Full Code Here

Examples of flex2.compiler.css.StylesContainer

          // We also need styles for an AS file that subclasses Application or Module.
                    if (u.loaderClass != null || u.loaderClassBase != null)
                    {
                        CompilerConfiguration compilerConfig = configuration.getCompilerConfiguration();

                        StylesContainer stylesContainer =
                            (StylesContainer) symbolTable.getContext().getAttribute(StylesContainer.class.getName());

                        if (stylesContainer == null)
                        {
                            stylesContainer = new StylesContainer(compilerConfig, u, symbolTable.perCompileData);
                            stylesContainer.setNameMappings(nameMappings);
                            symbolTable.getContext().setAttribute(StylesContainer.class.getName(), stylesContainer);
                        }

                        // locate style defaults each time through,
                        // because new dependencies could have brought
                        // in new SWC files with a defaults.css file.
                        List<VirtualFile> cssFiles = compilerConfig.getDefaultsCssFiles();
                        Set<String> cssFilesSet = new HashSet<String>();
                       
                        for (VirtualFile cssFile : cssFiles )
                        {
                            cssFilesSet.add(cssFile.getName());
                        }
                       
                        locateStyleDefaults(units, compilerConfig);
                       
                        cssFiles = compilerConfig.getDefaultsCssFiles();
                        Set<String> addedCssFilesSet = null;
                       
                        if (!cssFilesSet.isEmpty())
                        {
                            Set<String> secondCssFilesSet = new HashSet<String>();
                           
                            for (VirtualFile cssFile : cssFiles )
                            {
                                secondCssFilesSet.add(cssFile.getName());
                            }
                           
                            addedCssFilesSet = new HashSet<String>();
                            for (String cssName : secondCssFilesSet )
                            {
                                if (!cssFilesSet.contains(cssName))
                                {
                                    addedCssFilesSet.add(cssName);
                                }
                            }
                        }
                       
                        stylesContainer.loadDefaultStyles();
                        stylesContainer.validate(symbolTable, nameMappings, u.getStandardDefs(), compilerConfig.getThemeNames(), addedCssFilesSet);

                        List<CULinkable> linkables = new LinkedList<CULinkable>();

                        for (Iterator it2 = units.iterator(); it2.hasNext();)
                        {
                            linkables.add( new CULinkable( (CompilationUnit) it2.next() ) );
                        }

                        try
                        {
                            LinkState state = new LinkState(linkables, new HashSet(), configuration.getIncludes(), new HashSet<String>());

                            // C: generate style classes for components which we want to link in.
                            List<Source> styleSources = new ArrayList<Source>();
                            generatedSources = stylesContainer.processDependencies(styleSources, state.getDefNames(), resources,
                                                                    u.getSource().getRelativePath().replace('/', '.'),
                                                                    u.getSource().getShortName());

                            // Sweep through and remove any previous style sources.
                            Iterator<Source> iterator = sources.iterator();
View Full Code Here

Examples of flex2.compiler.css.StylesContainer

        atResources = new TreeMap<String, AtResource>();
        typeRefs = new TreeSet<String>();
       
        designLayers = new HashMap<DesignLayerNode, DesignLayer>();

        stylesContainer = new StylesContainer(mxmlConfiguration, unit, typeTable.getPerCompileData());
        unit.setStylesContainer(stylesContainer);
        showDeprecationWarnings = mxmlConfiguration.showDeprecationWarnings();
        allowDuplicateDefaultStyleDeclarations = mxmlConfiguration.getAllowDuplicateDefaultStyleDeclarations();
       
        stylesContainer.setMxmlDocument(this);
View Full Code Here

Examples of flex2.compiler.css.StylesContainer

        {
            CompilationUnit u = (CompilationUnit) units.get(i);

            if (u.isRoot())
            {
                StylesContainer stylesContainer =
                    (StylesContainer) symbolTable.getContext().getAttribute(StylesContainer.class.getName());
                StylesContainer rootStylesContainer = u.getStylesContainer();

                // If the backgroundColor wasn't specified inline, go looking for it in CSS.
                if ((u.swfMetaData == null) || (u.swfMetaData.getValue("backgroundColor") == null))
                {
                    QName qName = u.topLevelDefinitions.last();
                   
                    if (qName != null)
                    {
                        String def = qName.toString();
                        lookupBackgroundColor(stylesContainer, rootStylesContainer, u.styleName,
                                              NameFormatter.toDot(def), symbolTable, configuration);
                    }
                }

                if (rootStylesContainer != null)
                {
                    // Swap in root's Logger, so warnings get associated correctly.
                    Logger originalLogger = ThreadLocalToolkit.getLogger();
                    ThreadLocalToolkit.setLogger(u.getSource().getLogger());
                    rootStylesContainer.validate(symbolTable, nameMappings, u.getStandardDefs(),
                                                 compilerConfiguration.getThemeNames(), null);
                    ThreadLocalToolkit.setLogger(originalLogger);
                }

                Source source = u.getSource();
View Full Code Here

Examples of flex2.compiler.css.StylesContainer

          // We also need styles for an AS file that subclasses Application or Module.
                    if (u.loaderClass != null || u.loaderClassBase != null)
                    {
                        CompilerConfiguration compilerConfig = configuration.getCompilerConfiguration();

                        StylesContainer stylesContainer =
                            (StylesContainer) symbolTable.getContext().getAttribute(StylesContainer.class.getName());

                        if (stylesContainer == null)
                        {
                            stylesContainer = new StylesContainer(compilerConfig, u, symbolTable.perCompileData);
                            stylesContainer.setNameMappings(nameMappings);
                            symbolTable.getContext().setAttribute(StylesContainer.class.getName(), stylesContainer);
                        }

                        // locate style defaults each time through,
                        // because new dependencies could have brought
                        // in new SWC files with a defaults.css file.
                        List<VirtualFile> cssFiles = compilerConfig.getDefaultsCssFiles();
                        Set<String> cssFilesSet = new HashSet<String>();
                       
                        for (VirtualFile cssFile : cssFiles )
                        {
                            cssFilesSet.add(cssFile.getName());
                        }
                       
                        locateStyleDefaults(units, compilerConfig);
                       
                        cssFiles = compilerConfig.getDefaultsCssFiles();
                        Set<String> addedCssFilesSet = null;
                       
                        if (!cssFilesSet.isEmpty())
                        {
                            Set<String> secondCssFilesSet = new HashSet<String>();
                           
                            for (VirtualFile cssFile : cssFiles )
                            {
                                secondCssFilesSet.add(cssFile.getName());
                            }
                           
                            addedCssFilesSet = new HashSet<String>();
                            for (String cssName : secondCssFilesSet )
                            {
                                if (!cssFilesSet.contains(cssName))
                                {
                                    addedCssFilesSet.add(cssName);
                                }
                            }
                        }
                       
                        stylesContainer.loadDefaultStyles();
                        stylesContainer.validate(symbolTable, nameMappings, u.getStandardDefs(), compilerConfig.getThemeNames(), addedCssFilesSet);

                        List<CULinkable> linkables = new LinkedList<CULinkable>();

                        for (Iterator it2 = units.iterator(); it2.hasNext();)
                        {
                            linkables.add( new CULinkable( (CompilationUnit) it2.next() ) );
                        }

                        try
                        {
                            LinkState state = new LinkState(linkables, new HashSet(), configuration.getIncludes(), new HashSet<String>());

                            // C: generate style classes for components which we want to link in.
                            List<Source> styleSources = new ArrayList<Source>();
                            generatedSources = stylesContainer.processDependencies(styleSources, state.getDefNames(), resources,
                                                                    u.getSource().getRelativePath().replace('/', '.'),
                                                                    u.getSource().getShortName());

                            // Sweep through and remove any previous style sources.
                            Iterator<Source> iterator = sources.iterator();
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.