Package macromedia.asc.util

Examples of macromedia.asc.util.ContextStatics


      }
    }

    if (!(do_help || filespecFound))
    {
            Context cx = new Context(new ContextStatics());

      System.err.println(cx.errorString(ErrorConstants.kError_MissingFilespec));
      System.exit(1);
    }
    else if (do_help)
View Full Code Here


    else
    {
      File f = new File(filename.trim());
      if (!f.exists())
      {
                Context cx = new Context(new ContextStatics());
        StringBuilder error_msg = new StringBuilder();
        Context.replaceStringArg(error_msg, cx
            .errorString(ErrorConstants.kError_UnableToOpenFile),
            0, filename);
        System.err.println(error_msg.toString());
View Full Code Here

      }
    }

    if (!(do_help || filespecFound))
    {
            Context cx = new Context(new ContextStatics());

      System.err.println(cx.errorString(ErrorConstants.kError_MissingFilespec));
      System.exit(1);
    }
    else if (do_help)
View Full Code Here

    else
    {
      File f = new File(filename.trim());
      if (!f.exists())
      {
                Context cx = new Context(new ContextStatics());
        StringBuilder error_msg = new StringBuilder();
        Context.replaceStringArg(error_msg, cx
            .errorString(ErrorConstants.kError_UnableToOpenFile),
            0, filename);
        System.err.println(error_msg.toString());
View Full Code Here

        }

        // Setup SWC cache
        if (libraryCache != null)
        {
            ContextStatics contextStatics = libraryCache.getContextStatics();

            if (contextStatics != null)
            {
                // Clear out ASC's userDefined, so definitions from a
                // previous compilation don't spill over into this one.
View Full Code Here

            boolean relink = false;

            if (applicationCache != null)
            {
                ContextStatics contextStatics = applicationCache.getContextStatics();
                data.perCompileData = contextStatics;

                if (applicationCache.isConsistent(tempOEMConfiguration.configuration))
                {
                    relink = (loadCachedSources(data.resources.sources()) ||
View Full Code Here

        }

        // Setup SWC cache
        if (libraryCache != null)
        {
            ContextStatics contextStatics = libraryCache.getContextStatics();

            if (contextStatics != null)
            {
                // Clear out ASC's userDefined, so definitions from a
                // previous compilation don't spill over into this one.
                contextStatics.userDefined.clear();
                data.swcCache = libraryCache.getSwcCache();
                data.perCompileData = contextStatics;
            }
        }

        if (data.swcCache == null)
        {
            data.swcCache = new SwcCache();
        }
       
        // load SWCs
        CompilerSwcContext swcContext = new CompilerSwcContext(true);
        try
        {
            swcContext.load( compilerConfig.getLibraryPath(),
                             flex2.compiler.common.Configuration.getAllExcludedLibraries(compilerConfig, localOEMConfiguration.configuration),
                             compilerConfig.getThemeFiles(),
                             compilerConfig.getIncludeLibraries(),
                             mappings,
                             I18nUtils.getTranslationFormat(compilerConfig),
                             data.swcCache );
        }
        catch (SwcException ex)
        {
            clean(false /* cleanData */,
                  false /* cleanCache */,
                  false /* cleanOutput */,
                  true /* cleanConfig */,
                  false /* cleanMessages */,
                  false /* cleanThreadLocals */);
            return FAIL;
        }

        // save the generated swcCache if the class has a libraryCache.
        if (libraryCache != null)
        {
            libraryCache.setSwcCache(data.swcCache);
        }

        data.includes = new HashSet<String>(swcContext.getIncludes());
        data.excludes = new HashSet<String>(swcContext.getExterns());
        localOEMConfiguration.configuration.addExterns( swcContext.getExterns() );
        localOEMConfiguration.configuration.addIncludes( swcContext.getIncludes() );
        localOEMConfiguration.configuration.getCompilerConfiguration().addThemeCssFiles( swcContext.getThemeStyleSheets() );

        data.cmdChecksum = localOEMConfiguration.cfgbuf.checksum_ts(); // OEMUtil.calculateChecksum(data, swcContext, c);
        data.linkChecksum = localOEMConfiguration.cfgbuf.link_checksum_ts();
        data.swcChecksum = swcContext.checksum();
        int[] checksums = new int[] { 0, data.cmdChecksum, data.linkChecksum, data.swcChecksum };
        boolean relink = false;

        // C: must do loadCompilationUnits() after checksum calculation...
        if (!fullRecompile)
        {
            if (!loadCompilationUnits(localOEMConfiguration, swcContext, checksums))
            {
                clean(true /* cleanData */,
                      false /* cleanCache */,
                      false /* cleanOutput */,
                      true /* cleanConfig */,
                      false /* cleanMessages */,
                      false /* cleanThreadLocals */);
                return FAIL;
            }

            data.checksum = checksums[0];
            if (data.units != null &&
                data.units.size() > 0 &&
                OEMUtil.isRecompilationNeeded(data, swcContext, localOEMConfiguration))
            {
                if (!setupSourceContainers(localOEMConfiguration))
                {
                    clean(true /* cleanData */,
                          false /* cleanCache */,
                          false /* cleanOutput */,
                          true /* cleanConfig */,
                          false /* cleanMessages */,
                          false /* cleanThreadLocals */);
                    return FAIL;
                }
            }

            if (applicationCache != null)
            {
                ContextStatics contextStatics = applicationCache.getContextStatics();

                if (contextStatics != null)
                {
                    // Clear out ASC's userDefined, so definitions
                    // from a previous compilation don't spill over
View Full Code Here

        open(tag);
        if (tag.code == TagValues.stagDoABC2)
          out.print( " name='" + tag.name + "'");
        end();
       
        ContextStatics contextStatics = new ContextStatics();
        contextStatics.use_static_semantics = true;
        contextStatics.dialect = 9;
       
        assert swfVersion != null : "header should have been parsed already, but wasn't";
        contextStatics.setAbcVersion(ContextStatics.getTargetAVM(swfVersion));
        contextStatics.use_namespaces.addAll(ContextStatics.getRequiredUseNamespaces(swfVersion));
       
        Context context = new Context(contextStatics);
        context.setHandler(new CompilerHandler());
        AbcParser abcParser = new AbcParser(context, tag.abc);
View Full Code Here

        open(tag);
        if (tag.code == TagValues.stagDoABC2)
          out.print( " name='" + tag.name + "'");
        end();
       
        ContextStatics contextStatics = new ContextStatics();
        contextStatics.use_static_semantics = true;
        contextStatics.dialect = 9;
       
        assert swfVersion != null : "header should have been parsed already, but wasn't";
        contextStatics.setAbcVersion(ContextStatics.getTargetAVM(swfVersion));
        contextStatics.use_namespaces.addAll(ContextStatics.getRequiredUseNamespaces(swfVersion));
       
        Context context = new Context(contextStatics);
        context.setHandler(new CompilerHandler());
        AbcParser abcParser = new AbcParser(context, tag.abc);
View Full Code Here

     * where an existing ContextStatics shouldn't be poluted.
     * FlashBuilder entrypoint.
     */
  public SymbolTable(Configuration configuration)
  {
        this(configuration, new ContextStatics());
  }
View Full Code Here

TOP

Related Classes of macromedia.asc.util.ContextStatics

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.