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

Implement isEditable() method.

This commit is contained in:
Alain Magloire 2003-08-06 21:14:06 +00:00
parent d391011d82
commit 136dfb9d17

View file

@ -9,7 +9,11 @@ import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIArrayType;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIFunctionType;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIStructType;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIType;
import org.eclipse.cdt.debug.core.cdi.model.type.ICDIVoidType;
import org.eclipse.cdt.debug.mi.core.MIException;
import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
@ -134,6 +138,20 @@ public class VariableObject extends CObject implements ICDIVariableObject {
return 0;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject#isEdiTable()
*/
public boolean isEditable() throws CDIException {
ICDIType t = getType();
if (t instanceof ICDIArrayType ||
t instanceof ICDIStructType ||
t instanceof ICDIVoidType ||
t instanceof ICDIFunctionType) {
return false;
}
return true;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject#getStackFrame()
*/