Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUmair Sair2019-08-19 15:11:55 +0000
committerAlexander Kurtakov2019-10-16 05:34:19 +0000
commit658539c340ae95767b0b9f63c9a973b072276200 (patch)
tree8fd71b83f30519f9e9cff4a1c95fa1ddc619d1c7 /org.eclipse.debug.ui/ui/org/eclipse
parent645ef1bda6a975fcdf23cc96ee616ec469f55d7f (diff)
downloadeclipse.platform.debug-658539c340ae95767b0b9f63c9a973b072276200.tar.gz
eclipse.platform.debug-658539c340ae95767b0b9f63c9a973b072276200.tar.xz
eclipse.platform.debug-658539c340ae95767b0b9f63c9a973b072276200.zip
Bug 550220 Sometimes incomplete stack is shown for threads that were
expanded before resume CheckState model delta visitor removes delta if parent flags are NO_CHANGE and there are no pending updates reported for it from content provider. In case of this bug, the updates for elements (threads in view) are a bit late and CheckState visitor removes that delta. The removal of delta causes improper view like expanded thread with only one frame. Change-Id: Ia1d33d6e59db285dbd6c1acf4503b7406809ecdb Signed-off-by: Umair Sair <umair_sair@hotmail.com>
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/ViewerStateTracker.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
index 168ac1b6a..e750002ea 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
@@ -11,6 +11,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
+ * Umair Sair (Mentor Graphics) - Bug 550220
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.model;
@@ -84,13 +85,6 @@ class ViewerStateTracker {
static final int STATE_RESTORE_SEQUENCE_COMPLETE = 7;
/**
- * Dummy marker element used in the state delta. The marker indicates that a
- * given element in the pending state delta has been removed. It replaces
- * the original element so that it may optionally be garbage collected.
- */
- private final static String ELEMENT_REMOVED = "ELEMENT_REMOVED"; //$NON-NLS-1$
-
- /**
* Collector of memento encoding requests.
*/
interface IElementMementoCollector {
@@ -1035,7 +1029,7 @@ class ViewerStateTracker {
if (flags != IModelDelta.NO_CHANGE) {
IModelDelta parentDelta = delta.getParentDelta();
- // Remove the delta if :
+ // Do not visit children if :
// - The parent delta has no more flags on it (the content flag is removed as well),
// which means that parent element's children have been completely exposed.
// - There are no more pending updates for the element.
@@ -1045,7 +1039,6 @@ class ViewerStateTracker {
if ( !fContentProvider.areElementUpdatesPending(deltaPath) &&
(!(delta.getElement() instanceof IMemento) || !areMementoUpdatesPending(delta)) )
{
- removeDelta(delta);
return false;
}
}
@@ -1070,20 +1063,6 @@ class ViewerStateTracker {
}
return false;
}
-
- private void removeDelta(IModelDelta delta) {
- if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
- DebugUIPlugin.trace("\tRESTORE REMOVED: " + delta.getElement()); //$NON-NLS-1$
- }
-
- delta.accept((_visitorDelta, depth) -> {
- ModelDelta visitorDelta = (ModelDelta) _visitorDelta;
- visitorDelta.setElement(ELEMENT_REMOVED);
- visitorDelta.setFlags(IModelDelta.NO_CHANGE);
- return true;
- });
-
- }
}
CheckState state = new CheckState();

Back to the top