Examples of Swc


Examples of flex2.compiler.swc.Swc

                        Source dependent = symbolTable.findSourceByQName((QName) name);

                        if (dependent.isSwcScriptOwner())
                        {
                            SwcScript swcScript = (SwcScript) dependent.getOwner();
                            Swc swc = swcScript.getLibrary().getSwc();
                       
                            // Make sure each dependency's minimum
                            // supported version is less than or equal to
                            // the compatibility version.
                            if (compatibilityVersion < swc.getVersions().getMinimumVersion())
                            {
                                DependencyNotCompatible message =
                                    new DependencyNotCompatible(swcScript.getName().replace('/', '.'),
                                                                swc.getLocation(),
                                                                swc.getVersions().getMinimumVersionString(),
                                                                compilerConfiguration.getCompatibilityVersionString());
                                ThreadLocalToolkit.log(message, u.getSource());
                            }
                        }
                    }
View Full Code Here

Examples of flex2.compiler.swc.Swc

            Source source = compilationUnit.getSource();

            if (source.isSwcScriptOwner())
            {
                SwcScript swcScript = (SwcScript) source.getOwner();
                Swc swc = swcScript.getLibrary().getSwc();
                VirtualFile defaultsCssFile = null;

                if (versionDefaultsCssFileName != null)
                {
                    defaultsCssFile = swc.getFile(versionDefaultsCssFileName);
                }

                if (defaultsCssFile == null)
                {
                    defaultsCssFile = swc.getFile(DEFAULTS_CSS);
                }

                if (defaultsCssFile != null)
                {
                    defaultsCssFiles.add(defaultsCssFile);
View Full Code Here

Examples of flex2.compiler.swc.Swc

                    info.getPolicyFileUrls().get(i) +
                    "\",\n");
           
            // get the swc for current rsl
            String swcPath = info.getSwcVirtualFile().getName();
            Swc swc = swcContext.getSwc(swcPath);

            // write digest for each rsl in the list
            boolean secureRsls = configuration.getVerifyDigests();
            Boolean isSigned = (Boolean)info.getSignedFlags().get(i);
            Digest digest = swc.getDigest(Swc.LIBRARY_SWF,
                    Digest.SHA_256,
                    isSigned.booleanValue());

            if (digest == null || !digest.hasDigest())
            {
                // if the digest is not available then throw an exception,
                // "No digest found in catalog.xml. Either compile the application with
                // the -verify-digests=false or compile the library with
                // -create-digest=true"
                if (isSigned.booleanValue()) {
                    ThreadLocalToolkit.log(new MissingSignedLibraryDigest(swc.getLocation()));
                }
                else {
                    ThreadLocalToolkit.log(new MissingUnsignedLibraryDigest(swc.getLocation()));
                }
                return;
            }
           
            buf.append("\"" + digest.getValue() + "\",\n");
View Full Code Here

Examples of flex2.compiler.swc.Swc

                    Source dependent = symbolTable.findSourceByQName((QName) name);

                    if ((dependent != null) && dependent.isSwcScriptOwner())
                    {
                        SwcScript swcScript = (SwcScript) dependent.getOwner();
                        Swc swc = swcScript.getLibrary().getSwc();
                       
                        // Make sure each dependency's minimum
                        // supported version is less than or equal to
                        // the compatibility version.
                        if (highestMinimumSupportedVersion < swc.getVersions().getMinimumVersion() &&
                            configuration.getCompilerConfiguration().enableSwcVersionFiltering())
                        {
                            highestMinimumSupportedVersion = swc.getVersions().getMinimumVersion();

                            if (isMinimumSupportedVersionConfigured &&
                                configuration.getMinimumSupportedVersion() < highestMinimumSupportedVersion)
                            {
                                HigherMinimumSupportedVersionRequired message =
                                    new HigherMinimumSupportedVersionRequired(swc.getLocation(),
                                                                              swc.getVersions().getMinimumVersionString());
                                ThreadLocalToolkit.log(message, u.getSource());
                            }
                        }
                    }
                }
            }

            // Warn about linked in dependent SWC's, which have style
            // defaults.  Linking in dependent SWC's pulls in
            // definitions without their associated style defaults and
            // their dependencies.  This can lead to missing skins at
            // runtime for applications, which compile against the
            // output SWC.  Merging the style defaults isn't enough,
            // because styles can bring in additional dependencies, so
            // in order to get a complete dependency set, we would
            // have to compile the style defaults and our current
            // design requires deferring that until application
            // compile time.  Therefore the best option is to
            // recommend that the user put the dependent SWC in the
            // external-library-path of the output SWC compilation and
            // in the library-path of downstream application
            // compilations.
            Source source = u.getSource();

            if (source.isSwcScriptOwner() &&
                !PreLink.isCompilationUnitExternal(u, externs) &&
                !source.isInternal() && !hidePotentialMissingSkinsWarning)
            {
                SwcScript swcScript = (SwcScript) source.getOwner();
                Swc swc = swcScript.getLibrary().getSwc();
                String location = swc.getLocation();

                if (!processedSwcs.contains(location))
                {
                    processedSwcs.add(location);
                    boolean foundDefaultsCss = false;

                    for (VirtualFile catalogFile : swc.getCatalogFiles().values())
                    {
                        String catalogFileName = catalogFile.getName();
                        int dollarSignIndex = catalogFileName.indexOf("$");

                        if ((dollarSignIndex != -1) &&
                            catalogFileName.startsWith(DEFAULTS, dollarSignIndex + 1) &&
                            catalogFileName.endsWith(DOT_CSS))
                        {
                            foundDefaultsCss = true;
                        }
                    }

                    if (foundDefaultsCss)
                    {
                        PotentialForMissingSkins message = new PotentialForMissingSkins(swc.getLocation());
                        ThreadLocalToolkit.log(message);
                    }
                }                       
            }
        }
