Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2012-04-09 17:57:57 +0000
committerPawel Piech2012-04-09 17:57:57 +0000
commitd8d9bfa70f875a276bd38beba92329bfa1c872c5 (patch)
tree43d44e6754c01ea0d6d8a8cdfd38398627e03729 /org.eclipse.debug.ui/ui/org/eclipse
parentb5b70dd28365c6c1d984a5842c601e788bcf65cf (diff)
downloadeclipse.platform.debug-d8d9bfa70f875a276bd38beba92329bfa1c872c5.tar.gz
eclipse.platform.debug-d8d9bfa70f875a276bd38beba92329bfa1c872c5.tar.xz
eclipse.platform.debug-d8d9bfa70f875a276bd38beba92329bfa1c872c5.zip
Fixed busy state in variables view when switching frames rapidly.
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
index 386fe8c38..20057d563 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
@@ -104,6 +104,12 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
private ListenerList fUpdateListeners = new ListenerList();
/**
+ * Flag indicating whether we are currently in a model sequence.
+ * @see IViewerUpdateListener
+ */
+ private boolean fModelSequenceRunning = false;
+
+ /**
* Map of updates in progress: element path -> list of requests
*/
private Map fRequestsInProgress = new HashMap();
@@ -194,7 +200,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (newInput != null) {
installModelProxy(newInput, TreePath.EMPTY);
fStateTracker.restoreViewerState(newInput);
- }
+ }
}
public void addViewerUpdateListener(IViewerUpdateListener listener) {
@@ -579,14 +585,14 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
void updateStarted(ViewerUpdateMonitor update) {
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
- boolean begin = fRequestsInProgress.isEmpty();
List requests = (List) fRequestsInProgress.get(update.getSchedulingPath());
if (requests == null) {
requests = new ArrayList();
fRequestsInProgress.put(update.getSchedulingPath(), requests);
}
requests.add(update);
- if (begin) {
+ if (!fModelSequenceRunning) {
+ fModelSequenceRunning = true;
if (DebugUIPlugin.DEBUG_UPDATE_SEQUENCE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("MODEL SEQUENCE BEGINS"); //$NON-NLS-1$
}
@@ -647,7 +653,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
fRequestsInProgress.remove(update.getSchedulingPath());
}
}
- if (fRequestsInProgress.isEmpty() && fWaitingRequests.isEmpty()) {
+ if (fRequestsInProgress.isEmpty() && fWaitingRequests.isEmpty() && fModelSequenceRunning) {
+ fModelSequenceRunning = false;
if (DebugUIPlugin.DEBUG_UPDATE_SEQUENCE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("MODEL SEQUENCE ENDS"); //$NON-NLS-1$
}

Back to the top