mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Implementation of array partitions.
This commit is contained in:
parent
d9185d633c
commit
a3edd4621d
5 changed files with 20 additions and 17 deletions
|
@ -56,13 +56,6 @@ public class CArrayEntryVariable extends CLocalVariable
|
|||
return stripBrackets( super.getReferenceTypeName() );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvent(ICDIEvent)
|
||||
*/
|
||||
public void handleDebugEvent(ICDIEvent event)
|
||||
{
|
||||
}
|
||||
|
||||
protected int getIndex()
|
||||
{
|
||||
return fIndex;
|
||||
|
|
|
@ -121,7 +121,7 @@ public class CArrayPartition extends CVariable
|
|||
}
|
||||
else
|
||||
{
|
||||
var = new CArrayPartition( target, cdiVars.subList( start, start + perSlot - 1 ), start, start + perSlot - 1 );
|
||||
var = new CArrayPartition( target, cdiVars.subList( start, start + perSlot ), start, start + perSlot - 1 );
|
||||
}
|
||||
children.add( var );
|
||||
start += perSlot;
|
||||
|
|
|
@ -98,7 +98,8 @@ public class CArrayPartitionValue extends CDebugElement implements ICValue
|
|||
if ( fVariables.isEmpty() )
|
||||
{
|
||||
fVariables = new ArrayList( getEnd() - getStart() + 1 );
|
||||
for ( int i = getStart(); i < getEnd(); ++i ) {
|
||||
for ( int i = getStart(); i <= getEnd(); ++i )
|
||||
{
|
||||
fVariables.add( new CArrayEntryVariable( (CDebugTarget)getDebugTarget(), (ICDIVariable)fCDIVariables.get( i - getStart() ), i ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,15 +239,19 @@ public class CValue extends CDebugElement implements ICValue
|
|||
{
|
||||
fValueString = null;
|
||||
}
|
||||
/*
|
||||
if ( hasVariables() )
|
||||
Iterator it = fVariables.iterator();
|
||||
while( it.hasNext() )
|
||||
{
|
||||
IVariable[] vars = getVariables();
|
||||
for ( int i = 0; i < vars.length; ++i )
|
||||
{
|
||||
((CVariable)vars[i]).setChanged( changed );
|
||||
}
|
||||
((CVariable)it.next()).setChanged( changed );
|
||||
}
|
||||
}
|
||||
|
||||
protected void dispose()
|
||||
{
|
||||
Iterator it = fVariables.iterator();
|
||||
while( it.hasNext() )
|
||||
{
|
||||
((CVariable)it.next()).dispose();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.core.model;
|
|||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||
import org.eclipse.cdt.debug.core.ICValue;
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
|
||||
|
@ -195,6 +196,10 @@ public abstract class CVariable extends CDebugElement
|
|||
|
||||
protected void dispose()
|
||||
{
|
||||
if ( fValue != null )
|
||||
{
|
||||
((CValue)fValue).dispose();
|
||||
}
|
||||
getCDISession().getEventManager().removeEventListener( this );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue