Examples of ISWCManager


Examples of org.apache.flex.swc.ISWCManager

    private SWFReader getSWFReader(Collection<ICompilerProblem> problems)
    {
       
        CacheStoreKeyBase cacheKey;
        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

Examples of org.apache.flex.swc.ISWCManager

        Set<FileID> swcs = LibraryPathManager.discoverSWCFilePaths(
                targetSettings.getIncludeLibraries().toArray(new File[0]));
       
        // For each library, get a compilation unit for every class in the
        // library.
        ISWCManager swcManager = project.getWorkspace().getSWCManager();
        Workspace w = project.getWorkspace();

        for (FileID swcPath : swcs)
        {
            File swcFile =swcPath.getFile();

            // 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

Examples of org.apache.flex.swc.ISWCManager

    }

    @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

Examples of org.apache.flex.swc.ISWCManager

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

Examples of org.apache.flex.swc.ISWCManager

    private Collection<ICompilationUnit> getCompilationUnitsForLibraries(
            final CompilerProject project,
            final Collection<String> swcFilePaths)
    {
        final List<ICompilationUnit> result = new ArrayList<ICompilationUnit>();
        final ISWCManager swcManager = project.getWorkspace().getSWCManager();
        int order = 0;
       
        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())
                {
View Full Code Here

Examples of org.apache.flex.swc.ISWCManager

        Set<FileID> swcs = LibraryPathManager.discoverSWCFilePaths(
                targetSettings.getIncludeLibraries().toArray(new File[0]));
       
        // 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 ||
View Full Code Here

Examples of org.apache.flex.swc.ISWCManager

     */
    private List<ICompilationUnit> computeUnitsToAdd(final Collection<String> swcFilePaths)
    {
        int order = 0;
        final List<ICompilationUnit> result = new LinkedList<ICompilationUnit>();
        final ISWCManager swcManager = flashProject.getWorkspace().getSWCManager();
        for (final String swcFilePath : swcFilePaths)
        {
            // it is possible for the SWC to not exist on disk, if this method
            // is being called as part of a SWC file file removal invalidation.
            File swcFile = new File(swcFilePath);
            final ISWC swc = swcManager.get(swcFile);
            computeUnitsToAdd(swc, order, result);
            order++;
        }

        return result;
View Full Code Here

Examples of org.apache.flex.swc.ISWCManager

     *
     * @return A list of {@link ISWC}'s on the library path.
     */
    protected ImmutableList<ISWC> getLibrarySWCs()
    {
        final ISWCManager swcManager = flashProject.getWorkspace().getSWCManager();
        final ImmutableList.Builder<ISWC> builder = new ImmutableList.Builder<ISWC>();
        for (final String libraryPath : libraryFilePaths.keySet())
        {
            final File swcFile = new File(libraryPath);
            if (swcFile.exists())
            {
                final ISWC swc = swcManager.get(swcFile);
                builder.add(swc); // ImmutableList throws exception on null element.
            }
        }

        return builder.build();
View Full Code Here

Examples of org.apache.flex.swc.ISWCManager

     * themselves. For example if a SWC has been deleted and no longer exists.
     * {@link DuplicateSourceFileProblem} problems.
     */
    void collectProblems(Collection<ICompilerProblem> problems)
    {
        final ISWCManager swcManager = flashProject.getWorkspace().getSWCManager();
        for (String swcPath : libraryFilePaths.keySet())
        {
            final File swcFile = new File(swcPath);
            ISWC swc = swcManager.get(swcFile);
            problems.addAll(swc.getProblems());
           
            for (ISWCLibrary library : swc.getLibraries())
            {
                final CacheStoreKeyBase key = SWFCache.createKey(swc, library.getPath());
                final ITagContainer tags = swcManager.getSWFCache().get(key);
                problems.addAll(tags.getProblems());
            }
        }
    }
View Full Code Here

Examples of org.apache.flex.swc.ISWCManager

     */
    private boolean codegenRSLsEntry(InstructionList info, Collection<ICompilerProblem> problemCollection,
            String entryLabel,
            List<RSLSettings> rslSettingsList)
    {
        ISWCManager swcManager = flexProject.getWorkspace().getSWCManager();
       
        info.addInstruction(ABCConstants.OP_pushstring, entryLabel);
       
        IResolvedQualifiersReference mxCoreRSLDataReference =
            ReferenceFactory.packageQualifiedReference(flexProject.getWorkspace(), IMXMLTypeConstants.RSLData);
        Name mxCoreRSLDataSlotName = mxCoreRSLDataReference.getMName();
        Object[] mxCoreRSLDataCtor = new Object[] { mxCoreRSLDataSlotName, 7 };
       
        // Add an RSLData instance to an array for the primary RSL in RSLSettings
        // plus one for every failover RSL.
        for (RSLSettings rslSettings : rslSettingsList)
        {
            int rslCount = 0;
            for (RSLAndPolicyFileURLPair urls : rslSettings.getRSLURLs())
            {
                info.addInstruction(ABCConstants.OP_findpropstrict, mxCoreRSLDataSlotName);               
                info.addInstruction(ABCConstants.OP_pushstring, urls.getRSLURL());
                info.addInstruction(ABCConstants.OP_pushstring, urls.getPolicyFileURL());
               
                ISWC swc = swcManager.get(new File(rslSettings.getLibraryFile().getPath()));
               
                boolean isSignedRSL = RSLSettings.isSignedRSL(urls.getRSLURL());
                ISWCDigest swcDigest = getSWCDigest(Iterables.getFirst(swc.getLibraries(), null),
                        isSignedRSL);

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.