Community
Participate
Working Groups
After the first build the progress monitor bar is always at 100%. Build cancelling does not work.
Problem #1 (progress monitor always 100%) ----------------------------------------- This problem only occurs if a build is carried out with the default build configuration file. With a user-specified build config file the progress monitor bar moves smoothly left to right. Cause of this is a call to IResource::refreshLocal() in the writeBuildConfig() method of org.eclipse.ajdt.internal.builder.Builder that incorrectly passes in the IProgressMonitor for the build. Instead of passing in the build monitor, *should* be passing in a null (to signify we don't want any monitoring of the refresh task). The writeBuildConfig() method only gets called when building with the default build config file. Patch emailed separately to Andy Clement. Problem #2 (cancel button doesn't work) --------------------------------------- Looks like we do not check the IProgressMonitor to see if it is in the cancel state. Suggest we poll the build monitor from inside the while loop of the waitForBuildCompletion() method in org.eclipse.ajdt.internal.builder.Builder. That is, call the IProgressMonitor::isCanceled() operation on the build monitor and, if it returns true, throw a org.eclipse.core.runtime. OperationCanceledException exception. At a first pass, we can catch this exception in the org.eclipse.ajdt.internal.builder.Builder's build() method and log the fact that the build has been cancelled. Is there anything that we need to add into this catch block ? Patch emailed separately to Andy Clement.
Andy and I have discussed the "build cancel" side of this bug report and agreed that my patch only goes so far in remedying the situation : throwing and catching the OperationCancelledException will kill the build progress dialogue but the compiler still will still keep rumbling on in the background until it has finished its work. It looks like what is required here is a means of notifying the compiler that the build should be terminated. The abortBuild() method of org.aspectj.ajde.internal.AspectJBuildManager looks like it *ought* to be the desired mechanism. Mik, can you confirm that calling this is what is required ? Plus, are there any other "clean up" calls that need to be made following on from this call ?
The AJDT side of this is now as complete as can be until AspectJ supports the cancellation of a running build. Thanks to George for the patch.