Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2003-08-19 20:56:15 +0000
committerMikhail Khodjaiants2003-08-19 20:56:15 +0000
commit5f589a68a0011120999c41a80a713f2b602d1879 (patch)
treed610c6456a0c7ae607dc0dea654296b14b7acfe9
parent8ea769c2ed845a3441c90010a0c2c806b9d6ba92 (diff)
downloadorg.eclipse.cdt-5f589a68a0011120999c41a80a713f2b602d1879.tar.gz
org.eclipse.cdt-5f589a68a0011120999c41a80a713f2b602d1879.tar.xz
org.eclipse.cdt-5f589a68a0011120999c41a80a713f2b602d1879.zip
Create ICDIVariableObject for each array partition to compute a detail panel's value.
-rw-r--r--debug/org.eclipse.cdt.debug.core/ChangeLog5
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java33
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java2
3 files changed, 39 insertions, 1 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog
index fdf3958f2d5..8b5a13cf617 100644
--- a/debug/org.eclipse.cdt.debug.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.core/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-19 Mikhail Khodjaiants
+ Create ICDIVariableObject for each array partition to compute a detail panel's value.
+ * CArrayPartition.java
+ * CVariable.java
+
2003-08-18 Alain Magloire
ICDISharedLibraryEvent.java:
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java
index 727351b896a..d18fcb631ac 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java
@@ -13,6 +13,7 @@ import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
+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.ICType;
import org.eclipse.debug.core.DebugException;
@@ -30,6 +31,7 @@ public class CArrayPartition extends CVariable
private int fStart;
private int fEnd;
+ private ICDIVariableObject fCDIVariableObject;
private ICDIVariable fCDIVariable;
private ICType fType = null;
@@ -186,4 +188,35 @@ public class CArrayPartition extends CVariable
{
return true;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.debug.internal.core.model.CVariable#getQualifiedName()
+ */
+ protected String getQualifiedName() throws DebugException
+ {
+ if ( fQualifiedName == null )
+ {
+ try
+ {
+ if ( getVariableObject() != null )
+ {
+ fQualifiedName = getVariableObject().getQualifiedName();
+ }
+ }
+ catch( CDIException e )
+ {
+ requestFailed( "Qualified name is not available.", e );
+ }
+ }
+ return fQualifiedName;
+ }
+
+ private ICDIVariableObject getVariableObject() throws CDIException
+ {
+ if ( fCDIVariableObject == null )
+ {
+ fCDIVariableObject = getCDISession().getVariableManager().getVariableObjectAsArray( fCDIVariable, getStart(), getEnd() - getStart() + 1 );
+ }
+ return fCDIVariableObject;
+ }
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
index a392d81c1ea..9d2131a5d23 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
@@ -324,7 +324,7 @@ public abstract class CVariable extends CDebugElement
/**
* The full name of this variable.
*/
- private String fQualifiedName = null;
+ protected String fQualifiedName = null;
/**
* Change flag.

Back to the top