From 4e76360ada0b9aab553430fb30fbaa0476de3834 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Tue, 19 Aug 2003 20:55:58 +0000 Subject: [PATCH] Fix for the getQualifiedName() for GDB fake categories. --- .../cdt/debug/mi/core/cdi/model/Variable.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java index 4b564c43885..9ba97c5d621 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java @@ -189,22 +189,20 @@ public class Variable extends VariableObject implements ICDIVariable { // - public // - y // So we choose to ignore the first set of children - // but carry over to those "fake" variable the typename and the qualified name - if (isFake()) { - qName = "(" + getQualifiedName() + ")." + vars[i].getExp(); - } else { - // So if the child is something like "public", "private" ... - // carrry over the parent qualified name and the typename - // also flag it as a fake variable. - qName = getQualifiedName(); - childTypename = typename; + // but carry over to those "fake" variables the typename and the qualified name + if (!isFake() + || (isFake() && !(name.equals("private") || name.equals("public") || name.equals("protected")))) { childFake = true; + childTypename = getTypeName(); + } else { + qName = "(" + getQualifiedName() + ")." + vars[i].getExp(); } - } else { + } else { // If not C++ language qName = "(" + getQualifiedName() + ")." + vars[i].getExp(); } } - Variable v = new Variable(getTarget(), vars[i].getExp(), qName, getStackFrame(), getPosition(), getStackDepth(), vars[i]); + Variable v = + new Variable(getTarget(), vars[i].getExp(), qName, getStackFrame(), getPosition(), getStackDepth(), vars[i]); if (childTypename != null) { // Hack to reset the typename to a known value v.typename = childTypename;