Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Burns2005-01-11 19:39:07 +0000
committerJared Burns2005-01-11 19:39:07 +0000
commit268e1187b9081884150e22a3dfa16415e5259fdb (patch)
tree9d3bb2ae5ce95ba727cfeaa0c0c2221ca75594d8
parent470b2714e490475233cee237c327954e3b7d0270 (diff)
downloadeclipse.platform.debug-268e1187b9081884150e22a3dfa16415e5259fdb.tar.gz
eclipse.platform.debug-268e1187b9081884150e22a3dfa16415e5259fdb.tar.xz
eclipse.platform.debug-268e1187b9081884150e22a3dfa16415e5259fdb.zip
Bug 82278 - Logical structure: "value" mode should be elegible for recursive logical structure processing
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewContentProvider.java25
1 files changed, 21 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewContentProvider.java
index 355760cc3..9465120a3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewContentProvider.java
@@ -184,14 +184,29 @@ public class VariablesViewContentProvider implements ITreeContentProvider {
}
return partitionSize;
}
+
+ /**
+ * Returns any logical value for the raw value.
+ *
+ * @param value
+ * @return
+ */
+ private IValue getLogicalValue(IValue value) {
+ return getLogicalValue(value, new ArrayList());
+ }
/**
- * Returns any logical value for the raw value.
+ * Returns any logical value for the raw value. This method will recurse
+ * over the returned value until the same structure is encountered again
+ * (to avoid infinite recursion).
*
* @param value
+ * @param previousStructureIds the list of logical structures that have already
+ * been applied to the returned value during the recursion of this method. Callers
+ * should always pass in a new, empty list.
* @return
*/
- private IValue getLogicalValue(IValue value) {
+ private IValue getLogicalValue(IValue value, List previousStructureIds) {
if (isShowLogicalStructure()) {
ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value);
if (types.length > 0) {
@@ -217,9 +232,11 @@ public class VariablesViewContentProvider implements ITreeContentProvider {
// choose first by default
store.setValue(VariablesView.LOGICAL_STRUCTURE_TYPE_PREFIX + type.getId(), 1);
}
- if (type != null) {
+ if (type != null && !previousStructureIds.contains(type.getId())) {
try {
- return type.getLogicalStructure(value);
+ value= type.getLogicalStructure(value);
+ previousStructureIds.add(type.getId());
+ return getLogicalValue(value, previousStructureIds);
} catch (CoreException e) {
// unable to display logical structure
}

Back to the top