From a154926a6a0ccc2a6a33c63e8fbc9898d29030e6 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 21 Aug 2003 15:12:56 +0000 Subject: [PATCH] Use the names of array's elements returned by CDI. --- debug/org.eclipse.cdt.debug.core/ChangeLog | 4 ++++ .../debug/internal/core/model/CVariable.java | 24 +------------------ 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index d1ff8221b5a..472b0430792 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,7 @@ +2003-08-21 Mikhail Khodjaiants + Use the names of array's elements returned by CDI. + * CVariable.java + 2003-08-20 Mikhail Khodjaiants Unable to terminate post mortem debugging session. Extended the 'CDebugTarget' class to overload the 'terminate' and 'canTerminate' methods. diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java index 9d2131a5d23..c5685cbd678 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java @@ -669,20 +669,7 @@ public abstract class CVariable extends CDebugElement { if ( fName == null ) { - String cdiName = ( fOriginal != null ) ? fOriginal.getCDIVariableObject().getName() : null; - fName = cdiName; - if ( cdiName != null && getParent() instanceof ICValue ) - { - CVariable parent = getParentVariable(); - while( parent instanceof CArrayPartition ) - { - parent = parent.getParentVariable(); - } - if ( parent instanceof CVariable && parent.getType().isArray() ) - { - fName = parent.getName() + '[' + cdiName + ']'; - } - } + fName = ( fOriginal != null ) ? fOriginal.getCDIVariableObject().getName() : null; } return fName; } @@ -934,15 +921,6 @@ public abstract class CVariable extends CDebugElement return ( "public".equals( getName() ) || "protected".equals( getName() ) || "private".equals( getName() ) ); } - private CVariable getParentVariable() throws DebugException - { - if ( getParent() instanceof CValue ) - return ((CValue)getParent()).getParentVariable(); - if ( getParent() instanceof CArrayPartitionValue ) - return ((CArrayPartitionValue)getParent()).getParentVariable(); - return null; - } - /* (non-Javadoc) * @see org.eclipse.cdt.debug.core.model.ICVariable#getType() */