mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
[289766] Bug tracing VM Provider event handler
This commit is contained in:
parent
e78518838c
commit
7178ea09de
1 changed files with 6 additions and 4 deletions
|
@ -271,10 +271,8 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
|
|||
}
|
||||
if (!fProxyEventQueues.containsKey(proxyStrategy)) {
|
||||
fProxyEventQueues.put(proxyStrategy, new ModelProxyEventQueue());
|
||||
if (DEBUG_DELTA && (DEBUG_PRESENTATION_ID == null || getPresentationContext().getId().equals(DEBUG_PRESENTATION_ID))) {
|
||||
DsfUIPlugin.debug("eventQueued(proxyRoot = " + proxyStrategy.getRootElement() + ", event = " + event + ")" ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
}
|
||||
// If the event queue is empty, directly handle the new event. Otherwise queue it.
|
||||
final ModelProxyEventQueue queue = fProxyEventQueues.get(proxyStrategy);
|
||||
if (queue.fCurrentEvent != null) {
|
||||
assert queue.fCurrentRm != null;
|
||||
|
@ -304,6 +302,10 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
|
|||
}
|
||||
queue.fCurrentRm.cancel();
|
||||
}
|
||||
|
||||
if (DEBUG_DELTA && (DEBUG_PRESENTATION_ID == null || getPresentationContext().getId().equals(DEBUG_PRESENTATION_ID))) {
|
||||
DsfUIPlugin.debug("eventQueued(proxyRoot = " + proxyStrategy.getRootElement() + ", event = " + event + ")" ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
queue.fEventQueue.add(new EventInfo(event, crm));
|
||||
} else {
|
||||
doHandleEvent(queue, proxyStrategy, new EventInfo(event, crm));
|
||||
|
@ -313,7 +315,7 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
|
|||
}
|
||||
}
|
||||
|
||||
// Clean up model proxies that were removed.
|
||||
// Discard the event queues of proxies that have been removed
|
||||
List<IVMModelProxy> activeProxies = getActiveModelProxies();
|
||||
for (Iterator<IVMModelProxy> itr = fProxyEventQueues.keySet().iterator(); itr.hasNext();) {
|
||||
if (!activeProxies.contains(itr.next())) {
|
||||
|
|
Loading…
Add table
Reference in a new issue