Examples of CompilerOptions


Examples of com.google.gwt.dev.CompilerOptions

    ModuleDef module;
    try {
      module = loadModule(compileLogger);

      logger.log(TreeLogger.INFO, "Loading Java files in " + inputModuleName + ".");
      CompilerOptions loadOptions = new CompilerOptionsImpl(compileDir, inputModuleName, options);
      compilerContext = compilerContextBuilder.options(loadOptions).unitCache(
          Compiler.getOrCreateUnitCache(logger, loadOptions)).build();

      // Loads and parses all the Java files in the GWT application using the JDT.
      // (This is warmup to make compiling faster later; we stop at this point to avoid
View Full Code Here

Examples of com.google.gwt.thirdparty.javascript.jscomp.CompilerOptions

  public ClosureJsRunner() {
  }

  public void compile(JProgram jprogram, JsProgram program, String[] js,
      JsOutputOption jsOutputOption) {
    CompilerOptions options;
    try {
      options = getClosureCompilerOptions(jsOutputOption);
    } catch (ParseException e) {
      throw new RuntimeException("Error setting closure compiler options", e);
    }
View Full Code Here

Examples of com.google.javascript.jscomp.CompilerOptions

    return root.getLastChild().getFirstChild();
  }

  private Compiler getCompiler(String jsInput) {
    Compiler compiler = new Compiler();
    CompilerOptions options = RefactoringDriver.getCompilerOptions();
    compiler.init(
        ImmutableList.<SourceFile>of(), // Externs
        ImmutableList.of(SourceFile.fromCode("test", jsInput)),
        options);
    compiler.parse();
View Full Code Here

Examples of com.google.javascript.jscomp.CompilerOptions

    scanner.initialize(compiler);
    return scanner;
  }

  private void compileTestCode(Compiler compiler, String testCode, String externs) {
    CompilerOptions options = RefactoringDriver.getCompilerOptions();
    compiler.compile(
        ImmutableList.of(SourceFile.fromCode("externs", externs)),
        ImmutableList.of(SourceFile.fromCode("test", testCode)),
        options);
  }
View Full Code Here

Examples of com.google.javascript.jscomp.CompilerOptions

      throw new BuildException("outputFile attribute must be set");
    }

    Compiler.setLoggingLevel(Level.OFF);

    CompilerOptions options = createCompilerOptions();
    Compiler compiler = createCompiler(options);

    List<SourceFile> externs = findExternFiles();
    List<SourceFile> sources = findSourceFiles();
View Full Code Here

Examples of com.google.javascript.jscomp.CompilerOptions

      throw new BuildException("Cannot write sourcemap to file.", e);
    }
  }

  private CompilerOptions createCompilerOptions() {
    CompilerOptions options = new CompilerOptions();

    this.compilationLevel.setOptionsForCompilationLevel(options);
    if (this.debugOptions) {
      this.compilationLevel.setDebugOptionsForCompilationLevel(options);
    }

    options.prettyPrint = this.prettyPrint;
    options.printInputDelimiter = this.printInputDelimiter;
    options.generateExports = this.generateExports;

    options.setLanguageIn(this.languageIn);
    options.setOutputCharset(this.outputEncoding);

    this.warningLevel.setOptionsForWarningLevel(options);
    options.setManageClosureDependencies(manageDependencies);
    convertEntryPointParameters(options);
    options.setTrustedStrings(true);

    if (replaceProperties) {
      convertPropertiesMap(options);
    }

    convertDefineParameters(options);

    for (Warning warning : warnings) {
      CheckLevel level = warning.getLevel();
      String groupName = warning.getGroup();
      DiagnosticGroup group = new DiagnosticGroups().forName(groupName);
      if (group == null) {
        throw new BuildException(
            "Unrecognized 'warning' option value (" + groupName + ")");
      }
      options.setWarningLevel(group, level);
    }

    if (!Strings.isNullOrEmpty(sourceMapFormat)) {
      options.sourceMapFormat = Format.valueOf(sourceMapFormat);
    }
View Full Code Here

Examples of com.google.javascript.jscomp.CompilerOptions

    public static String compile(List<FragmentDescriptor> scripts, IRequestProxy request,
                                 CompressorSettings settings) throws JSCompileException {
        Compiler compiler = new Compiler();

        CompilerOptions options = new CompilerOptions();
        options.markAsCompiled = true;
        if (settings.getLocale() != null)
            options.locale = settings.getLocale();
        options.prettyPrint = settings.isFormatPrettyPrint();
        options.printInputDelimiter = settings.isFormatPrintInputDelimiter();
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.runtime.tools.CompilerOptions

                System.err.println("MODULE COMPILED: "+module+"/"+version);
                compiledModule[0] = module;
                compiledVersion[0] = version;
            }
        };
        CompilerOptions options = new CompilerOptions();
        options.addSourcePath(new File("test-jvm"));
        options.setSystemRepository(SystemRepo);
        options.addUserRepository("flat:"+FlatRepoLib);
        options.addUserRepository("flat:"+FlatRepoOverrides);
        options.setOutputRepository(OutputRepository);
        options.setFiles(ceylonFiles);
        boolean ret = compiler.compile(options, listener);
        Assert.assertEquals(module, compiledModule[0]);
        Assert.assertEquals(expectedVersion, compiledVersion[0]);
        if(module.endsWith(".errors")){
            Assert.assertEquals(2, errors.size());
View Full Code Here

Examples of net.sf.wsdl2jibx.compiler.CompilerOptions

    if(fieldVisibility!=null) options.setFieldVisibility(fieldVisibility);
    options.setVerbose(verbose);
    createOutputDirectory();
    options.setOutDir(outputDirectory);
   
    CompilerOptions compilerOptions = options.getCompilerOptions();
    Compiler compiler = new Compiler(compilerOptions);
    compiler.execute();
  }
View Full Code Here

Examples of org.apache.axis2.databinding.schema.CompilerOptions

    protected  XmlSchemaCollection getSchemaReader(){
        return new XmlSchemaCollection();
    }

    public void testSchema() throws Exception{
        SchemaCompiler compiler = new SchemaCompiler( new CompilerOptions().setOutputLocation(outputFolder));
        compiler.compile(currentSchema);
      
    }
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.