Package flex2.tools.oem

Examples of flex2.tools.oem.ProgressMeter


          }
          else
          {
              if (verbose)
                System.out.println("new application");
              job = new AppJob(new Application(mainAppFile));
              apps.put(key, job);
          }
            job.app.setProgressMeter(progress);
             
            //compilations one at the time on the same project
View Full Code Here


  private static final long serialVersionUID = 1L;
 
  @Override
  public void init() throws ServletException {
    //make sure we have "application.home" set. it is set by an Application static block.
    new Application();
   
    log("MB STARTUP");
  }
View Full Code Here

                File tmpFile = File.createTempFile("mbcompiler", ".xml");
                BufferedWriter bw = new BufferedWriter(new FileWriter(tmpFile));
                bw.write(config);
                bw.close();
               
                Configuration conf = job.app.getDefaultConfiguration();
                conf.addConfiguration(tmpFile);
                job.app.setConfiguration(conf);
              }
             
              File outFile = new File(outPath);
              File outDir = new File(outFile.getParent());
View Full Code Here

    {
      List<Message> filtered = new ArrayList<Message>();
     
      for (int i = 0, length = messages.size(); i < length; i++)
      {
        Message m = messages.get(i);
        if (m != null && !Message.INFO.equals(m.getLevel()))
        {
          filtered.add(m);
        }
      }
     
View Full Code Here

    final ProgressHelper ph = new ProgressHelper();
   
    //we output 101 chars so we can track progress without sending actual data
    response.setContentLength(101);
   
    String log = CompileManager.inst().compile(xml, new ProgressMeter() {
     
      public void start() { }
     
      public void percentDone(int p) {
        ph.set(p);
View Full Code Here

                ThreadLocalToolkit.getBenchmark() != null)
        {
            ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("Start")), true);
        }

        ProgressMeter meter = ThreadLocalToolkit.getProgressMeter();

        if (meter != null)
        {
            meter.start();
        }

        List<CompilationUnit> units = new ArrayList<CompilationUnit>();
        DependencyGraph<CompilationUnit> igraph = new DependencyGraph<CompilationUnit>();
        DependencyGraph<Source> dgraph = null; // new DependencyGraph();

        boolean useFileSpec = false;

        // based on the starting source file, retrieve a list of dependent files.
        if (fileSpec != null)
        {
            sources.addAll(fileSpec.retrieveSources());
            useFileSpec = sources.size() > 0;
        }

        if (sourceList != null)
        {
            sources.addAll(sourceList.retrieveSources());
        }

        // C: This is here for SWC compilation.
        if (classes != null)
        {
            for (Source source : classes)
            {
                // source might have already been added if it's in the SourceList.
                if (!sources.contains(source))
                {
                    sources.add(source);
                }
            }

            useFileSpec = useFileSpec || classes.size() > 0;
        }

        // add the sources to the dependency graphs as vertices.
        addVerticesToGraphs(sources, igraph, dgraph);

        if (configuration.getBenchmarkCompilerDetails() > 0 &&
                ThreadLocalToolkit.getBenchmark() != null)
        {
            ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("addVerticesToGraphs")), true);
        }

        try
        {
            getCommonBuiltinClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetCommonBuiltInClassesTime")), true);
            }

            //    build unit list
            batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")));

            }

            // enterprise messaging classes referenced by the messaging config file
            getMessagingClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("getMessagingClasses")), true);
            }

            // unconditionally includes classes specified by --includes.
            getIncludeClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetIncludeClassesTime")), true);
            }

            // backward compatibility
            getIncludeResources(sources, igraph, dgraph, bundlePath, symbolTable, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetIncludeResourcesTime")), true);
            }

            // getMessagingClasses, and getIncludeClasses may produce errors. check them...
            if (ThreadLocalToolkit.errorCount() > 0)
            {
                throw new CompilerException();
            }

            if (forcedToStop()) return units;

            // compile additional sources before running prelink so that all metadata-fed lists
            // contributing to codegen (i.e. mixins) are complete
            batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);

            }

            if (forcedToStop()) return units;

            // PreLink

            int count = 0; // just in case something impossibly odd happens,
            if (preLink != null// don't wedge the compiler forever.
            {
                // run the prelink step (repeatedly until we've found all nested style dependencies...)
                boolean runPrelink = true;
                while (runPrelink && count++ < 1000)
                {
                    runPrelink = preLink.run(sources, units, fileSpec, sourceList, sourcePath, bundlePath, resources, symbolTable, swcContext, nameMappings, configuration);
                    if (!runPrelink)
                    {
                        // Add synthetic link-in units now that we've found all of our sources
                        preLink.postRun(sources, units, resources, symbolTable, swcContext, nameMappings, configuration);
                    }

                    if (configuration.getBenchmarkCompilerDetails() > 0 &&
                            ThreadLocalToolkit.getBenchmark() != null)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("PreLinkTime")), true);
                    }

                    // prelink also may produce errors
                    if (ThreadLocalToolkit.errorCount() > 0)
                    {
                        throw new CompilerException();
                    }

                    // prelink introduces more sources, so we compile again
                    batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

                    if (configuration.getBenchmarkCompilerDetails() > 0 &&
                            ThreadLocalToolkit.getBenchmark() != null)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);
                    }

                    if (forcedToStop()) return units;
                }
            }

            // loader classes, licensing classes, extra classes

            count = 0; // just in case something impossibly odd happens,
            while (++count < 1000) // don't wedge the compiler forever.
            {
                int numSources = sources.size();
                getExtraSources(sources, igraph, dgraph, sourceList, sourcePath, resources, bundlePath, symbolTable, swcContext,
                                configuration, licenseMap);

                if (configuration.getBenchmarkCompilerDetails() > 0 &&
                        ThreadLocalToolkit.getBenchmark() != null)
                {
                    ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetExtraSourcesTime")), true);
                }

                // getExtraSources may produce errors. check them...
                if (ThreadLocalToolkit.errorCount() > 0)
                {
                    throw new CompilerException();
                }

                // getExtraSources pulls in more classes, compile again
                batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

                if (configuration.getBenchmarkCompilerDetails() > 0 &&
                        ThreadLocalToolkit.getBenchmark() != null)
                {
                    ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);

                }

                if (sources.size() == numSources)
                {
                    break;
                }

                if (forcedToStop()) return units;
            }

            checkResourceBundles(sources, symbolTable);
            assert count < 1000;
        }
        finally
        {
            if (ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark(l10n.getLocalizedTextString(new OutputTime(sources.size())));
            }

            // must close swc file handles...
            swcContext.close();
            symbolTable.cleanClassTable();
            symbolTable.adjustProgress();

            if (meter != null)
            {
                meter.end();
            }
        }

        return units;
    }
