diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 108d0a802a4..62e579e20f6 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,8 @@ +2003-06-20 Mikhail Khodjaiants + In the 'getVariableText' and 'getVariableImage' methods of CDTDebugModelPresentation + ignore exceptions thrown by getType. + * CDTDebugModelPresentation.java + 2003-06-20 Mikhail Khodjaiants Variable bookkeeping (phase 0.1). The 'Enable' and 'Disable' actions added to the Variables view. 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 5256f6cbccc..9bd6d8cff10 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 @@ -544,7 +544,15 @@ public class CDTDebugModelPresentation extends LabelProvider StringBuffer label = new StringBuffer(); if ( var instanceof ICVariable ) { - ICType type = ((ICVariable)var).getType(); + ICType type = null; + try + { + type = ((ICVariable)var).getType(); + } + catch( DebugException e ) + { + // don't display type + } if ( type != null && isShowVariableTypeNames() ) { String typeName = getVariableTypeName( type ); @@ -872,7 +880,15 @@ public class CDTDebugModelPresentation extends LabelProvider { if ( element instanceof ICVariable ) { - ICType type = ((ICVariable)element).getType(); + ICType type = null; + try + { + type = ((ICVariable)element).getType(); + } + catch( DebugException e ) + { + // use default image + } if ( type != null && ( type.isArray() || type.isStructure() ) ) return fDebugImageRegistry.get( ( ((ICVariable)element).isEnabled() ) ? CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE : CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE_DISABLED );