fix bug for not 2d arrays and remove busyTable

This commit is contained in:
Alexander Marchuk
2014-11-19 13:58:41 +03:00
parent 911b2a36e5
commit afcc461543
6 changed files with 4 additions and 31 deletions
+1 -1
View File
@@ -390,7 +390,7 @@ class BaseInterpreterInterface:
name = attr.split("\t")[-1]
array = pydevd_vars.evalInContext(name, self.getNamespace(), self.getNamespace())
metaxml, r, c, f = pydevd_vars.array_to_meta_xml(array, name, format)
array, metaxml, r, c, f = pydevd_vars.array_to_meta_xml(array, name, format)
xml += metaxml
format = '%' + f
if rows == -1 and cols == -1:
+1 -1
View File
@@ -991,7 +991,7 @@ class InternalGetArray(InternalThreadCommand):
xml = "<xml>"
metaxml, rows, cols, format = pydevd_vars.array_to_meta_xml(var, self.name, self.format)
var, metaxml, rows, cols, format = pydevd_vars.array_to_meta_xml(var, self.name, self.format)
xml += metaxml
self.format = '%' + format
if self.rows == -1 and self.cols == -1:
+1 -1
View File
@@ -493,7 +493,7 @@ def array_to_meta_xml(array, name, format):
bounds = (array.min(), array.max())
xml = '<array slice=\"%s\" rows=\"%s\" cols=\"%s\" format=\"%s\" type=\"%s\" max=\"%s\" min=\"%s\"/>' % \
(slice, rows, cols, format, type, bounds[1], bounds[0])
return xml, rows, cols, format
return array, xml, rows, cols, format
@@ -69,20 +69,12 @@
</grid>
<component id="fd814" class="com.intellij.ui.EditorTextField" binding="mySliceTextField" custom-create="true">
<constraints>
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<toolTipText value="Current slice."/>
</properties>
</component>
<component id="a8664" class="com.intellij.ui.table.JBTable" binding="myBusyTable" custom-create="true">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="18" height="18"/>
</grid>
</constraints>
<properties/>
</component>
</children>
</grid>
</form>
@@ -47,7 +47,6 @@ public class ArrayTableForm {
private JPanel myFormatPanel;
private JPanel myMainPanel;
private JTable myTable;
private JBTable myBusyTable;
private final Project myProject;
private KeyListener myResliceCallback;
private KeyListener myReformatCallback;
@@ -84,11 +83,6 @@ public class ArrayTableForm {
return editor;
}
};
myBusyTable = new JBTable(new DefaultTableModel());
myBusyTable.getEmptyText().setText("");
myBusyTable.setBackground(myBusyTable.getTableHeader().getBackground());
myBusyTable.setBorder(BorderFactory.createEmptyBorder());
}
public EditorTextField getSliceTextField() {
@@ -125,10 +119,6 @@ public class ArrayTableForm {
return myScrollPane;
}
public void setBusy(boolean busy) {
myBusyTable.setPaintBusy(busy);
}
public static class ColumnHeaderRenderer extends DefaultTableHeaderCellRenderer {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean selected, boolean focused, int row, int column) {
@@ -342,15 +342,6 @@ public class NumpyArrayTable {
initTableModel(true);
}
public void setBusy(final boolean busy) {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
myComponent.setBusy(busy);
}
});
}
/**
* @return double presentation from [0:1] range
*/