diff --git a/python/helpers/pydev/pydev_console_utils.py b/python/helpers/pydev/pydev_console_utils.py index d12419e19e57..043351587155 100644 --- a/python/helpers/pydev/pydev_console_utils.py +++ b/python/helpers/pydev/pydev_console_utils.py @@ -387,7 +387,7 @@ class BaseInterpreterInterface: def getArray(self, attr, roffset, coffset, rows, cols, format): xml = "" - name = ".".join(attr.split("\t")) + name = attr.split("\t")[-1] array = pydevd_vars.evalInContext(name, self.getNamespace(), self.getNamespace()) if rows == -1 and cols == -1: diff --git a/python/helpers/pydev/pydevd_comm.py b/python/helpers/pydev/pydevd_comm.py index 8b7596d5818c..8f5fea6f0fb2 100644 --- a/python/helpers/pydev/pydevd_comm.py +++ b/python/helpers/pydev/pydevd_comm.py @@ -974,15 +974,15 @@ class InternalGetArray(InternalThreadCommand): self.thread_id = thread_id self.frame_id = frame_id self.scope = scope - self.name = ".".join(attrs.split("\t")) + self.name = attrs.split("\t")[-1] self.attrs = attrs self.roffset = int(roffset) self.coffset = int(coffset) self.rows = int(rows) self.cols = int(cols) self.format = format - if hasattr(self.format, 'decode'): - self.format = self.format.decode('utf-8') + if hasattr(self.format, 'encode'): + self.format = self.format.encode('utf-8') def doIt(self, dbg): try: diff --git a/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java b/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java index 6d237301c293..71cef8164bcd 100644 --- a/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java +++ b/python/src/com/jetbrains/python/console/PydevConsoleCommunication.java @@ -554,14 +554,7 @@ public class PydevConsoleCommunication extends AbstractConsoleCommunication impl throws PyDebuggerException { if (myClient != null) { try { - String fullName = var.getName(); - PyDebugValue child = var; - while (child.getParent() != null) { - child = child.getParent(); - fullName = child.getName() + "\t" + fullName; - } - - Object ret = myClient.execute(GET_ARRAY, new Object[]{fullName, rowOffset, colOffset, rows, cols, format}); + Object ret = myClient.execute(GET_ARRAY, new Object[]{var.getName(), rowOffset, colOffset, rows, cols, format}); if (ret instanceof String) { return ProtocolParser.parseArrayValues((String)ret, this); } diff --git a/python/src/com/jetbrains/python/debugger/array/AsyncArrayTableModel.java b/python/src/com/jetbrains/python/debugger/array/AsyncArrayTableModel.java index 3eb47155d316..c25ef27b6b17 100644 --- a/python/src/com/jetbrains/python/debugger/array/AsyncArrayTableModel.java +++ b/python/src/com/jetbrains/python/debugger/array/AsyncArrayTableModel.java @@ -51,7 +51,7 @@ public class AsyncArrayTableModel extends AbstractTableModel { final PyDebugValue value = myProvider.getDebugValue(); final PyDebugValue slicedValue = new PyDebugValue(myProvider.getSliceText(), value.getType(), value.getValue(), value.isContainer(), value.isErrorOnEval(), - value.getFrameAccessor()); + value.getParent(), value.getFrameAccessor()); ListenableFutureTask task = ListenableFutureTask.create(new Callable() { @Override diff --git a/python/src/com/jetbrains/python/debugger/array/NumpyArrayTable.java b/python/src/com/jetbrains/python/debugger/array/NumpyArrayTable.java index 6a2122e9b7f1..bab68147db79 100644 --- a/python/src/com/jetbrains/python/debugger/array/NumpyArrayTable.java +++ b/python/src/com/jetbrains/python/debugger/array/NumpyArrayTable.java @@ -167,7 +167,7 @@ public class NumpyArrayTable { } public void init() { - init(myValue.getName(), false); + init(getDebugValue().getEvaluationExpression(), false); } public void init(final String slice, final boolean inPlace) { @@ -181,14 +181,8 @@ public class NumpyArrayTable { public void run() { final PyDebugValue value = getDebugValue(); PyDebugValue parent = value.getParent(); - String sl = slice; - - if (slice.contains(".")) { - sl = slice.substring(slice.lastIndexOf(".") + 1); - } - final PyDebugValue slicedValue = - new PyDebugValue(sl, value.getType(), value.getValue(), value.isContainer(), value.isErrorOnEval(), + new PyDebugValue(slice, value.getType(), value.getValue(), value.isContainer(), value.isErrorOnEval(), parent, value.getFrameAccessor()); final String format = getFormat().isEmpty() ? "%" : getFormat(); @@ -433,14 +427,7 @@ public class NumpyArrayTable { } public String getNodeFullName() { - String fullName = getDebugValue().getName(); - PyDebugValue child = getDebugValue(); - while (child.getParent() != null) { - child = child.getParent(); - fullName = child.getName() + "." + fullName; - } - - return fullName; + return getDebugValue().getEvaluationExpression(); } public String getFormat() {