Build the project without showing compile errors (pass/fail status) to the user
Answered
I am using following code to build the project but if there are compile errors it shows the compile errors to the user in tool window. Is there a method to build the project without showing any pass/fail status .
final CompileStatusNotification callback = new CompileStatusNotification() {
@Override
public void finished(boolean aborted, int errors, int warnings, CompileContext compileContext) {
if ((errors == 0) && !aborted) {
//Do Something
}
}
};
CompilerManager.getInstance(Project).make(compileScope, callback);
Please sign in to leave a comment.
Hi Lakshan,
> Is there a method to build the project without showing any pass/fail status .
In general, there is no API for this. The API you mention just invokes the build process as if you used the Build Project action.
CompilerManager also has the "compileJavaCode" call, which is a pretty low-level one, allowing you to compile particular files "in memory". This call does not produce any output to UI, all errors are reported in the CompilationException.
Thanks Eugene