mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug 291086 - Simpler fix.
This commit is contained in:
parent
cb12839f79
commit
11ef8f1b75
1 changed files with 3 additions and 16 deletions
|
@ -23,7 +23,6 @@ import org.eclipse.cdt.dsf.concurrent.CountingRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
|
import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
|
||||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.RequestMonitor.ICanceledListener;
|
|
||||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||||
import org.eclipse.cdt.dsf.ui.concurrent.SimpleDisplayExecutor;
|
import org.eclipse.cdt.dsf.ui.concurrent.SimpleDisplayExecutor;
|
||||||
import org.eclipse.cdt.dsf.ui.concurrent.ViewerDataRequestMonitor;
|
import org.eclipse.cdt.dsf.ui.concurrent.ViewerDataRequestMonitor;
|
||||||
|
@ -328,13 +327,9 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
|
||||||
// that should be handled. If there are, doHandleEvent calls itself
|
// that should be handled. If there are, doHandleEvent calls itself
|
||||||
// to process the next event in the queue.
|
// to process the next event in the queue.
|
||||||
assert queue.fCurrentEvent == null && queue.fCurrentRm == null;
|
assert queue.fCurrentEvent == null && queue.fCurrentRm == null;
|
||||||
|
|
||||||
// We intentionally do not give the client RM as the parent RM
|
queue.fCurrentEvent = eventInfo;
|
||||||
// for the queue.fCurrentRm. This is because fCurrentRm may get
|
queue.fCurrentRm = new RequestMonitor(getExecutor(), eventInfo.fClientRm) {
|
||||||
// canceled if a new event comes and overrides it. If client RM
|
|
||||||
// was the parent, it would lead to the inconsistent situation where
|
|
||||||
// a sub-RM is canceled but the parent is not.
|
|
||||||
final RequestMonitor queueRm = new RequestMonitor(getExecutor(), null) {
|
|
||||||
@Override
|
@Override
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
eventInfo.fClientRm.done();
|
eventInfo.fClientRm.done();
|
||||||
|
@ -346,14 +341,6 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
eventInfo.fClientRm.addCancelListener(new ICanceledListener() {
|
|
||||||
public void requestCanceled(RequestMonitor rm) {
|
|
||||||
queueRm.cancel();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
queue.fCurrentEvent = eventInfo;
|
|
||||||
queue.fCurrentRm = queueRm;
|
|
||||||
handleEvent(proxyStrategy, eventInfo.fEvent, queue.fCurrentRm);
|
handleEvent(proxyStrategy, eventInfo.fEvent, queue.fCurrentRm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue