Package flex2.compiler

Examples of flex2.compiler.Logger


     * Initializes a Flex specific logger to bridge FXG messages back to the
     * Flex compiler's logging system.
     */
    private void setupLogger()
    {
        Logger logger = ThreadLocalToolkit.getLogger();
        if (logger != null)
        {
            FXGLogger fxgLogger = FXGLog.getLogger();
            if (!(fxgLogger instanceof FlexLoggerAdapter))
            {
View Full Code Here


    //  - superclass, interface and metadata declarations, as specified in the MXML
    //  - public var declarations for id-attributed children of the MXML
    //  - user-supplied script code
    LineNumberMap map = new LineNumberMap(source.getName());
    Source newSource;
    Logger original = ThreadLocalToolkit.getLogger();

    if (mxmlConfiguration.getGenerateAbstractSyntaxTree())
    {
      Logger adapter = new AbstractSyntaxTreeLogAdapter(original);
      ThreadLocalToolkit.setLogger(adapter);
      newSource = generateSkeletonAST(docInfo, analyzer.bogusImports, source, symbolTable);
    }
    else
    {
      MxmlLogAdapter adapter = new MxmlLogAdapter(original, map);
      adapter.addLineNumberMaps(unit.getSource().getSourceFragmentLineMaps());
      ThreadLocalToolkit.setLogger(adapter);
      newSource = generateSkeleton(docInfo, analyzer.bogusImports, map, source);

      if (newSource == null)
      {
View Full Code Here

     */
    public void analyze1(CompilationUnit unit, SymbolTable symbolTable)
    {
    CompilationUnit interfaceUnit = (CompilationUnit) unit.getContext().getAttribute(MxmlCompiler.DELEGATE_UNIT);

    Logger original = setLogAdapter(unit);
        asc.analyze1(interfaceUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);

        Source.transferTypeInfo(interfaceUnit, unit);
        Source.transferNamespaces(interfaceUnit, unit);
View Full Code Here

    public void analyze2(CompilationUnit unit, SymbolTable symbolTable)
    {
    CompilationUnit interfaceUnit = (CompilationUnit) unit.getContext().getAttribute(MxmlCompiler.DELEGATE_UNIT);
        Source.transferDependencies(unit, interfaceUnit);
       
    Logger original = setLogAdapter(unit);
        asc.analyze2(interfaceUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);

        Source.transferDependencies(interfaceUnit, unit);
    }
View Full Code Here

        // C: But we tell asc that those bogus statements are legitimate.
        //    Don't try this in ImplementationCompiler!
        interfaceUnit.importDefinitionStatements.addAll(importDefinitionStatements);

    Logger original = setLogAdapter(unit);
        asc.analyze3(interfaceUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);
    }
View Full Code Here

     */
    public void analyze4(CompilationUnit unit, SymbolTable symbolTable)
    {
    CompilationUnit interfaceUnit = (CompilationUnit) unit.getContext().getAttribute(MxmlCompiler.DELEGATE_UNIT);

    Logger original = setLogAdapter(unit);
        asc.analyze4(interfaceUnit, symbolTable);
        ThreadLocalToolkit.setLogger(original);

        for( Map.Entry<String, AbcClass> entry : interfaceUnit.classTable.entrySet() )
        {
View Full Code Here

   */
  private CompilationUnit compileInterface(Source newSource, Source origSource, DocumentInfo info,
                       LineNumberMap map, SymbolTable symbolTable)
  {
    // set the current logger to the one with line number mapping support
    Logger original = ThreadLocalToolkit.getLogger();

    if (mxmlConfiguration.getGenerateAbstractSyntaxTree())
    {
      Logger adapter = new AbstractSyntaxTreeLogAdapter(original);
      ThreadLocalToolkit.setLogger(adapter);
    }
    else
    {
    MxmlLogAdapter adapter = new MxmlLogAdapter(original, map);
    adapter.addLineNumberMaps(origSource.getSourceFragmentLineMaps());
    ThreadLocalToolkit.setLogger(adapter);
    }

    CompilationUnit interfaceUnit = asc.parse1(newSource, symbolTable);
View Full Code Here

    // from above, but we turn anround and pass it to our embedded compiler as the "main" helper.
  }

    private Logger setLogAdapter(CompilationUnit unit)
    {
        Logger original = ThreadLocalToolkit.getLogger();

    if (mxmlConfiguration.getGenerateAbstractSyntaxTree())
    {
      Logger adapter = new AbstractSyntaxTreeLogAdapter(original);
      ThreadLocalToolkit.setLogger(adapter);
    }
    else
    {
      LineNumberMap map = (LineNumberMap) unit.getContext().getAttribute(MxmlCompiler.LINE_NUMBER_MAP);
      MxmlLogAdapter adapter = new MxmlLogAdapter(original, map);
      adapter.addLineNumberMaps(unit.getSource().getSourceFragmentLineMaps());
      ThreadLocalToolkit.setLogger(adapter);
    }

        return original;
    }
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

      acc.setHeight(Integer.toString(config.getDefaultHeight()));
        acc.setWidth(Integer.toString(config.getDefaultWidth()));
        acc.setSwfVersion(config.getSwfVersion());
        acc.setScriptRecursionLimit(config.getScriptRecursionLimit());
        acc.setScriptTimeLimit(config.getScriptTimeLimit());
        CompilerConfiguration cc = acc.getCompilerConfiguration();
        cc.setAccessible(config.getCompilerAccessible());
        List<String> externalLibraries = config.getCompilerExternalLibraryPath();
        String[] extlibs = new String[externalLibraries.size()];
        externalLibraries.toArray(extlibs);
        try
        {
            cc.cfgExternalLibraryPath(null, extlibs);
        }
        catch (ConfigurationException e)
        {
            // TODO Auto-generated catch block
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of flex2.compiler.Logger

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.