Examples of CompilerConfiguration


Examples of flex2.compiler.common.CompilerConfiguration

            clean(false /* cleanData */, false /* cleanCache */, false /* cleanOutput */);
            return FAIL;
        }


        CompilerConfiguration compilerConfig = tempOEMConfiguration.configuration.getCompilerConfiguration();
        compilerConfig.setMetadataExport(true);


        clean(true /* cleanData */,
              false /* cleanCache */,
              false /* cleanOutput */,
 
View Full Code Here

Examples of flex2.compiler.common.CompilerConfiguration

      {
        //ThreadLocalToolkit.log(new BadESStrictCombination(es, strict));
      }
       
        // if we're saving signatures to files and the directory is unset, use the default.
        final CompilerConfiguration compilerConfiguration = getCompilerConfiguration();

        validateKeepGeneratedSignatures(configurationBuffer, compilerConfiguration);
        validateKeepGeneratedActionScript(configurationBuffer, compilerConfiguration);
        validateDumpConfig(configurationBuffer);
    }
View Full Code Here

Examples of flex2.compiler.common.CompilerConfiguration

        return sources;
    }

    public void cfgIncludeSources(ConfigurationValue cv, List<String> args) throws ConfigurationException
    {
      CompilerConfiguration compilerConfiguration = getCompilerConfiguration();
      String[] paths = new String[args.size()];
      args.toArray(paths);
      VirtualFile[] newPathElements = compilerConfiguration.expandTokens(paths, compilerConfiguration.getLocales(), cv);

        for (VirtualFile v  : newPathElements)
           sources.add(v.getName());
    }
View Full Code Here

Examples of flex2.compiler.common.CompilerConfiguration

            if (tooManyErrors() || forcedToStop()) break;

            resolveType(sources, units, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext);

            final CompilerConfiguration config = (configuration != null) ? configuration.getCompilerConfiguration() : null;
            if (config != null && config.strict())
            {
                resolveImportStatements(sources, units, sourcePath, swcContext);
            }

            // C: If --coach is turned on, do resolveExpression() here...
            if (config != null && (config.strict() || config.warnings()))
            {
                resolveExpression(sources, units, igraph, dgraph, symbolTable, sourceList,
                                  sourcePath, resources, swcContext, configuration);
            }
View Full Code Here