View Full Code Here

        }

        if (percent > symbolTable.currentPercentage)
        {
            symbolTable.currentPercentage = percent;
            ProgressMeter meter = ThreadLocalToolkit.getProgressMeter();

            if (meter != null)
            {
                meter.percentDone(percent);
            }
        }
    }
View Full Code Here

                ThreadLocalToolkit.getBenchmark() != null)
        {
            ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("Start")), true);
        }

        ProgressMeter meter = ThreadLocalToolkit.getProgressMeter();

        if (meter != null)
        {
            meter.start();
        }

        List<CompilationUnit> units = new ArrayList<CompilationUnit>();
        DependencyGraph<CompilationUnit> igraph = new DependencyGraph<CompilationUnit>();
        DependencyGraph<Source> dgraph = null; // new DependencyGraph();

        boolean useFileSpec = false;

        // based on the starting source file, retrieve a list of dependent files.
        if (fileSpec != null)
        {
            sources.addAll(fileSpec.retrieveSources());
            useFileSpec = sources.size() > 0;
        }

        if (sourceList != null)
        {
            sources.addAll(sourceList.retrieveSources());
        }

        // C: This is here for SWC compilation.
        if (classes != null)
        {
            for (Source source : classes)
            {
                // source might have already been added if it's in the SourceList.
                if (!sources.contains(source))
                {
                    sources.add(source);
                }
            }

            useFileSpec = useFileSpec || classes.size() > 0;
        }

        // add the sources to the dependency graphs as vertices.
        addVerticesToGraphs(sources, igraph, dgraph);

        if (configuration.getBenchmarkCompilerDetails() > 0 &&
                ThreadLocalToolkit.getBenchmark() != null)
        {
            ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("addVerticesToGraphs")), true);
        }

        try
        {
            getCommonBuiltinClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetCommonBuiltInClassesTime")), true);
            }

            //    build unit list
            batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")));

            }

            // enterprise messaging classes referenced by the messaging config file
            getMessagingClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("getMessagingClasses")), true);
            }

            // unconditionally includes classes specified by --includes.
            getIncludeClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetIncludeClassesTime")), true);
            }

            // backward compatibility
            getIncludeResources(sources, igraph, dgraph, bundlePath, symbolTable, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetIncludeResourcesTime")), true);
            }

            // getMessagingClasses, and getIncludeClasses may produce errors. check them...
            if (ThreadLocalToolkit.errorCount() > 0)
            {
                throw new CompilerException();
            }

            if (forcedToStop()) return units;

            // compile additional sources before running prelink so that all metadata-fed lists
            // contributing to codegen (i.e. mixins) are complete
            batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);

            }

            if (forcedToStop()) return units;

            // PreLink

            int count = 0; // just in case something impossibly odd happens,
            if (preLink != null// don't wedge the compiler forever.
            {
                // run the prelink step (repeatedly until we've found all nested style dependencies...)
                boolean runPrelink = true;
                while (runPrelink && count++ < 1000)
                {
                    runPrelink = preLink.run(sources, units, fileSpec, sourceList, sourcePath, bundlePath, resources, symbolTable, swcContext, nameMappings, configuration);
                    if (!runPrelink)
                    {
                        // Add synthetic link-in units now that we've found all of our sources
                        preLink.postRun(sources, units, resources, symbolTable, swcContext, nameMappings, configuration);
                    }

                    if (configuration.getBenchmarkCompilerDetails() > 0 &&
                            ThreadLocalToolkit.getBenchmark() != null)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("PreLinkTime")), true);
                    }

                    // prelink also may produce errors
                    if (ThreadLocalToolkit.errorCount() > 0)
                    {
                        throw new CompilerException();
                    }

                    // prelink introduces more sources, so we compile again
                    batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

                    if (configuration.getBenchmarkCompilerDetails() > 0 &&
                            ThreadLocalToolkit.getBenchmark() != null)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);
                    }

                    if (forcedToStop()) return units;
                }
            }

            // loader classes, licensing classes, extra classes

            count = 0; // just in case something impossibly odd happens,
            while (++count < 1000) // don't wedge the compiler forever.
            {
                int numSources = sources.size();
                getExtraSources(sources, igraph, dgraph, sourceList, sourcePath, resources, bundlePath, symbolTable, swcContext,
                                configuration, licenseMap);

                if (configuration.getBenchmarkCompilerDetails() > 0 &&
                        ThreadLocalToolkit.getBenchmark() != null)
                {
                    ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetExtraSourcesTime")), true);
                }

                // getExtraSources may produce errors. check them...
                if (ThreadLocalToolkit.errorCount() > 0)
                {
                    throw new CompilerException();
                }

                // getExtraSources pulls in more classes, compile again
                batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

                if (configuration.getBenchmarkCompilerDetails() > 0 &&
                        ThreadLocalToolkit.getBenchmark() != null)
                {
                    ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);

                }

                if (sources.size() == numSources)
                {
                    break;
                }

                if (forcedToStop()) return units;
            }

            checkResourceBundles(sources, symbolTable);
            assert count < 1000;
        }
        finally
        {
            if (ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark(l10n.getLocalizedTextString(new OutputTime(sources.size())));
            }

            // must close swc file handles...
            swcContext.close();
            symbolTable.cleanClassTable();
            symbolTable.adjustProgress();

            if (meter != null)
            {
                meter.end();
            }
        }

        return units;
    }
