| Index: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugIndexedValue.java
|
| ===================================================================
|
| --- dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugIndexedValue.java (revision 37109)
|
| +++ dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugIndexedValue.java (working copy)
|
| @@ -24,6 +24,8 @@
|
| import org.eclipse.debug.core.model.IVariable;
|
|
|
| import java.io.IOException;
|
| +import java.util.ArrayList;
|
| +import java.util.List;
|
| import java.util.concurrent.CountDownLatch;
|
| import java.util.concurrent.TimeUnit;
|
|
|
| @@ -46,7 +48,7 @@
|
|
|
| @Override
|
| public int getSize() throws DebugException {
|
| - return value.getListLength();
|
| + return value.getListLength(getTarget().getConnection());
|
| }
|
|
|
| @Override
|
| @@ -78,10 +80,33 @@
|
| }
|
|
|
| @Override
|
| + public boolean hasVariables() throws DebugException {
|
| + return true;
|
| + }
|
| +
|
| + @Override
|
| public boolean isListValue() {
|
| return true;
|
| }
|
|
|
| + @Override
|
| + protected void populate() {
|
| + try {
|
| + int length = value.getListLength(getTarget().getConnection());
|
| +
|
| + IVariable[] variables = getVariables(0, length);
|
| + List<IVariable> variablesList = new ArrayList<IVariable>();
|
| +
|
| + for (int i = 0; i < length; i++) {
|
| + variablesList.add(variables[i]);
|
| + }
|
| +
|
| + variableCollector = VariableCollector.fixed(getTarget(), variablesList);
|
| + } catch (DebugException e) {
|
| + variableCollector = VariableCollector.empty();
|
| + }
|
| + }
|
| +
|
| private WebkitRemoteObject getIndexAt(WebkitRemoteObject listObject, int offset)
|
| throws IOException {
|
| final WebkitRemoteObject[] results = new WebkitRemoteObject[1];
|
| @@ -90,7 +115,7 @@
|
|
|
| getConnection().getRuntime().callFunctionOn(
|
| listObject.getObjectId(),
|
| - "()=>this[" + offset + "]",
|
| + "() => this[" + offset + "]",
|
| null,
|
| false,
|
| new WebkitCallback<WebkitRemoteObject>() {
|
|
|