mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
monitor.setCancelled() is accessing the UI thread
which is illegal and can throw an SWT illegal access exception. IProgressMonitor should probably be fix .. but meanwhile ...
This commit is contained in:
parent
1c6c93560a
commit
68beea8757
1 changed files with 5 additions and 7 deletions
|
@ -93,7 +93,6 @@ public class CBuilder extends ACBuilder {
|
|||
|
||||
private boolean invokeMake(boolean fullBuild, IProgressMonitor monitor) {
|
||||
boolean isClean = false;
|
||||
boolean isCanceled = false;
|
||||
IProject currProject = getProject();
|
||||
SubProgressMonitor subMonitor = null;
|
||||
|
||||
|
@ -157,13 +156,13 @@ public class CBuilder extends ACBuilder {
|
|||
if (launcher.waitAndRead(stdout, stderr, subMonitor) != CommandLauncher.OK)
|
||||
errMsg = launcher.getErrorMessage();
|
||||
|
||||
isCanceled = monitor.isCanceled();
|
||||
monitor.setCanceled(false);
|
||||
subMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN);
|
||||
subMonitor.subTask("Refresh From Local");
|
||||
subMonitor.setTaskName("Refresh From Local");
|
||||
|
||||
try {
|
||||
currProject.refreshLocal(IResource.DEPTH_INFINITE, subMonitor);
|
||||
// do not allow the cancel of the refresh, since the builder is external
|
||||
// to Eclipse files may have been created/modified and we will be out-of-sync
|
||||
// The caveat is for hugue projects, it may take sometimes at every build.
|
||||
currProject.refreshLocal(IResource.DEPTH_INFINITE, null);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
|
||||
|
@ -188,7 +187,6 @@ public class CBuilder extends ACBuilder {
|
|||
epm.reportProblems();
|
||||
|
||||
subMonitor.done();
|
||||
monitor.setCanceled(isCanceled);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CCorePlugin.log(e);
|
||||
|
|
Loading…
Add table
Reference in a new issue