View Full Code Here

        }

        if (percent > symbolTable.currentPercentage)
        {
            symbolTable.currentPercentage = percent;
            ProgressMeter meter = ThreadLocalToolkit.getProgressMeter();

            if (meter != null)
            {
                meter.percentDone(percent);
            }
        }
    }
View Full Code Here

                ThreadLocalToolkit.getBenchmark() != null)
        {
            ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("Start")), true);
        }

        ProgressMeter meter = ThreadLocalToolkit.getProgressMeter();

        if (meter != null)
        {
            meter.start();
        }

        List<CompilationUnit> units = new ArrayList<CompilationUnit>();
        DependencyGraph<CompilationUnit> igraph = new DependencyGraph<CompilationUnit>();
        DependencyGraph<Source> dgraph = null; // new DependencyGraph();

        boolean useFileSpec = false;

        // based on the starting source file, retrieve a list of dependent files.
        if (fileSpec != null)
        {
            sources.addAll(fileSpec.retrieveSources());
            useFileSpec = sources.size() > 0;
        }

        if (sourceList != null)
        {
            sources.addAll(sourceList.retrieveSources());
        }

        // C: This is here for SWC compilation.
        if (classes != null)
        {
            for (Source source : classes)
            {
                // source might have already been added if it's in the SourceList.
                if (!sources.contains(source))
                {
                    sources.add(source);
                }
            }

            useFileSpec = useFileSpec || classes.size() > 0;
        }

        // add the sources to the dependency graphs as vertices.
        addVerticesToGraphs(sources, igraph, dgraph);

        if (configuration.getBenchmarkCompilerDetails() > 0 &&
                ThreadLocalToolkit.getBenchmark() != null)
        {
            ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("addVerticesToGraphs")), true);
        }

        try
        {
            getCommonBuiltinClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetCommonBuiltInClassesTime")), true);
            }

            //    build unit list
            batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")));

            }

            // enterprise messaging classes referenced by the messaging config file
            getMessagingClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("getMessagingClasses")), true);
            }

            // unconditionally includes classes specified by --includes.
            getIncludeClasses(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetIncludeClassesTime")), true);
            }

            // backward compatibility
            getIncludeResources(sources, igraph, dgraph, bundlePath, symbolTable, swcContext, configuration);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetIncludeResourcesTime")), true);
            }

            // getMessagingClasses, and getIncludeClasses may produce errors. check them...
            if (ThreadLocalToolkit.errorCount() > 0)
            {
                throw new CompilerException();
            }

            if (forcedToStop()) return units;

            // compile additional sources before running prelink so that all metadata-fed lists
            // contributing to codegen (i.e. mixins) are complete
            batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

            if (configuration.getBenchmarkCompilerDetails() > 0 &&
                    ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);

            }

            if (forcedToStop()) return units;

            // PreLink

            int count = 0; // just in case something impossibly odd happens,
            if (preLink != null// don't wedge the compiler forever.
            {
                // run the prelink step (repeatedly until we've found all nested style dependencies...)
                boolean runPrelink = true;
                while (runPrelink && count++ < 1000)
                {
                    runPrelink = preLink.run(sources, units, fileSpec, sourceList, sourcePath, bundlePath, resources, symbolTable, swcContext, nameMappings, configuration);
                    if (!runPrelink)
                    {
                        // Add synthetic link-in units now that we've found all of our sources
                        preLink.postRun(sources, units, resources, symbolTable, swcContext, nameMappings, configuration);
                    }

                    if (configuration.getBenchmarkCompilerDetails() > 0 &&
                            ThreadLocalToolkit.getBenchmark() != null)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("PreLinkTime")), true);
                    }

                    // prelink also may produce errors
                    if (ThreadLocalToolkit.errorCount() > 0)
                    {
                        throw new CompilerException();
                    }

                    // prelink introduces more sources, so we compile again
                    batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

                    if (configuration.getBenchmarkCompilerDetails() > 0 &&
                            ThreadLocalToolkit.getBenchmark() != null)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);
                    }

                    if (forcedToStop()) return units;
                }
            }

            // loader classes, licensing classes, extra classes

            count = 0; // just in case something impossibly odd happens,
            while (++count < 1000) // don't wedge the compiler forever.
            {
                int numSources = sources.size();
                getExtraSources(sources, igraph, dgraph, sourceList, sourcePath, resources, bundlePath, symbolTable, swcContext,
                                configuration, licenseMap);

                if (configuration.getBenchmarkCompilerDetails() > 0 &&
                        ThreadLocalToolkit.getBenchmark() != null)
                {
                    ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("GetExtraSourcesTime")), true);
                }

                // getExtraSources may produce errors. check them...
                if (ThreadLocalToolkit.errorCount() > 0)
                {
                    throw new CompilerException();
                }

                // getExtraSources pulls in more classes, compile again
                batch(sources, units, igraph, dgraph, symbolTable, compilers, sourceList, sourcePath, resources, swcContext, configuration, useFileSpec);

                if (configuration.getBenchmarkCompilerDetails() > 0 &&
                        ThreadLocalToolkit.getBenchmark() != null)
                {
                    ThreadLocalToolkit.getBenchmark().benchmark2(l10n.getLocalizedTextString(new CompileTime("batch")), true);

                }

                if (sources.size() == numSources)
                {
                    break;
                }

                if (forcedToStop()) return units;
            }

            checkResourceBundles(sources, symbolTable);
            assert count < 1000;
        }
        finally
        {
            if (ThreadLocalToolkit.getBenchmark() != null)
            {
                ThreadLocalToolkit.getBenchmark().benchmark(l10n.getLocalizedTextString(new OutputTime(sources.size())));
            }

            // must close swc file handles...
            swcContext.close();
            symbolTable.cleanClassTable();
            symbolTable.adjustProgress();

            if (meter != null)
            {
                meter.end();
            }
        }

        return units;
    }
View Full Code Here

TOP

Related Classes of flex2.tools.oem.ProgressMeter

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.