[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Wait for build to complete and check if errors
|
> In my plugin, I have created some C/C++ projects (essentially, an
> Import) and then build the workspace using:
> workspace.build(IncrementalProjectBuilder.CLEAN_BUILD, monitor).
>
> I want to wait for the build to complete and then check to see if there
> were any build errors. How can I detect when the build has completed?
> The call above starts a build asynchronously.
>
> To check for errors, I am iterating through each project in the
> workspace and calling:
> project.findMaxProblemSeverity();
> Is this the 'right' way to check for build errors? Is there a better way?
As far as I can see the workspace.build() call is not asynchronous,
isn't the problem perhaps that you are doing a CLEAN_BUILD. This
normally only clears the build state for a project, but if you happen to
have 'Build Automatically' enabled it probably does trigger a build that
appears to be asynchronous.