org.eclipse.jdt.internal.compiler.batch.Main.getHandlingPolicy()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(193)

本文整理了Java中org.eclipse.jdt.internal.compiler.batch.Main.getHandlingPolicy()方法的一些代码示例,展示了Main.getHandlingPolicy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Main.getHandlingPolicy()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.batch.Main
类名称:Main
方法名:getHandlingPolicy

Main.getHandlingPolicy介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private IModule extractModuleDesc(String fileName) {
  IModule mod = null;
  // this.options may not be completely populated yet, and definitely not
  // validated. Make sure the source level is set for the parser
  Map<String,String> opts = new HashMap<String, String>(this.options);
  opts.put(CompilerOptions.OPTION_Source, this.options.get(CompilerOptions.OPTION_Compliance));
  Parser parser = new Parser(new ProblemReporter(getHandlingPolicy(), 
      new CompilerOptions(opts), getProblemFactory()), false);
  if (fileName.toLowerCase().endsWith(IModule.MODULE_INFO_JAVA)) {
    
    ICompilationUnit cu = new CompilationUnit(null, fileName, null);
    CompilationResult compilationResult = new CompilationResult(cu, 0, 1, 10);
    CompilationUnitDeclaration unit = parser.parse(cu, compilationResult);
    if (unit.isModuleInfo() && unit.moduleDeclaration != null) {
      mod = new BasicModule(unit.moduleDeclaration, null);
    }
  } else if (fileName.toLowerCase().endsWith(IModule.MODULE_INFO_CLASS)) {
    try {
      ClassFileReader reader = ClassFileReader.read(fileName); // Check the absolute path?
      mod = reader.getModuleDeclaration();
    } catch (ClassFormatException | IOException e) {
      e.printStackTrace();
      throw new IllegalArgumentException(
          this.bind("configure.invalidModuleDescriptor", fileName)); //$NON-NLS-1$
    }
  }
  return mod;
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private IModule extractModuleDesc(String fileName) {
  IModule mod = null;
  // this.options may not be completely populated yet, and definitely not
  // validated. Make sure the source level is set for the parser
  Map<String,String> opts = new HashMap<String, String>(this.options);
  opts.put(CompilerOptions.OPTION_Source, this.options.get(CompilerOptions.OPTION_Compliance));
  Parser parser = new Parser(new ProblemReporter(getHandlingPolicy(), 
      new CompilerOptions(opts), getProblemFactory()), false);
  if (fileName.toLowerCase().endsWith(IModule.MODULE_INFO_JAVA)) {
    
    ICompilationUnit cu = new CompilationUnit(null, fileName, null);
    CompilationResult compilationResult = new CompilationResult(cu, 0, 1, 10);
    CompilationUnitDeclaration unit = parser.parse(cu, compilationResult);
    if (unit.isModuleInfo() && unit.moduleDeclaration != null) {
      mod = new BasicModule(unit.moduleDeclaration, null);
    }
  } else if (fileName.toLowerCase().endsWith(IModule.MODULE_INFO_CLASS)) {
    try {
      ClassFileReader reader = ClassFileReader.read(fileName); // Check the absolute path?
      mod = reader.getModuleDeclaration();
    } catch (ClassFormatException | IOException e) {
      e.printStackTrace();
      throw new IllegalArgumentException(
          this.bind("configure.invalidModuleDescriptor", fileName)); //$NON-NLS-1$
    }
  }
  return mod;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

private Parser getNewParser() {
  return new Parser(new ProblemReporter(getHandlingPolicy(), 
      new CompilerOptions(this.options), getProblemFactory()), false);
}
private IModule extractModuleDesc(String fileName) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

private Parser getNewParser() {
  return new Parser(new ProblemReporter(getHandlingPolicy(), 
      new CompilerOptions(this.options), getProblemFactory()), false);
}
private IModule extractModuleDesc(String fileName) {

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

new Compiler(
  environment,
  getHandlingPolicy(),
  this.compilerOptions,
  getBatchRequestor(),

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

new Compiler(
    environment,
    getHandlingPolicy(),
    this.compilerOptions,
    getBatchRequestor(),

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

new Compiler(
    environment,
    getHandlingPolicy(),
    this.compilerOptions,
    getBatchRequestor(),

相关文章