@Override
public Collection<ICSSDocument> getCSSFromThemes(final Collection<ICompilerProblem> problems)
{
final ImmutableList.Builder<ICSSDocument> builder = new ImmutableList.Builder<ICSSDocument>();
final ISWCManager swcManager = flexProject.getWorkspace().getSWCManager();
final CSSDocumentCache cssCache = swcManager.getCSSDocumentCache();
for (final IFileSpecification themeFile : flexProject.getThemeFiles())
{
try
{
final ICSSDocument css;
final String extension = FilenameUtils.getExtension(themeFile.getPath());
if ("swc".equalsIgnoreCase(extension))
{
final ISWC swc = swcManager.get(new File(themeFile.getPath()));
css = cssCache.getDefaultsCSS(
swc,
flexProject.getCompatibilityVersion());
}
else if ("css".equalsIgnoreCase(extension))
{
final CacheStoreKeyBase key = CSSDocumentCache.createKey(themeFile.getPath());
css = cssCache.get(key);
}
else
{
continue;
}