/** * Returns the problem factory to be used during evaluation. */ protected IProblemFactory getProblemFactory() { return ProblemFactory.getProblemFactory(Locale.getDefault()); } /**
/** * Returns the problem factory to be used during evaluation. */ protected IProblemFactory getProblemFactory() { return ProblemFactory.getProblemFactory(Locale.getDefault()); } /**
/** * Returns the problem factory to be used during evaluation. */ protected IProblemFactory getProblemFactory() { return ProblemFactory.getProblemFactory(Locale.getDefault()); } /**
/** * Returns the problem factory to be used during evaluation. */ protected IProblemFactory getProblemFactory() { return ProblemFactory.getProblemFactory(Locale.getDefault()); } /**
/** * Returns the problem factory to be used during evaluation. */ protected IProblemFactory getProblemFactory() { return ProblemFactory.getProblemFactory(Locale.getDefault()); } /**
/** * Returns the problem factory to be used during evaluation. */ protected IProblemFactory getProblemFactory() { return ProblemFactory.getProblemFactory(Locale.getDefault()); } /**
compilerOptions, this, ProblemFactory.getProblemFactory(Locale.getDefault())); CompilerOptions options = newCompiler.options;
compilerOptions, this, ProblemFactory.getProblemFactory(Locale.getDefault())); CompilerOptions options = newCompiler.options;
compilerOptions, this, ProblemFactory.getProblemFactory(Locale.getDefault())); CompilerOptions options = newCompiler.options;
compilerOptions, this, ProblemFactory.getProblemFactory(Locale.getDefault())); CompilerOptions options = newCompiler.options;
compilerOptions, this, ProblemFactory.getProblemFactory(Locale.getDefault())); CompilerOptions options = newCompiler.options;
compilerOptions, this, ProblemFactory.getProblemFactory(Locale.getDefault())); CompilerOptions options = newCompiler.options;
private static Compiler newCompiler(ModuleAccumulatorEnvironment environment, IJavaProject javaProject) { Map<String, String> projectOptions = javaProject.getOptions(true); CompilerOptions compilerOptions = new CompilerOptions(projectOptions); compilerOptions.performMethodsFullRecovery = true; compilerOptions.performStatementsRecovery = true; ICompilerRequestor requestor = new ICompilerRequestor() { @Override public void acceptResult(CompilationResult result) { // Nothing to do here } }; Compiler newCompiler = new Compiler( environment, DefaultErrorHandlingPolicies.proceedWithAllProblems(), compilerOptions, requestor, ProblemFactory.getProblemFactory(Locale.getDefault())); return newCompiler; } public static String[] getReferencedModules(IJavaProject project) throws CoreException {
private static Compiler newCompiler(ModuleAccumulatorEnvironment environment, IJavaProject javaProject) { Map<String, String> projectOptions = javaProject.getOptions(true); CompilerOptions compilerOptions = new CompilerOptions(projectOptions); compilerOptions.performMethodsFullRecovery = true; compilerOptions.performStatementsRecovery = true; ICompilerRequestor requestor = new ICompilerRequestor() { @Override public void acceptResult(CompilationResult result) { // Nothing to do here } }; Compiler newCompiler = new Compiler( environment, DefaultErrorHandlingPolicies.proceedWithAllProblems(), compilerOptions, requestor, ProblemFactory.getProblemFactory(Locale.getDefault())); return newCompiler; } public static String[] getReferencedModules(IJavaProject project) throws CoreException {
IProblemFactory problemFactory = ProblemFactory.getProblemFactory(Locale.getDefault()); Compiler compiler = new Compiler(namingEnvironment, errorHandlingPolicy, compilerOptions, this, problemFactory) { @Override
IProblemFactory problemFactory = ProblemFactory.getProblemFactory(Locale.getDefault()); Compiler compiler = new Compiler(namingEnvironment, errorHandlingPolicy, compilerOptions, this, problemFactory) { @Override
public byte[] compileWithAttributes(IModuleDescription module, Map<String,String> classFileAttributes) throws JavaModelException { IJavaProject javaProject = module.getJavaProject(); NameEnvironment nameEnvironment = new NameEnvironment(javaProject, CompilationGroup.MAIN); addModuleUpdates(module, nameEnvironment.moduleUpdater, classFileAttributes); ClasspathMultiDirectory sourceLocation = getSourceLocation(javaProject, nameEnvironment, module); IFile file = (IFile) module.getCompilationUnit().getCorrespondingResource(); ICompilationUnit[] sourceUnits = { new SourceFile(file, sourceLocation) }; BytecodeCollector collector = new BytecodeCollector(); Compiler newCompiler = new Compiler( nameEnvironment, DefaultErrorHandlingPolicies.exitOnFirstError(), new CompilerOptions(javaProject.getOptions(true)), collector, ProblemFactory.getProblemFactory(Locale.getDefault())); newCompiler.compile(sourceUnits); return collector.bytes; }
public byte[] compileWithAttributes(IModuleDescription module, Map<String,String> classFileAttributes) throws JavaModelException { IJavaProject javaProject = module.getJavaProject(); NameEnvironment nameEnvironment = new NameEnvironment(javaProject); addModuleUpdates(module, nameEnvironment.moduleUpdater, classFileAttributes); ClasspathMultiDirectory sourceLocation = getSourceLocation(javaProject, nameEnvironment, module); IFile file = (IFile) module.getCompilationUnit().getCorrespondingResource(); ICompilationUnit[] sourceUnits = { new SourceFile(file, sourceLocation) }; BytecodeCollector collector = new BytecodeCollector(); Compiler newCompiler = new Compiler( nameEnvironment, DefaultErrorHandlingPolicies.exitOnFirstError(), new CompilerOptions(javaProject.getOptions(true)), collector, ProblemFactory.getProblemFactory(Locale.getDefault())); newCompiler.compile(sourceUnits); return collector.bytes; }