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

Added the abstract prototypes for some generic methods.

This commit is contained in:
Mikhail Khodjaiants 2004-08-05 16:53:30 +00:00
parent fd62bdd86c
commit 60b8ef73ba
7 changed files with 59 additions and 9 deletions

View file

@ -1,3 +1,12 @@
2004-08-05 Mikhail Khodjaiants
Added the abstract prototypes for some generic methods.
* AbstractCValue.java
* AbstractCVariable.java
* CArrayPartition.java
* CArrayPartitionValue.java
* CValue.java
* CVariable.java
2004-08-04 Mikhail Khodjaiants
New implementation of the variable types.
* CDIDebugModel.java

View file

@ -24,5 +24,9 @@ public abstract class AbstractCValue extends CDebugElement implements ICValue {
super( target );
}
abstract protected void setChanged( boolean changed );
abstract public void dispose();
abstract protected void reset();
}

View file

@ -34,4 +34,8 @@ public abstract class AbstractCVariable extends CDebugElement implements ICVaria
public abstract String getExpressionString() throws DebugException;
public abstract void dispose();
protected abstract void resetValue();
protected abstract void setChanged( boolean changed );
}

View file

@ -19,6 +19,7 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayValue;
import org.eclipse.cdt.debug.core.model.CVariableFormat;
import org.eclipse.cdt.debug.core.model.ICType;
import org.eclipse.debug.core.DebugEvent;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IValue;
@ -319,4 +320,23 @@ public class CArrayPartition extends AbstractCVariable {
fArrayPartitionValue = null;
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#resetValue()
*/
protected void resetValue() {
if ( fArrayPartitionValue != null ) {
fArrayPartitionValue.reset();
fireChangeEvent( DebugEvent.STATE );
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.internal.core.model.AbstractCVariable#setChanged(boolean)
*/
protected void setChanged( boolean changed ) {
if ( fArrayPartitionValue != null ) {
fArrayPartitionValue.setChanged( changed );
}
}
}

View file

@ -116,10 +116,13 @@ public class CArrayPartitionValue extends AbstractCValue {
return fEnd;
}
public void setChanged( boolean changed ) throws DebugException {
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#setChanged(boolean)
*/
protected void setChanged( boolean changed ) {
Iterator it = fVariables.iterator();
while( it.hasNext() ) {
((CVariable)it.next()).setChanged( changed );
((AbstractCVariable)it.next()).setChanged( changed );
}
}
@ -157,4 +160,14 @@ public class CArrayPartitionValue extends AbstractCValue {
((AbstractCVariable)it.next()).dispose();
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.internal.core.model.AbstractCValue#reset()
*/
protected void reset() {
Iterator it = fVariables.iterator();
while( it.hasNext() ) {
((AbstractCVariable)it.next()).resetValue();
}
}
}

View file

@ -175,14 +175,14 @@ public class CValue extends AbstractCValue {
return Arrays.asList( vars );
}
public synchronized void setChanged( boolean changed ) /*throws DebugException*/ {
protected synchronized void setChanged( boolean changed ) {
if ( changed ) {
fValueString = null;
resetStatus();
}
Iterator it = fVariables.iterator();
while( it.hasNext() ) {
((CVariable)it.next()).setChanged( changed );
((AbstractCVariable)it.next()).setChanged( changed );
}
}
@ -448,7 +448,7 @@ public class CValue extends AbstractCValue {
fValueString = null;
Iterator it = fVariables.iterator();
while( it.hasNext() ) {
((CVariable)it.next()).resetValue();
((AbstractCVariable)it.next()).resetValue();
}
}
}

View file

@ -264,8 +264,8 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
if ( changed ) {
invalidateValue();
}
if ( fValue instanceof CValue ) {
((CValue)fValue).setChanged( changed );
if ( fValue instanceof AbstractCValue ) {
((AbstractCValue)fValue).setChanged( changed );
}
fChanged = changed;
}
@ -279,8 +279,8 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
}
void resetValue() {
if ( fValue instanceof CValue ) {
((CValue)fValue).reset();
if ( fValue instanceof AbstractCValue ) {
((AbstractCValue)fValue).reset();
}
}