1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Added the 'setChanged' method to ICValue.

This method should common for CValue and CArrayPartitionValue to implement 'setChanged' of CVariable correctly.
This commit is contained in:
Mikhail Khodjaiants 2002-12-04 21:34:31 +00:00
parent 188f0ec34c
commit cc16047077
4 changed files with 26 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2002-12-04 Mikhail Khodjaiants
Added the 'setChanged' method to ICValue. This method should common for CValue and
CArrayPartitionValue to implement 'setChanged' of CVariable correctly.
* ICValue.java
* CArrayPartitionValue.java
* CVariable.java
2002-12-02 Mikhail Khodjaiants
Refactoring - files moved from org.eclipse.cdt.debug.core to the new package: org.eclipse.cdt.debug.core.model:
* ICBreakpoint.java

View file

@ -7,6 +7,7 @@
package org.eclipse.cdt.debug.core.model;
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IValue;
/**
@ -38,4 +39,6 @@ public interface ICValue extends IValue
* Returns the underlying CDI value for this value.
*/
ICDIValue getUnderlyingValue();
void setChanged( boolean changed ) throws DebugException;
}

View file

@ -8,6 +8,7 @@ package org.eclipse.cdt.debug.internal.core.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
@ -123,4 +124,16 @@ public class CArrayPartitionValue extends CDebugElement implements ICValue
{
return fEnd;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.model.ICValue#setChanged(boolean)
*/
public void setChanged( boolean changed ) throws DebugException
{
Iterator it = fVariables.iterator();
while( it.hasNext() )
{
((CVariable)it.next()).setChanged( changed );
}
}
}

View file

@ -224,10 +224,10 @@ public abstract class CVariable extends CDebugElement
protected synchronized void setChanged( boolean changed ) throws DebugException
{
if ( getValue() != null )
if ( getValue() != null && getValue() instanceof ICValue )
{
((CValue)getValue()).setChanged( changed );
if ( !getValue().hasVariables() || ((CValue)getValue()).getType() == ICValue.TYPE_POINTER )
((ICValue)getValue()).setChanged( changed );
if ( !getValue().hasVariables() || ((ICValue)getValue()).getType() == ICValue.TYPE_POINTER )
{
fChanged = changed;
}