Package org.apache.flex.swc

Examples of org.apache.flex.swc.ISWC


        ISWCManager swcManager = workspace.getSWCManager();
        if (super.swcSource == null)
            cacheKey = SWFCache.createKey(source);
        else
        {
            final ISWC swc = swcManager.get(new File(super.swcSource.getContainingSWCPath()));
            cacheKey = SWFCache.createKey(swc, source);
        }
        SWFCache swfCache = workspace.getSWCManager().getSWFCache();
        SWFReader swfReader = (SWFReader)swfCache.get(cacheKey);
        return swfReader;
View Full Code Here


            // If the SWC does not exist on disk, just ignore it for now, and a
            // problem will be created later on during the LibraryPathManager.collectionProblems() call.
            if (!swcFile.exists())
                continue;

            ISWC swc = swcManager.get(swcFile);
            for (ISWCLibrary library : swc.getLibraries())
            {
                for (ISWCScript script : library.getScripts())
                {
                    for (String def : script.getDefinitions())
                    {
View Full Code Here

        // For each library, get a compilation unit for every class in the
        // library.
        ISWCManager swcManager = project.getWorkspace().getSWCManager();
        for (FileID swcPath : swcs)
        {
            ISWC swc = swcManager.get(swcPath.getFile());
            Map<String, ISWCFileEntry> swcFiles = swc.getFiles();
            for (Map.Entry<String, ISWCFileEntry> file : swcFiles.entrySet())
            {
                ISWCFileEntry currentFileEntry = files.get(file.getKey());
                if (currentFileEntry == null ||
                   (file.getValue().getLastModified() > currentFileEntry.getLastModified()))
View Full Code Here

                ICompilationUnit cu = project.getScope().getCompilationUnitForDefinition(classDefinition);
                IBinaryFileSpecification fileSpec = null;
                if (cu.getCompilationUnitType() == UnitType.SWC_UNIT)
                {
                    ISWC swc = project.getWorkspace().getSWCManager().get(new File(cu.getAbsoluteFilename()));
                    ISWCFileEntry swcFileEntry = swc.getFile(key);
                    fileSpec = new SWCFileSpecification(key, swcFileEntry);
                }
                else
                {
                    String sourcePath = classDefinition.getSourcePath();
View Full Code Here

    @Override
    public ICSSDocument getDefaultCSS(final File swcFile)
    {
        final ISWCManager swcManager = flexProject.getWorkspace().getSWCManager();
        final CSSDocumentCache cache = swcManager.getCSSDocumentCache();
        final ISWC swc = swcManager.get(swcFile);
        return cache.getDefaultsCSS(swc, flexProject.getCompatibilityVersion());
    }
View Full Code Here

            {
                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))
View Full Code Here

       
        swcTarget = project.createSWCTarget(targetSettings, null);
        target = (SWFTarget)swcTarget.getLibrarySWFTarget();

        Collection<ICompilerProblem> swcProblems = new ArrayList<ICompilerProblem>();
        final ISWC swc = swcTarget.build(swcProblems);

        problems.addAll(swcProblems);

        // Don't create a SWC if there are errors unless a
        // developer requested otherwise.
View Full Code Here

        for (final String swcFilePath : swcFilePaths)
        {
            if (!swcFilePath.toLowerCase().endsWith(".swc"))
                throw new RuntimeException("You can only import SWC libraries.");

            final ISWC swc = swcManager.get(new File(swcFilePath));

            for (final ISWCLibrary library : swc.getLibraries())
            {
                for (final ISWCScript script : library.getScripts())
                {
                    // Multiple definition in a script share the same compilation unit
                    // with the same ABC byte code block.
View Full Code Here

        // if compatibility-version is not set then we won't be doing any filtering.
        if (flexProject.getCompatibilityVersion() == null)
            return false;
       
        int compatibilityVersion = flexProject.getCompatibilityVersion();
        ISWC swc = flexProject.getWorkspace().getSWCManager().get(new File(swcPath));
        if (compatibilityVersion < swc.getVersion().getFlexMinSupportedVersionInt())
        {
            return true;
        }
       
        return false;
View Full Code Here

        for (ICompilationUnit dependency : dependencies)
        {
            if (dependency.getCompilationUnitType() != UnitType.SWC_UNIT)
                continue;

            ISWC swc = flexProject.getWorkspace().getSWCManager().get(
                    new File(dependency.getAbsoluteFilename()));
            int flexMinSupportedVersion = swc.getVersion().getFlexMinSupportedVersionInt();
            if (compatibilityVersion.intValue() < flexMinSupportedVersion)
            {
                problems.add(new DependencyNotCompatibleProblem(dependency.getQualifiedNames().get(0),
                              dependency.getAbsoluteFilename(),
                              swc.getVersion().getFlexMinSupportedVersion(),
                              flexProject.getCompatibilityVersionString()));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.swc.ISWC

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.