Package flex2.compiler.mxml

Examples of flex2.compiler.mxml.MxmlLogAdapter


      {
        Class retType = info.getGetterMethod().getReturnType();

        if (VirtualFile.class.isAssignableFrom(retType))
        {
          VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          if (file != null)
          {
            if (info.doChecksum())
              compile_checksum.append(file.getName());
            link_checksum.append(file.getName());
          }
          continue;
        }
        else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
        {
          VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          for (int j = 0; files != null && j < files.length; j++)
          {
            if (files[j] != null)
            {
              if (info.doChecksum())
                compile_checksum.append(files[j].getName());
              link_checksum.append(files[j].getName());
            }
          }
          continue;
        }
      }

      if (args[i] instanceof Object[])
      {
        Object[] a = (Object[]) args[i];
        for (int j = 0; j < a.length; j++)
        {
          if (info.doChecksum())
            compile_checksum.append(a[j]);
          link_checksum.append(a[j]);
        }
      }
      else if (args[i] instanceof List)
      {
        List l = (List) args[i];
        for (int j = 0; j < l.size(); j++)
        {
          if (info.doChecksum())
            compile_checksum.append(l.get(j));
          link_checksum.append(l.get(j));
        }
      }
      else
      {
        if (info.doChecksum())
          compile_checksum.append(args[i]);
        link_checksum.append(args[i]);
      }
    }

    if (info.getGetterMethod() == null)
    {
      // C: need to make sure that all the VirtualFile-based config values should have getters.
      return;
    }

    Class retType = info.getGetterMethod().getReturnType();

    if (VirtualFile.class.isAssignableFrom(retType))
    {
      VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
      if (file != null && !file.isDirectory())
      {
        if (info.doChecksum())
          compile_checksum_ts.append(file.getLastModified());
        link_checksum_ts.append(file.getLastModified());
      }
    }
    else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
    {
      VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
View Full Code Here


    /**
     * Create virtual file for given file and throw configuration exception if not possible
     */
    public static VirtualFile getVirtualFile(String path, boolean reportError) throws ConfigurationException
    {
        VirtualFile result = null;
        File file = new File(path);

        if (file != null && file.exists())
        {
            try
View Full Code Here

    {
            // No need to check to see if the appPath is supported again.
      if ((appPath != null && files[i].getName().equals(appPath.getName())) || isSupported(files[i]))
      {
        String name = files[i].getName();
        VirtualFile pathRoot = calculatePathRoot(files[i]);
        if (pathRoot != null)
        {
                    String relativePath = calculateRelativePath(name);
                    String namespaceURI = relativePath.replace('/', '.');
                    String localPart = calculateLocalPart(name);
View Full Code Here

       
        // Use MxmlLogAdapter to do filtering, e.g. -generated.as -> .css, as line -> css
        // line, etc...
        Logger original = ThreadLocalToolkit.getLogger();
        LineNumberMap lineNumberMap = styleModule.getLineNumberMap();
        Logger adapter = new MxmlLogAdapter(original, lineNumberMap);
        ThreadLocalToolkit.setLogger(adapter);

        CompilationUnit ascCompilationUnit = delegateSubCompiler.parse1(generatedSource, symbolTable);

        if (ascCompilationUnit != null)
View Full Code Here

        CompilationUnit ascUnit = (CompilationUnit) unit.getContext().getAttribute(DELEGATE_UNIT);
        Source.transferInheritance(unit, ascUnit);

        Logger original = ThreadLocalToolkit.getLogger();
        LineNumberMap map = (LineNumberMap) unit.getContext().getAttribute(LINE_NUMBER_MAP);
        Logger adapter = new MxmlLogAdapter(original, map);

        ThreadLocalToolkit.setLogger(adapter);
        delegateSubCompiler.parse2(ascUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);
View Full Code Here

    {
        CompilationUnit ascUnit = (CompilationUnit) unit.getContext().getAttribute(DELEGATE_UNIT);

        Logger original = ThreadLocalToolkit.getLogger();
        LineNumberMap map = (LineNumberMap) unit.getContext().getAttribute(LINE_NUMBER_MAP);
        Logger adapter = new MxmlLogAdapter(original, map);

        ThreadLocalToolkit.setLogger(adapter);
        delegateSubCompiler.analyze1(ascUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);
View Full Code Here

        CompilationUnit ascUnit = (CompilationUnit) unit.getContext().getAttribute(DELEGATE_UNIT);
        Source.transferDependencies(unit, ascUnit);

        Logger original = ThreadLocalToolkit.getLogger();
        LineNumberMap map = (LineNumberMap) unit.getContext().getAttribute(LINE_NUMBER_MAP);
        Logger adapter = new MxmlLogAdapter(original, map);

        ThreadLocalToolkit.setLogger(adapter);
        delegateSubCompiler.analyze2(ascUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);
View Full Code Here

        CompilationUnit ascUnit = (CompilationUnit) unit.getContext().getAttribute(DELEGATE_UNIT);
        Source.transferDependencies(unit, ascUnit);

        Logger original = ThreadLocalToolkit.getLogger();
        LineNumberMap map = (LineNumberMap) unit.getContext().getAttribute(LINE_NUMBER_MAP);
        Logger adapter = new MxmlLogAdapter(original, map);

        ThreadLocalToolkit.setLogger(adapter);
        delegateSubCompiler.analyze3(ascUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);
    }
View Full Code Here

    {
        CompilationUnit ascUnit = (CompilationUnit) unit.getContext().getAttribute(DELEGATE_UNIT);

        Logger original = ThreadLocalToolkit.getLogger();
        LineNumberMap map = (LineNumberMap) unit.getContext().getAttribute(LINE_NUMBER_MAP);
        MxmlLogAdapter adapter = new MxmlLogAdapter(original, map);

        ThreadLocalToolkit.setLogger(adapter);
        delegateSubCompiler.analyze4(ascUnit, symbolTable);

        if (ThreadLocalToolkit.errorCount() > 0)
View Full Code Here

        DualModeLineNumberMap map = (DualModeLineNumberMap) unit.getContext().getAttribute(LINE_NUMBER_MAP);
        if (map != null)
            map.flushTemp();    //  flush all compile-error-only line number mappings

        Logger adapter = new MxmlLogAdapter(original, map);

        ThreadLocalToolkit.setLogger(adapter);
        delegateSubCompiler.generate(ascUnit, symbolTable);

        if (ThreadLocalToolkit.errorCount() > 0)
View Full Code Here

TOP

Related Classes of flex2.compiler.mxml.MxmlLogAdapter

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.