Search in sources :

Example 1 with AssetCounter

use of com.intellij.flex.uiDesigner.AssetCounter in project intellij-plugins by JetBrains.

the class AbcBlankMaker method fillAssetClassPoolGenerator.

private static void fillAssetClassPoolGenerator() throws IOException {
    ByteArrayOutputStreamEx out = new ByteArrayOutputStreamEx(1024);
    ClassPoolGenerator.generate(ClassPoolGenerator.Kind.IMAGE, 3, new AssetCounter(), out);
    FileUtil.writeToFile(new File("/Users/develar/classPool.swf"), out.toByteArray());
}
Also used : AssetCounter(com.intellij.flex.uiDesigner.AssetCounter) ByteArrayOutputStreamEx(com.intellij.flex.uiDesigner.io.ByteArrayOutputStreamEx) File(java.io.File)

Example 2 with AssetCounter

use of com.intellij.flex.uiDesigner.AssetCounter in project intellij-plugins by JetBrains.

the class LibraryStyleInfoCollector method process.

public void process(Library library, boolean isNew) {
    if (!isNew) {
        assetCounter.append(library.assetCounter);
        return;
    }
    try {
        library.inheritingStyles = collectInherited(library.getFile());
    } finally {
        bytes.reset();
    }
    VirtualFile defaultsCssVirtualFile = library.getDefaultsCssFile();
    if (defaultsCssVirtualFile != null) {
        AssetCounter libAssetCounter = new AssetCounter();
        byte[] data = new CssWriter(stringWriter, problemsHolder, libAssetCounter).write(defaultsCssVirtualFile, module);
        if (data != null) {
            library.defaultsStyle = data;
            library.assetCounter = libAssetCounter;
            assetCounter.append(libAssetCounter);
        }
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) AssetCounter(com.intellij.flex.uiDesigner.AssetCounter) CssWriter(com.intellij.flex.uiDesigner.css.CssWriter)

Aggregations

AssetCounter (com.intellij.flex.uiDesigner.AssetCounter)2 CssWriter (com.intellij.flex.uiDesigner.css.CssWriter)1 ByteArrayOutputStreamEx (com.intellij.flex.uiDesigner.io.ByteArrayOutputStreamEx)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 File (java.io.File)1