Package org.apache.flex.compiler.css

Examples of org.apache.flex.compiler.css.ICSSDocument


            final ActivatedStyleSheets activatedStyleSheets,
            final Collection<ICompilerProblem> problems)
    {
        for (final String defaultsCSSPath : getTargetSettings().getDefaultsCSSFiles())
        {
            final ICSSDocument defaultsCSSModel = cssManager.getCSS(defaultsCSSPath);
            if (defaultsCSSModel == null)
                problems.add(new FileNotFoundProblem(defaultsCSSPath));
            else
                activatedStyleSheets.addDefaultCSS(defaultsCSSModel);
        }
View Full Code Here


        for (final ICompilationUnit compilationUnit : compilationUnits)
        {
            if (compilationUnit.getCompilationUnitType() == UnitType.SWC_UNIT)
            {
                final File swcFile = new File(compilationUnit.getAbsoluteFilename());
                final ICSSDocument defaultCSS = cssManager.getDefaultCSS(swcFile);
                if (defaultCSS != null)
                    result.put(defaultCSS, swcFile);
            }
        }
        return result;
View Full Code Here

    }

    @Override
    public void visitStyleBlock(IMXMLStyleNode node)
    {
        ICSSDocument css = node.getCSSDocument(errors);
        StringBuilder sb = new StringBuilder();
        ImmutableList<ICSSRule> rules = css.getRules();
        for (ICSSRule rule : rules)
        {
            sb.append(rule.toString());
            sb.append("\n\n");
        }
View Full Code Here

         
    return styleNode.getCSSDocument(problems);
  }
 
  protected List<ICSSProperty> getCSSProperties(String code) {
    ICSSDocument doc = getCSSNodeBase(code);
   
    ImmutableList<ICSSRule> rules = doc.getRules();
    List<ICSSProperty> properties = new ArrayList<ICSSProperty>();
    for (ICSSRule icssRule : rules) {
      properties.addAll( icssRule.getProperties() );
    }
    assertThat("properties", properties,  not( (List<ICSSProperty>) null) );
View Full Code Here

    private ArrayList<String> requires;
   
    public String getEncodedCSS(ICompilerProject project, final Collection<ICompilerProblem> problems)
    {
        final ICSSDocument css = synthesisNormalizedCSS();
        StringBuilder sb = new StringBuilder();
        requires = new ArrayList<String>();
        encodeCSS(css, sb, project, problems);
        sb.append("];\n");
        for (String r : requires)
View Full Code Here

        return sb.toString();       
    }
   
    public String emitCSS()
    {
        final ICSSDocument css = synthesisNormalizedCSS();
        StringBuilder sb = new StringBuilder();
        walkCSS(css, sb);
        return sb.toString();
    }
View Full Code Here

    }

    @Override
    public void visitStyleBlock(IMXMLStyleNode node)
    {
        ICSSDocument css = node.getCSSDocument(errors);
        StringBuilder sb = new StringBuilder();
        ImmutableList<ICSSRule> rules = css.getRules();
        for (ICSSRule rule : rules)
        {
            sb.append(rule.toString());
            sb.append("\n\n");
        }
View Full Code Here

      "<fx:Style/>"
    };
    IMXMLStyleNode node = getMXMLStyleNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
   
    ICSSDocument cssDoc = node.getCSSDocument(null);
    assertThat(cssDoc, is(CSSDocumentCache.EMPTY_CSS_DOCUMENT));
  }
View Full Code Here

      "<fx:Style></fx:Style>"
    };
    IMXMLStyleNode node = getMXMLStyleNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
   
    ICSSDocument cssDoc = node.getCSSDocument(null);
    assertThat(cssDoc, is(CSSDocumentCache.EMPTY_CSS_DOCUMENT));
  }
View Full Code Here

      "<fx:Style/> \t\r\n<fx:Style/>"
    };
    IMXMLStyleNode node = getMXMLStyleNode(code);
    assertThat("getChildCount", node.getChildCount(), is(0));
   
    ICSSDocument cssDoc = node.getCSSDocument(null);
    assertThat(cssDoc, is(CSSDocumentCache.EMPTY_CSS_DOCUMENT));
  }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.css.ICSSDocument

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.