View Full Code Here

Examples of flex2.compiler.swc.Swc

              if (swcs.length != 1)
              {
                throw new IllegalStateException("expecting one swc file, found " + swcs.length); //$NON-NLS-1$
              }
             
              Swc swc = swcs[0];
              swc.setDigest(Swc.LIBRARY_SWF, digest);
             
            // export SWC
              cache.export(swc);

              //confirmation message
              if (ThreadLocalToolkit.errorCount() == 0)
              {
                ThreadLocalToolkit.log(new OutputMessage(swc.getLocation()));
              }

          }
          finally
          {
View Full Code Here

Examples of flex2.compiler.swc.Swc

        inheritanceDependencyType.add(SwcDependencySet.INHERITANCE);

        // get the inheritance dependencies of all source swcs
        for (String sourceSwc : sourceSwcs)
        {
            Swc swc = swcContext.getSwc(sourceSwc);
            inheritanceDependencies.addAll(
                    getSwcDependencies(swc, inheritanceDependencyType));
        }

        if (inheritanceDependencies.isEmpty())
View Full Code Here

Examples of flex2.compiler.swc.Swc

                        Source dependent = symbolTable.findSourceByQName((QName) name);

                        if (dependent.isSwcScriptOwner())
                        {
                            SwcScript swcScript = (SwcScript) dependent.getOwner();
                            Swc swc = swcScript.getLibrary().getSwc();
                       
                            // Make sure each dependency's minimum
                            // supported version is less than or equal to
                            // the compatibility version.
                            if (compatibilityVersion < swc.getVersions().getMinimumVersion())
                            {
                                DependencyNotCompatible message =
                                    new DependencyNotCompatible(swcScript.getName().replace('/', '.'),
                                                                swc.getLocation(),
                                                                swc.getVersions().getMinimumVersionString(),
                                                                compilerConfiguration.getCompatibilityVersionString());
                                ThreadLocalToolkit.log(message, u.getSource());
                            }
                        }
                    }
View Full Code Here

Examples of flex2.compiler.swc.Swc

            Source source = compilationUnit.getSource();

            if (source.isSwcScriptOwner())
            {
                SwcScript swcScript = (SwcScript) source.getOwner();
                Swc swc = swcScript.getLibrary().getSwc();
                VirtualFile defaultsCssFile = null;

                if (versionDefaultsCssFileName != null)
                {
                    defaultsCssFile = swc.getFile(versionDefaultsCssFileName);
                }

                if (defaultsCssFile == null)
                {
                    defaultsCssFile = swc.getFile(DEFAULTS_CSS);
                }

                if (defaultsCssFile != null)
                {
                    defaultsCssFiles.add(defaultsCssFile);
View Full Code Here

Examples of flex2.compiler.swc.Swc

                    info.getPolicyFileUrls().get(i) +
                    "\",\n");
           
            // get the swc for current rsl
            String swcPath = info.getSwcVirtualFile().getName();
            Swc swc = swcContext.getSwc(swcPath);

            // write digest for each rsl in the list
            boolean secureRsls = configuration.getVerifyDigests();
            Boolean isSigned = (Boolean)info.getSignedFlags().get(i);
            Digest digest = swc.getDigest(Swc.LIBRARY_SWF,
                    Digest.SHA_256,
                    isSigned.booleanValue());

            if (digest == null || !digest.hasDigest())
            {
                // if the digest is not available then throw an exception,
                // "No digest found in catalog.xml. Either compile the application with
                // the -verify-digests=false or compile the library with
                // -create-digest=true"
                if (isSigned.booleanValue()) {
                    ThreadLocalToolkit.log(new MissingSignedLibraryDigest(swc.getLocation()));
                }
                else {
                    ThreadLocalToolkit.log(new MissingUnsignedLibraryDigest(swc.getLocation()));
                }
                return;
            }
           
            buf.append("\"" + digest.getValue() + "\",\n");
View Full Code Here

Examples of org.apache.flex.swc.SWC

    private static final String LIBRARY_SWF = "library.swf";

    public SWCTarget(final FlexProject project, ITargetSettings targetSettings, ITargetProgressMonitor progressMonitor)
    {
        super(project, targetSettings, progressMonitor);
        swc = new SWC(targetSettings.getOutput());
        flexProject = project;
    }
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.