bugfixed stacktrace tooltip
This commit is contained in:
parent
656251a6af
commit
28bdc2fb50
|
@ -335,14 +335,17 @@ public class BufferListener extends VisPlugin {
|
||||||
java.awt.Point p = e.getPoint();
|
java.awt.Point p = e.getPoint();
|
||||||
int rowIndex = rowAtPoint(p);
|
int rowIndex = rowAtPoint(p);
|
||||||
int colIndex = columnAtPoint(p);
|
int colIndex = columnAtPoint(p);
|
||||||
int columnIndex = convertColumnIndexToModel(colIndex);
|
if (rowIndex < 0 || colIndex < 0) {
|
||||||
if (rowIndex < 0 || columnIndex < 0) {
|
return super.getToolTipText(e);
|
||||||
|
}
|
||||||
|
int row = convertRowIndexToModel(rowIndex);
|
||||||
|
int column = convertColumnIndexToModel(colIndex);
|
||||||
|
if (row < 0 || column < 0) {
|
||||||
return super.getToolTipText(e);
|
return super.getToolTipText(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object v = getValueAt(rowIndex, columnIndex);
|
if (column == COLUMN_SOURCE) {
|
||||||
if (columnIndex == COLUMN_SOURCE) {
|
BufferAccess ba = logs.get(row);
|
||||||
BufferAccess ba = logs.get(rowIndex);
|
|
||||||
if (ba.stackTrace != null) {
|
if (ba.stackTrace != null) {
|
||||||
return
|
return
|
||||||
"<html><pre>" +
|
"<html><pre>" +
|
||||||
|
@ -351,24 +354,25 @@ public class BufferListener extends VisPlugin {
|
||||||
}
|
}
|
||||||
return "No stack trace (enable in popup menu)";
|
return "No stack trace (enable in popup menu)";
|
||||||
}
|
}
|
||||||
if (v instanceof BufferAccess && parser instanceof GraphicalParser) {
|
if (column == COLUMN_DATA) {
|
||||||
|
BufferAccess ba = logs.get(row);
|
||||||
|
if (parser instanceof GraphicalParser) {
|
||||||
return
|
return
|
||||||
"<html><font face=\"Verdana\">" +
|
"<html><pre>" +
|
||||||
StringUtils.hexDump(((BufferAccess)v).mem, 4, 4).replaceAll("\n", "<br>") +
|
StringUtils.hexDump(ba.mem, 4, 4) +
|
||||||
"</html>";
|
"</pre></html>";
|
||||||
}
|
}
|
||||||
if (v != null) {
|
|
||||||
String t = v.toString();
|
String baString = ba.getParsedString();
|
||||||
if (t.length() > 60) {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("<html>");
|
sb.append("<html>");
|
||||||
do {
|
while (baString.length() > 60) {
|
||||||
sb.append(t.substring(0, 60)).append("<br>");
|
sb.append(baString.substring(0, 60)).append("<br>");
|
||||||
t = t.substring(60);
|
baString = baString.substring(60);
|
||||||
} while (t.length() > 60);
|
};
|
||||||
return sb.append(t).append("</html>").toString();
|
return sb.append(baString).append("</html>").toString();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getToolTipText(e);
|
return super.getToolTipText(e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue