mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 17:25:38 +02:00
Trivial refactoring and comments.
This commit is contained in:
parent
73111db72e
commit
14717d43de
1 changed files with 9 additions and 3 deletions
|
@ -325,19 +325,25 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doHandleEvent(final ModelProxyEventQueue queue, final IVMModelProxy proxyStrategy, final EventInfo eventInfo) {
|
private void doHandleEvent(final ModelProxyEventQueue queue, final IVMModelProxy proxyStrategy, final EventInfo eventInfo) {
|
||||||
|
// Do handle event is a sort of a recursive asynchronous method. It
|
||||||
|
// calls the asynchronous handleEvent() to process the event from the
|
||||||
|
// eventInfo argument. When handleEvent() completes, this method
|
||||||
|
// (doHandleEvent) checks whether there is any more events in the queue
|
||||||
|
// that should be handled. If there are, doHandleEvent calls itself
|
||||||
|
// to process the next event in the queue.
|
||||||
assert queue.fCurrentEvent == null && queue.fCurrentRm == null;
|
assert queue.fCurrentEvent == null && queue.fCurrentRm == null;
|
||||||
|
|
||||||
queue.fCurrentEvent = eventInfo;
|
queue.fCurrentEvent = eventInfo;
|
||||||
queue.fCurrentRm = new RequestMonitor(getExecutor(), null) {
|
queue.fCurrentRm = new RequestMonitor(getExecutor(), null) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
|
eventInfo.fClientRm.done();
|
||||||
queue.fCurrentEvent = null;
|
queue.fCurrentEvent = null;
|
||||||
queue.fCurrentRm = null;
|
queue.fCurrentRm = null;
|
||||||
if (!queue.fEventQueue.isEmpty()) {
|
if (!queue.fEventQueue.isEmpty()) {
|
||||||
EventInfo eventInfo = queue.fEventQueue.remove(0);
|
EventInfo nextEventInfo = queue.fEventQueue.remove(0);
|
||||||
doHandleEvent(queue, proxyStrategy, eventInfo);
|
doHandleEvent(queue, proxyStrategy, nextEventInfo);
|
||||||
}
|
}
|
||||||
eventInfo.fClientRm.done();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handleEvent(proxyStrategy, eventInfo.fEvent, queue.fCurrentRm);
|
handleEvent(proxyStrategy, eventInfo.fEvent, queue.fCurrentRm);
|
||||||
|
|
Loading…
Add table
Reference in a new issue