Package flex2.tools.Mxmlc

Examples of flex2.tools.Mxmlc.OutputMessage


                        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

                if (s.outputName != null && ThreadLocalToolkit.errorCount() == 0)
                {
                    File file = new File(s.outputName);
                    s.outputName = FileUtil.getCanonicalPath(file);
                    ThreadLocalToolkit.log(new OutputMessage(s.outputName, Long.toString(file.length())));
                }
            }
        }
        catch (LinkerException ex)
        {
View Full Code Here

                    Mxmlc.createProjector(s.configuration, projector, s.app, swfOut);

                    swfOut.flush();
                    swfOut.close();

                    ThreadLocalToolkit.log(new OutputMessage(s.outputName, Long.toString(file.length())));
                }
                else
                {
                    // link
                    s.movie = LinkerAPI.link(s.units, postLink, s.configuration);

                    // output SWF
                    File file = FileUtil.openFile(s.outputName, true);
                    swfOut = new BufferedOutputStream(new FileOutputStream(file));

                    if (projector != null)
                    {
                        Mxmlc.createProjector(s.configuration, projector, s.movie, swfOut);
                    }
                    else
                    {
                        CompilerAPI.encode(s.configuration, s.movie, swfOut);
                    }

                    swfOut.flush();
                    swfOut.close();

                    ThreadLocalToolkit.log(new OutputMessage(s.outputName, Long.toString(file.length())));
                }
            }
        }
        catch (LinkerException ex)
        {
View Full Code Here

                Mxmlc.createProjector(configuration, projector, s.app, swfOut);

                swfOut.flush();
                swfOut.close();

                ThreadLocalToolkit.log(new OutputMessage(s.outputName, Long.toString(file.length())));
            }
            else
            {
                if (benchmark != null)
                {
                    benchmark.stopTime(Benchmark.PRECOMPILE, false);
                }

                List<CompilationUnit> units = CompilerAPI.compile(s.fileSpec, s.sourceList, null, s.sourcePath, s.resources, s.bundlePath,
                                                        swcContext, symbolTable, mappings, configuration, compilers,
                                                        new PreLink(), licenseMap, new ArrayList<Source>());

                if (benchmark != null)
                {
                    benchmark.startTime(Benchmark.POSTCOMPILE);
                }

                s.units = units;
                s.sourcePath.clearCache();
                s.bundlePath.clearCache();
                s.resources.refresh();

                // link
                s.movie = LinkerAPI.link(units, postLink, configuration);

                // output SWF
                File file = FileUtil.openFile(s.outputName, true);
                swfOut = new BufferedOutputStream(new FileOutputStream(file));

                if (projector != null)
                {
                    Mxmlc.createProjector(configuration, projector, s.movie, swfOut);
                }
                else
                {
                    CompilerAPI.encode(configuration, s.movie, swfOut);
                }

                swfOut.flush();
                swfOut.close();

                ThreadLocalToolkit.log(new OutputMessage(s.outputName, Long.toString(file.length())));
            }
        }
        catch (ConfigurationException ex)
        {
            Mxmlc.processConfigurationException(ex, "mxmlc");
View Full Code Here

            {
                File file = FileUtil.openFile(s.outputName);
                if (file != null && file.exists() && file.isFile())
                {
                    s.outputName = FileUtil.getCanonicalPath(file);
                    ThreadLocalToolkit.log(new OutputMessage(s.outputName, Long.toString(file.length())));
                }
            }
        }
        catch (ConfigurationException ex)
        {
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.Mxmlc.OutputMessage

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.