1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Use the names of array's elements returned by CDI.

This commit is contained in:
Mikhail Khodjaiants 2003-08-21 15:12:56 +00:00
parent 5cd6a01bd6
commit a154926a6a
2 changed files with 5 additions and 23 deletions

View file

@ -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.

View file

@ -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()
*/