From 1d1df828972e29c1142856fff2a286f165829450 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Wed, 4 Aug 2004 21:37:48 +0000 Subject: [PATCH] Fix for bug 69085: Arrays in the Expressions view. --- debug/org.eclipse.cdt.debug.core/ChangeLog | 4 ++++ .../internal/core/model/CArrayPartitionValue.java | 4 ++-- debug/org.eclipse.cdt.debug.ui/ChangeLog | 4 ++++ .../debug/internal/ui/CDTDebugModelPresentation.java | 10 ++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index d7a18150eeb..15a8b7a20cf 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,7 @@ +2004-08-04 Mikhail Khodjaiants + Fix for bug 69085: Arrays in the Expressions view + * CArrayPartitionValue.java + 2004-06-29 Alain Magloire Do not use the cache stackframe. diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartitionValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartitionValue.java index f17521d9643..5c533eb7ca5 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartitionValue.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartitionValue.java @@ -66,7 +66,7 @@ public class CArrayPartitionValue extends CDebugElement implements ICValue */ public String getReferenceTypeName() throws DebugException { - return null; + return ( getParentVariable() != null ) ? getParentVariable().getReferenceTypeName() : null; } /* (non-Javadoc) @@ -74,7 +74,7 @@ public class CArrayPartitionValue extends CDebugElement implements ICValue */ public String getValueString() throws DebugException { - return null; + return ""; //$NON-NLS-1$ } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 173d5441467..e063b3a8223 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,7 @@ +2004-08-04 Mikhail Khodjaiants + Fix for bug 69085: Arrays in the Expressions view + * CDTDebugModelPresentation.java + 2004-07-15 Mikhail Khodjaiants Fix for bug 70147. TVT3.0: Preferences CDT Editor has non-externalized string. * plugin.properties diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java index 246acad0615..d826d7e8090 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDTDebugModelPresentation.java @@ -478,6 +478,16 @@ public class CDTDebugModelPresentation extends LabelProvider implements IDebugMo if ( valueString.length() > 0 ) { result.append( " = " ).append( valueString ); //$NON-NLS-1$ } + if ( isShowVariableTypeNames() ) { + String type = null; + try { + type = value.getReferenceTypeName(); + } + catch( DebugException e ) { + } + if ( !isEmpty( type ) ) + result.insert( 0, type + ' ' ); + } } } if ( !expression.isEnabled() ) {