Package flex2.tools

Examples of flex2.tools.CompcConfiguration


        standardDefs.set(defs);
    }

    public static StandardDefs getStandardDefs()
    {
        StandardDefs defs = standardDefs.get();
        if (defs == null)
        {
            defs = StandardDefs.getStandardDefs("halo");
            setStandardDefs(defs);
        }
View Full Code Here


        output = null;
        directory = null;
        mimeMappings = new MimeMappings();
        meter = null;
        resolver = null;
        cc = new CompilerControl();

        //data = null;
        cacheName = null;
        configurationReport = null;
        messages = new ArrayList<Message>();
View Full Code Here

        logger = null;
        output = null;
        mimeMappings = new MimeMappings();
        meter = null;
        resolver = null;
        cc = new CompilerControl();
        //isGeneratedTargetFile = false;

        //data = null;
        cacheName = null;
        configurationReport = null;
View Full Code Here

                        level = Message.ERROR;
                    else if (cps.equals(CompilerProblemSeverity.WARNING))
                        level = Message.WARNING;
                    else
                        break; // skip if IGNORE?
                    CompilerMessage msg = new CompilerMessage(level,
                                                    prob.getSourcePath(),
                                                    prob.getLine() + 1,
                                                    prob.getColumn());
                    try
                    {
                        String errText = (String) aClass.getField("DESCRIPTION").get(aClass);
                        while (errText.contains("${"))
                        {
                            int start = errText.indexOf("${");
                            int end = errText.indexOf("}", start);
                            String token = errText.substring(start + 2, end);
                            String value = (String) aClass.getField(token).get(prob);
                            token = "${" + token + "}";
                            errText = errText.replace(token, value);
                        }
                        msg.setMessage(errText);
                    }
                    catch (IllegalArgumentException e1)
                    {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
View Full Code Here

                        level = Message.ERROR;
                    else if (cps.equals(CompilerProblemSeverity.WARNING))
                        level = Message.WARNING;
                    else
                        break; // skip if IGNORE?
                    CompilerMessage msg = new CompilerMessage(level,
                                                    prob.getSourcePath(),
                                                    prob.getLine() + 1,
                                                    prob.getColumn());
                    try
                    {
                        String errText = (String) aClass.getField("DESCRIPTION").get(aClass);
                        while (errText.contains("${"))
                        {
                            int start = errText.indexOf("${");
                            int end = errText.indexOf("}", start);
                            String token = errText.substring(start + 2, end);
                            String value = (String) aClass.getField(token).get(prob);
                            token = "${" + token + "}";
                            errText = errText.replace(token, value);
                        }
                        msg.setMessage(errText);
                    }
                    catch (IllegalArgumentException e1)
                    {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
View Full Code Here

        oemConfiguration = null;
        logger = null;
        output = null;
        directory = null;
        mimeMappings = new MimeMappings();
        meter = null;
        resolver = null;
        cc = new CompilerControl();

        //data = null;
View Full Code Here

            this.files.add(files[i]);
        }
        oemConfiguration = null;
        logger = null;
        output = null;
        mimeMappings = new MimeMappings();
        meter = null;
        resolver = null;
        cc = new CompilerControl();
        //isGeneratedTargetFile = false;
View Full Code Here

                }
            }
           
        }
        ISWF swf = mxmlc.getSWFTarget();
        movie = new SimpleMovie(null);
        org.apache.flex.swf.types.Rect r = swf.getFrameSize();
        flash.swf.types.Rect fr = new flash.swf.types.Rect();
        fr.xMin = r.xMin();
        fr.yMin = r.yMin();
        fr.xMax = r.xMax();
View Full Code Here

      ThreadLocalToolkit.setLogger(console);
       
    final Library lib = new Library();
    lib.setLogger(console);
    OEMConfiguration c1 = (OEMConfiguration) lib.getDefaultConfiguration();
    CompcConfiguration c2 = getCompcConfiguration(args);
    OEMConfiguration c3 = new OEMConfiguration(null, c2);
    c1.importDefaults(c3);
    lib.setConfiguration(c1);
 
    // transfer the value of compute-digest from CompcConfiguration to OEMConfiguration.
    c1.enableDigestComputation(c2.getComputeDigest());
   
    for (Iterator i = c2.getClasses().iterator(); i.hasNext(); )
    {
      lib.addComponent((String) i.next());
    }
   
    List fileList = flex2.compiler.CompilerAPI.getVirtualFileList(c2.getIncludeSources(),
                                new HashSet<String>(Arrays.asList(flex2.tools.WebTierAPI.getSourcePathMimeTypes())));

    for (Iterator i = fileList.iterator(); i.hasNext(); )
    {
      lib.addComponent(new File(((VirtualFile) i.next()).getName()));
    }

    Map ss = c2.getStylesheets();
    for (Iterator i = ss.keySet().iterator(); i.hasNext(); )
    {
      String key = (String) i.next();
      lib.addStyleSheet(key, new File(((VirtualFile) ss.get(key)).getName()));
    }

    for (Iterator i = c2.getIncludeResourceBundles().iterator(); i.hasNext(); )
    {
      lib.addResourceBundle((String) i.next());
    }

    for (Iterator i = c2.getNamespaces().iterator(); i.hasNext(); )
    {
      lib.addComponent(new URI((String) i.next()));
    }
   
    Map m = c2.getFiles();
    for (Iterator i = m.keySet().iterator(); i.hasNext(); )
    {
      String key = (String) i.next();
      lib.addArchiveFile(key, new File(((VirtualFile) m.get(key)).getName()));
    }
       
        try
    {
            lib.load(new BufferedInputStream(new FileInputStream(new File(c2.getOutput() + ".incr"))));
            // load() wipes out our ThreadLocal and we lose our logger
            ThreadLocalToolkit.setLogger(console);
    }
    catch (IOException ex)
    {
    }
       
    long size = 0;
    if ((size = lib.build(new BufferedOutputStream(new FileOutputStream(new File(c2.getOutput()))), true)) == 0)
    {
            ThreadLocalToolkit.logError("Build unsuccessful.");
    }
    else
    {
      System.out.println(c2.getOutput() + " (" + size + " bytes)");
        if (c2.generateRBList() && c2.getRBListFileName() != null)
        {
          Report r = lib.getReport();
          String[] rbNames = r.getResourceBundleNames();
          HashSet<String> set = new HashSet<String>();
          for (int i = 0, l = rbNames == null ? 0 : rbNames.length; i < l; i++)
          {
            set.add(rbNames[i]);
          }
          String list = FlexMovie.dumpRBList(set);
          FileUtil.writeFile(c2.getRBListFileName(), list);
        }

    }

    lib.save(new BufferedOutputStream(new FileOutputStream(new File(c2.getOutput() + ".incr"))));   
    lib.clean();
  }
View Full Code Here

          }
          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

TOP

Related Classes of flex2.tools.CompcConfiguration

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.