Examples of flex2.compiler.common.CompilerConfiguration

        {
            benchmark.benchmark2(
                    ThreadLocalToolkit.getLocalizationManager().getLocalizedTextString(new BatchTime("start", "")), true);
        }

        CompilerConfiguration config = (configuration != null) ? configuration.getCompilerConfiguration() : null;
        List<Source> targets = new ArrayList<Source>(sources.size());

        units.clear();
        for (int i = 0, size = sources.size(); i < size; i++)
        {
            Source s = sources.get(i);
            if (s != null && s.isCompiled())
            {
                units.add(s.getCompilationUnit());
            }
            else
            {
                units.add(null);
            }
        }

        if (benchmarkCompilingDetails > 4)
        {
            benchmark.benchmark2(
                    ThreadLocalToolkit.getLocalizationManager().getLocalizedTextString(new BatchTime("init units", "")));
        }

        while (nextSource(sources, igraph, dgraph, targets, symbolTable, configuration) > 0)
        {
            int postprocessCount = 0;

            // 1. targets.size() == sources.size()
            // 2. targets.get(i) == sources.get(i) or targets.get(i) == null
            for (int i = 0, size = targets.size(); i < size; i++)
            {
                Source s = targets.get(i);
                if (s == null) continue;

                int w = getCompilationUnitWorkflow(s);

                if ((w & preprocess) == 0)
                {
                    // C: it returns false if it errors. There is no need to catch that. It's okay to
                    //    keep going because findSources() takes into account of errors.
                    preprocess(sources, compilers, i, i + 1, symbolTable.getSuppressWarningsIncremental());

                    if (benchmarkCompilingDetails > 4)
                    {
                        benchmark.benchmark2(
                                ThreadLocalToolkit.getLocalizationManager()
                                .getLocalizedTextString(
                                        new BatchTime("preprocess", s.getNameForReporting())));
                    }
                }
                else if ((w & parse1) == 0)
                {
                    parse1(sources, units, igraph, dgraph, compilers, symbolTable, i, i + 1);
                    resolveInheritance(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, i, i + 1);
                    addGeneratedSources(sources, igraph, dgraph, resources, symbolTable, configuration, i, i + 1);

                    if (benchmarkCompilingDetails > 4)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(
                                ThreadLocalToolkit.getLocalizationManager().
                                getLocalizedTextString(
                                        new BatchTime("parse1", s.getNameForReporting())));
                    }
                }
                else if ((w & parse2) == 0)
                {
                    parse2(sources, compilers, symbolTable, i, i + 1);
                    addGeneratedSources(sources, igraph, dgraph, resources, symbolTable, configuration, i, i + 1);

                    if (benchmarkCompilingDetails > 4)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(
                                ThreadLocalToolkit.getLocalizationManager().
                                getLocalizedTextString(
                                        new BatchTime("parse2", s.getNameForReporting())));
                    }
                }
                else if ((w & analyze1) == 0)
                {
                    // analyze1
                    analyze(sources, compilers, symbolTable, i, i + 1, 1);
                    resolveNamespace(sources, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, i, i + 1);
                    addGeneratedSources(sources, igraph, dgraph, resources, symbolTable, configuration, i, i + 1);

                    if (benchmarkCompilingDetails > 4)
                    {
                        ThreadLocalToolkit.getBenchmark().benchmark2(
                                ThreadLocalToolkit.getLocalizationManager().
                                getLocalizedTextString(
                                        new BatchTime("analyze1", s.getNameForReporting())));
                    }
                }
                else if ((w & analyze2) == 0)
                {
                    // analyze2
                    analyze(sources, compilers, symbolTable, i, i + 1, 2);
                    resolveType(sources, units, igraph, dgraph, symbolTable, sourceList, sourcePath, resources, swcContext, i, i + 1);

                    if (config.strict())
                    {
                        resolveImportStatements(sources, units, sourcePath, swcContext, i, i + 1);
                    }

                    // C: we don't need this batch1-based memory optimization.
View Full Code Here

Examples of flex2.compiler.common.CompilerConfiguration

        data.configuration = localOEMConfiguration.configuration;
        data.cacheName = cacheName;

        NameMappings mappings = CompilerAPI.getNameMappings(localOEMConfiguration.configuration), copy = mappings.copy();

        CompilerConfiguration compilerConfig = localOEMConfiguration.configuration.getCompilerConfiguration();
        compilerConfig.setMetadataExport(true);

        if (output != null || directory != null)
        {
            OEMUtil.setGeneratedDirectory(compilerConfig, output != null ? output : directory);
        }

        Transcoder[] transcoders = WebTierAPI.getTranscoders( localOEMConfiguration.configuration );
        SubCompiler[] compilers = WebTierAPI.getCompilers(compilerConfig, mappings, transcoders);

        if ((data.fileSet = processSources(compilerConfig)) == null)
        {
            return FAIL;
        }

        data.fileSet.addAll(processStylesheets());

        if (!setupSourceContainers(localOEMConfiguration.configuration, data.fileSet))
        {
            return FAIL;
        }

        // Setup SWC cache
        if (libraryCache != null)
        {
            ContextStatics contextStatics = libraryCache.getContextStatics();

            if (contextStatics != null)
            {
                // Clear out ASC's userDefined, so definitions from a
                // previous compilation don't spill over into this one.
                contextStatics.userDefined.clear();
                data.perCompileData = contextStatics;
                data.swcCache = libraryCache.getSwcCache();
            }
        }

        if (data.swcCache == null)
        {
            data.swcCache = new SwcCache();
        }
       
        // load SWCs
        CompilerSwcContext swcContext = new CompilerSwcContext(true);
        try
        {
            swcContext.load( compilerConfig.getLibraryPath(),
                             compilerConfig.getExternalLibraryPath(),
                             null,
                             compilerConfig.getIncludeLibraries(),
                             mappings,
                             I18nUtils.getTranslationFormat(compilerConfig),
                             data.swcCache );
        }
        catch (SwcException ex)
View Full Code Here

Examples of net.sf.antcontrib.cpptasks.compiler.CompilerConfiguration

                Vector targetsForConfig = (Vector) targetVectorEnum
                        .nextElement();
                //
                //    get the configuration from the first entry
                //
                CompilerConfiguration config = (CompilerConfiguration) ((TargetInfo) targetsForConfig
                        .elementAt(0)).getConfiguration();
                if (config.isPrecompileGeneration()) {
                    targetVectors[index++] = targetsForConfig;
                }
            }
            targetVectorEnum = targetsByConfig.elements();
            while (targetVectorEnum.hasMoreElements()) {
                Vector targetsForConfig = (Vector) targetVectorEnum
                        .nextElement();
                for (int i = 0; i < targetVectors.length; i++) {
                    if (targetVectors[i] == targetsForConfig) {
                        break;
                    }
                    if (targetVectors[i] == null) {
                        targetVectors[i] = targetsForConfig;
                        break;
                    }
                }
            }
            for (int i = 0; i < targetVectors.length; i++) {
                //
                //    get the targets for this configuration
                //
                Vector targetsForConfig = targetVectors[i];
                //
                //    get the configuration from the first entry
                //
                CompilerConfiguration config = (CompilerConfiguration) ((TargetInfo) targetsForConfig
                        .elementAt(0)).getConfiguration();
                //
                //    prepare the list of source files
                //
                String[] sourceFiles = new String[targetsForConfig.size()];
                Enumeration targetsEnum = targetsForConfig.elements();
                index = 0;
                while (targetsEnum.hasMoreElements()) {
                    TargetInfo targetInfo = ((TargetInfo) targetsEnum
                            .nextElement());
                    sourceFiles[index++] = targetInfo.getSources()[0]
                            .toString();
                }
                try {
                    config.compile(this, _objDir, sourceFiles, relentless,
                            monitor);
                } catch (BuildException ex) {
                    if (compileException == null) {
                        compileException = ex;
                    }
View Full Code Here

Examples of org.apache.maven.bootstrap.compile.CompilerConfiguration

            }
        }

        if ( sourceDirectories != null )
        {
            CompilerConfiguration compilerConfiguration = new CompilerConfiguration();
            compilerConfiguration.setOutputLocation( outputDirectory );
            List classpathEntries = classpath( dependencies, extraClasspath, scope, resolver );
            compilerConfiguration.setNoWarn( true );
            compilerConfiguration.setClasspathEntries( classpathEntries );
            compilerConfiguration.setSourceLocations( Arrays.asList( sourceDirectories ) );

            /* Compile with debugging info */
            String debugAsString = System.getProperty( "maven.compiler.debug", "true" );

            if ( !Boolean.valueOf( debugAsString ).booleanValue() )
            {
                compilerConfiguration.setDebug( false );
            }
            else
            {
                compilerConfiguration.setDebug( true );
            }

            List messages = compiler.compile( compilerConfiguration );

            for ( Iterator i = messages.iterator(); i.hasNext(); )
View Full Code Here

Examples of org.codehaus.groovy.control.CompilerConfiguration

  }
 

  protected String compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) throws JRException
  {
    CompilerConfiguration config = new CompilerConfiguration();
    config.setSourceEncoding(SOURCE_ENCODING);
    //config.setClasspath(classpath);
    CompilationUnit unit = new CompilationUnit(config);
   
    for (int i = 0; i < units.length; i++)
    {
View Full Code Here

Examples of org.codehaus.groovy.control.CompilerConfiguration

   
    private GroovyShell createEngine(AbstractBuild<?, ?> build, TaskListener listener) {

        ClassLoader cl = Jenkins.getInstance().getPluginManager().uberClassLoader;
        ScriptSandbox sandbox = null;
        CompilerConfiguration cc = new CompilerConfiguration();
        cc.addCompilationCustomizers(new ImportCustomizer().addStarImports(
                "jenkins",
                "jenkins.model",
                "hudson",
                "hudson.model"));

        ExtendedEmailPublisher publisher = build.getProject().getPublishersList().get(ExtendedEmailPublisher.class);
        if (publisher.getDescriptor().isSecurityEnabled()) {
            cc.addCompilationCustomizers(new SandboxTransformer());
            sandbox = new ScriptSandbox();
        }

        Binding binding = new Binding();
        binding.setVariable("build", build);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.