Package flex2.compiler.util

Examples of flex2.compiler.util.LocalLogger$PathInfo


        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

      includes.add(f);
      includeTimes.put(f, new Long(ts));
    }

    size = readU32(in);
    LocalLogger logger = size == 0 ? null : new LocalLogger(null);

    for (int i = 0; i < size; i++)
    {
      String path = (String) pool[readU32(in)];
      if (path.length() == 0)
      {
        path = null;
      }
      String warning = (String) pool[readU32(in)];
      if (warning.length() == 0)
      {
        warning = null;
      }
      String source = (String) pool[readU32(in)];
      if (source.length() == 0)
      {
        source = null;
      }
      int line = readU32(in);
      int col = readU32(in);
      int errorCode = readU32(in);

      logger.recordWarning(path,
                           line == -1 ? null : IntegerPool.getNumber(line),
                           col == -1 ? null : IntegerPool.getNumber(col),
                           warning,
                           source,
                           errorCode == -1 ? null : IntegerPool.getNumber(errorCode));
    }


    byte[] abc = (hasUnit) ? (byte[]) pool[readU32(in)] : null;
    Source s = null;

    if (owner == 0) // FileSpec
    {
      Collection<Source> c = fileSpec.sources();
      for (Iterator<Source> i = c.iterator(); i.hasNext();)
      {
        s = i.next();
        if (s.getName().equals(name))
        {
          Source.populateSource(s, fileTime, pathRoot, relativePath, shortName, fileSpec, isInternal, isRoot, isDebuggable,
                                includes, includeTimes, logger);
          break;
        }
      }
    }
    else if (owner == 1) // SourceList
    {
      Collection<Source> c = sourceList.sources().values();
      for (Iterator<Source> i = c.iterator(); i.hasNext();)
      {
        s = i.next();
        if (s.getName().equals(name))
        {
          Source.populateSource(s, fileTime, pathRoot, relativePath, shortName, sourceList, isInternal, isRoot, isDebuggable,
                                includes, includeTimes, logger);
          break;
        }
      }
    }
    else if (owner == 2) // SourcePath
    {
      Map<String, Source> c = sourcePath.sources();
      String className = mappings.get(name);

      if ((className != null) && !c.containsKey(className))
      {
        VirtualFile f = resolver.resolve(name);

        if (f == null)
        {
          f = new DeletedFile(name);
        }

        s = Source.newSource(f, fileTime, pathRoot, relativePath, shortName, sourcePath, isInternal, isRoot, isDebuggable,
                             includes, includeTimes, logger);
        c.put(className, s);
      }
      else
      {
        assert false : name;
      }
    }
    else if (owner == 3) // ResourceContainer
    {
      if (resources == null)
      {
        LocalizationManager l10n = ThreadLocalToolkit.getLocalizationManager();
        throw new IOException(l10n.getLocalizedTextString(new NoResourceContainer()));
      }

      s = Source.newSource(abc, name, fileTime, pathRoot, relativePath, shortName, resources, isInternal, isRoot, isDebuggable,
                           includes, includeTimes, logger);
      s = resources.addResource(s);
    }
    else if (owner == 4) // ResourceBundlePath
    {
      Map<String, Source> c = bundlePath.sources();
      Object[] value = (Object[]) rbMappings.get(name);
      String bundleName = (String) value[0];
      String[] rNames = (String[]) value[1];
      String[] rRoots = (String[]) value[2];

      if (bundleName != null)
      {
        VirtualFile[] rFiles = new VirtualFile[rNames.length];

        for (int i = 0; i < rFiles.length; i++)
        {
          if (rNames[i] != null)
          {
            rFiles[i] = resolver.resolve(rNames[i]);
            if (rFiles[i] == null)
            {
              rFiles[i] = new DeletedFile(rNames[i]);
            }
          }
        }

        VirtualFile[] rRootFiles = new VirtualFile[rRoots.length];

        for (int i = 0; i < rRootFiles.length; i++)
        {
          if (rRoots[i] != null)
          {
            rRootFiles[i] = resolver.resolve(rRoots[i]);
            if (rRootFiles[i] == null)
            {
              rRootFiles[i] = new DeletedFile(rRoots[i]);
            }
          }
        }

        VirtualFile f = new ResourceFile(name, bundlePath.getLocales(), rFiles, rRootFiles);
        s = Source.newSource(f, fileTime, pathRoot, relativePath, shortName, bundlePath, isInternal, isRoot, isDebuggable,
                             includes, includeTimes, logger);
        c.put(bundleName, s);
      }
      else
      {
        assert false : name;
      }
    }
        else
        {
            assert false : "owner = " + owner;
        }

    if (logger != null)
    {
      logger.setSource(s);
    }

    if (hasUnit)
    {
      CompilationUnit u = s.newCompilationUnit(null, new CompilerContext());
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

          }
          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.compiler.util.LocalLogger$PathInfo

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.