Skip to content

Commit

Permalink
ApiAnalysisApplication should wait until jobs are done
Browse files Browse the repository at this point in the history
As part of the build probabbly other jobs are sceduled, the
ApiAnalysisApplication should wait for all jobs to complete before
investigate error markers to prevent problems with outdated states.
  • Loading branch information
laeubi committed Aug 16, 2023
1 parent 2293b21 commit c71d0c1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ public Object start(IApplicationContext context) throws Exception {
setTargetPlatform(args.tpFile);

project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
// wait untill all jobs has finished that might be sceduled as part of the
// build...
while (!Job.getJobManager().isIdle()) {
Thread.yield();
}
IMarker[] allProblemMarkers = project.findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
Predicate<IMarker> isAPIMarker = marker -> {
try {
Expand Down

0 comments on commit c71d0c1

Please sign in to comment.