Package flex2.compiler.as3.reflect

Examples of flex2.compiler.as3.reflect.TypeTable


    // set up the compiler extension which writes out toplevel.xml
    List excludeClasses = configuration.getExcludeClasses();
    Set packages = configuration.getPackagesConfiguration().getPackageNames();
    ASDocExtension asdoc = new ASDocExtension(excludeClasses, includeOnly, packages, configuration.restoreBuiltinClasses());
    As3Compiler asc = (flex2.compiler.as3.As3Compiler)compilers[0];
    asc.addCompilerExtension(asdoc);
   
    // IMPORTANT!!!! The HostComponentExtension must run before the BindableExtension!!!!
    asc.addCompilerExtension(new HostComponentExtension(configuration.getCompilerConfiguration().reportMissingRequiredSkinPartsAsWarnings()) );
   
    String gendir = (compilerConfig.keepGeneratedActionScript()? compilerConfig.getGeneratedDirectory() : null);
    asc.addCompilerExtension(new BindableExtension(gendir, compilerConfig.getGenerateAbstractSyntaxTree(),true) );
    asc.addCompilerExtension(new ManagedExtension(gendir, compilerConfig.getGenerateAbstractSyntaxTree(),true) );

    ((flex2.compiler.mxml.MxmlCompiler)compilers[1]).addImplementationCompilerExtension(asdoc);

    if (ThreadLocalToolkit.getBenchmark() != null)
    {
View Full Code Here


   */
  public static flex2.compiler.SubCompiler[] getCompilers(CompilerConfiguration compilerConfig, NameMappings mappings,
                                                       Transcoder[] transcoders)
  {
    // support AS3
    As3Compiler asc = new As3Compiler(compilerConfig);
   
    // support MXML.. call constructor with processComments as true.
    MxmlCompiler mxmlc = new MxmlCompiler(compilerConfig, compilerConfig,
                                 mappings, transcoders, true);

View Full Code Here

    this.ascConfiguration = ascConfiguration;
    this.nameMappings = mappings;
    this.processComments = processComments;
   
    mimeTypes = new String[]{MimeMappings.MXML};
    asc = new As3Compiler(new As3Configuration()
    {
            public boolean optimize() { return true; }
            public boolean verboseStacktraces() { return false; }
            public boolean debug() { return false; }
            public boolean strict() { return ascConfiguration.strict(); }
View Full Code Here

    {
        private SkeletonCompiler(CompilerConfiguration config)
        {
            // Create an As3Compiler as our delegate sub-compiler for
            // generated ActionScript.
            As3Compiler asc = new As3Compiler(config);
            delegateSubCompiler = asc;
        }
View Full Code Here

       
    mimeTypes = new String[]{MimeMappings.MXML};
    generateDocComments = ascConfiguration.doc();

    // set up ASC and extensions -- mostly mirrors flex2.tools.WebTierAPI.getCompilers()
    asc = new As3Compiler(ascConfiguration);
       
        // signature generation should occur before other extensions can touch the syntax tree.
        if ((ascConfiguration instanceof CompilerConfiguration)
                // currently, both configs reference same object, and are CompilerConfigurations
                && !((CompilerConfiguration)ascConfiguration).getDisableIncrementalOptimizations())
View Full Code Here

        mimeTypes = new String[]{MimeMappings.CSS};
        nameMappings = mappings;
        String gendir = (configuration.keepGeneratedActionScript()? configuration.getGeneratedDirectory() : null);

        // Create an As3Compiler as our delegate sub-compiler.
        As3Compiler asc = new As3Compiler(configuration);
        asc.addCompilerExtension(new EmbedExtension(transcoders, gendir, configuration.showDeprecationWarnings()));
        delegateSubCompiler = asc;
    }
View Full Code Here

        assert (configuration != null);

        //TODO It would be nice to cache this; it cannot (?) be static, however,
        //     as the Configuration changes. Solution would be a static Map or some fancy logic?
        // temporary compiler to get a syntax tree, for signature generation
        final As3Compiler asc = new As3Compiler(configuration.getCompilerConfiguration());
        asc.addCompilerExtension(SignatureExtension.getInstance());

        // create a new CompilationUnit if no error occur
        // then grab the signature if no signature error occur
        CompilationUnit u = null;

        // this is needed by Source.Resolver.resolve().
        ThreadLocalToolkit.setCompatibilityVersion(configuration.getCompatibilityVersion());

        // this swallows any parse errors -- they will get thrown when the file is
        // officially reparsed for compilation
        final Logger original = ThreadLocalToolkit.getLogger();
        ThreadLocalToolkit.setLogger(new LocalLogger(null));
        {
            final Source tmpSource = asc.preprocess(
                           Source.newSource(source.getBackingFile(),      source.getFileTime(),
                                            source.getPathRoot(),         source.getRelativePath(),
                                            source.getShortName(),        source.getOwner(),
                                            source.isInternal(),          source.isRoot(),
                                            source.isDebuggable(),        source.getFileIncludesSet(),
                                            source.getFileIncludeTimes(), source.getLogger()));

            // HACK: Forcefully disable any chance of signatures getting emitted to
            //       the filesystem -- since this code should be as fast as possible.
            //       Don't worry though, it WILL happen later during re-compilation.
            final String tmp = SignatureExtension.signatureDirectory;
            SignatureExtension.signatureDirectory = null;
            {
                u = asc.parse1(tmpSource, new SymbolTable(configuration));
            }
            SignatureExtension.signatureDirectory = tmp;
        }
        ThreadLocalToolkit.setLogger(original);
View Full Code Here

    private final class ImplementationCompiler extends AbstractDelegatingSubCompiler
    {
        private ImplementationCompiler(CompilerConfiguration config)
        {
            // Create an As3Compiler as our delegate sub-compiler.
            As3Compiler asc = new As3Compiler(config);
            delegateSubCompiler = asc;
        }
View Full Code Here

    this.ascConfiguration = ascConfiguration;
    this.nameMappings = mappings;
    this.processComments = processComments;
   
    mimeTypes = new String[]{MimeMappings.MXML};
    asc = new As3Compiler(new As3Configuration()
    {
            public boolean optimize() { return true; }
            public boolean verboseStacktraces() { return false; }
            public boolean debug() { return false; }
            public boolean strict() { return ascConfiguration.strict(); }
View Full Code Here

    private static final String COMPILER_NAME = "i18n";

    public I18nCompiler(final CompilerConfiguration compilerConfig, Transcoder[] transcoders)
    {
      configuration = compilerConfig;
        asc = new flex2.compiler.as3.As3Compiler(new As3Configuration()
        {
            public boolean optimize() { return true; }
            public boolean verboseStacktraces() { return false; }
            public boolean debug() { return false; }
            public boolean strict() { return true; }
View Full Code Here

TOP

Related Classes of flex2.compiler.as3.reflect.TypeTable

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.