1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 12:25:35 +02:00

Added the "getType" method to ICValue.

This commit is contained in:
Mikhail Khodjaiants 2004-10-06 21:03:43 +00:00
parent 73d595ea0e
commit d636abc351
4 changed files with 20 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2004-10-06 Mikhail Khodjaiants
Added the "getType" method to ICValue.
* ICValue.java
* AbstractCValue.java
* CArrayPartitionValue.java
* CValue.java
2004-09-30 Mikhail Khodjaiants
Implementing adapters for the platform's Memory view.
* CExtendedMemoryBlockRetrieval.java: new

View file

@ -10,12 +10,15 @@
*******************************************************************************/
package org.eclipse.cdt.debug.core.model;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IValue;
/**
* Extends the IValue interface by C/C++ specific functionality.
*/
public interface ICValue extends IValue, ICDebugElement {
ICType getType() throws DebugException;
String evaluateAsExpression();
}

View file

@ -16,6 +16,7 @@ import java.util.List;
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
import org.eclipse.cdt.debug.core.model.ICStackFrame;
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.IVariable;
@ -165,4 +166,8 @@ public class CArrayPartitionValue extends AbstractCValue {
((AbstractCVariable)it.next()).resetValue();
}
}
public ICType getType() throws DebugException {
return null;
}
}

View file

@ -43,7 +43,6 @@ import org.eclipse.debug.core.model.IVariable;
* Represents the value of a variable in the CDI model.
*/
public class CValue extends AbstractCValue {
/**
* Cached value.
*/
@ -455,4 +454,9 @@ public class CValue extends AbstractCValue {
((AbstractCVariable)it.next()).resetValue();
}
}
public ICType getType() throws DebugException {
AbstractCVariable var = getParentVariable();
return ( var instanceof CVariable ) ? ((CVariable)var).getType() : null;
}
}