1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 10:25:32 +02:00

In the 'getVariableText' and 'getVariableImage' methods of CDTDebugModelPresentation ignore exceptions thrown by getType.

This commit is contained in:
Mikhail Khodjaiants 2003-06-20 21:58:16 +00:00
parent 109d948e1f
commit 40e2cbf0b0
2 changed files with 23 additions and 2 deletions

View file

@ -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 2003-06-20 Mikhail Khodjaiants
Variable bookkeeping (phase 0.1). Variable bookkeeping (phase 0.1).
The 'Enable' and 'Disable' actions added to the Variables view. The 'Enable' and 'Disable' actions added to the Variables view.

View file

@ -544,7 +544,15 @@ public class CDTDebugModelPresentation extends LabelProvider
StringBuffer label = new StringBuffer(); StringBuffer label = new StringBuffer();
if ( var instanceof ICVariable ) 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() ) if ( type != null && isShowVariableTypeNames() )
{ {
String typeName = getVariableTypeName( type ); String typeName = getVariableTypeName( type );
@ -872,7 +880,15 @@ public class CDTDebugModelPresentation extends LabelProvider
{ {
if ( element instanceof ICVariable ) 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() ) ) if ( type != null && ( type.isArray() || type.isStructure() ) )
return fDebugImageRegistry.get( ( ((ICVariable)element).isEnabled() ) ? return fDebugImageRegistry.get( ( ((ICVariable)element).isEnabled() ) ?
CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE : CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE_DISABLED ); CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE : CDebugImages.DESC_OBJS_VARIABLE_AGGREGATE_DISABLED );