org.eclipse.jdt.core.compiler.CompilationProgress Java Examples
The following examples show how to use
org.eclipse.jdt.core.compiler.CompilationProgress.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Main.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
protected void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map customDefaultOptions, CompilationProgress compilationProgress) { this.logger = new Logger(this, outWriter, errWriter); this.proceed = true; this.out = outWriter; this.err = errWriter; this.systemExitWhenFinished = systemExit; this.options = new CompilerOptions().getMap(); this.ignoreOptionalProblemsFromFolders = null; this.progress = compilationProgress; if (customDefaultOptions != null) { this.didSpecifySource = customDefaultOptions.get(CompilerOptions.OPTION_Source) != null; this.didSpecifyTarget = customDefaultOptions.get(CompilerOptions.OPTION_TargetPlatform) != null; for (Iterator iter = customDefaultOptions.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); this.options.put(entry.getKey(), entry.getValue()); } } else { this.didSpecifySource = false; this.didSpecifyTarget = false; } this.classNames = null; }
Example #2
Source File: EclipseCompilerImpl.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
@Override protected void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map customDefaultOptions, CompilationProgress compilationProgress) { super.initialize(outWriter, errWriter, systemExit, customDefaultOptions, compilationProgress); this.javaFileObjectMap = new HashMap<CompilationUnit, JavaFileObject>(); }
Example #3
Source File: Main.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public static boolean compile(String[] commandLineArguments, PrintWriter outWriter, PrintWriter errWriter, CompilationProgress progress) { return new Main(outWriter, errWriter, false /* systemExit */, null /* options */, progress).compile(commandLineArguments); }
Example #4
Source File: Main.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public Main(PrintWriter outWriter, PrintWriter errWriter, boolean systemExitWhenFinished, Map customDefaultOptions, CompilationProgress compilationProgress) { this.initialize(outWriter, errWriter, systemExitWhenFinished, customDefaultOptions, compilationProgress); this.relocalize(); }
Example #5
Source File: Compiler.java From APDE with GNU General Public License v2.0 | 4 votes |
@Override public void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map customDefaultOptions, CompilationProgress compilationProgress) { super.initialize(outWriter, errWriter, systemExit, customDefaultOptions, compilationProgress); }
Example #6
Source File: BatchCompiler.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 2 votes |
/** * Invokes the Eclipse Compiler for Java with the given command line arguments, using the given writers * to print messages, and reporting progress to the given compilation progress. Returns whether * the compilation completed successfully. * <p> * Reasons for a compilation failing to complete successfully include:</p> * <ul> * <li>an error was reported</li> * <li>a runtime exception occurred</li> * <li>the compilation was canceled using the compilation progress</li> * </ul> * <p> * The specification of the command line arguments is defined by running the batch compiler's help * <pre>BatchCompiler.compile("-help", new PrintWriter(System.out), new PrintWriter(System.err), null);</pre> * </p> * * @param commandLine the command line arguments passed to the compiler * @param outWriter the writer used to print standard messages * @param errWriter the writer used to print error messages * @param progress the object to report progress to and to provide cancellation, or <code>null</code> if no progress is needed * @return whether the compilation completed successfully */ public static boolean compile(String commandLine, PrintWriter outWriter, PrintWriter errWriter, CompilationProgress progress) { return compile(Main.tokenize(commandLine), outWriter, errWriter, progress); }
Example #7
Source File: BatchCompiler.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 2 votes |
/** * Invokes the Eclipse Compiler for Java with the given command line arguments, using the given writers * to print messages, and reporting progress to the given compilation progress. Returns whether * the compilation completed successfully. * <p> * Reasons for a compilation failing to complete successfully include:</p> * <ul> * <li>an error was reported</li> * <li>a runtime exception occurred</li> * <li>the compilation was canceled using the compilation progress</li> * </ul> * <p> * The specification of the command line arguments is defined by running the batch compiler's help * <pre>BatchCompiler.compile("-help", new PrintWriter(System.out), new PrintWriter(System.err), null);</pre> * </p> * Note that a <code>true</code> returned value indicates that no errors were reported, no runtime exceptions * occurred and that the compilation was not canceled. * * @param commandLineArguments the command line arguments passed to the compiler * @param outWriter the writer used to print standard messages * @param errWriter the writer used to print error messages * @param progress the object to report progress to and to provide cancellation, or <code>null</code> if no progress is needed * @return whether the compilation completed successfully */ public static boolean compile(String[] commandLineArguments, PrintWriter outWriter, PrintWriter errWriter, CompilationProgress progress) { return Main.compile(commandLineArguments, outWriter, errWriter, progress); }