SimpleTextAttributes.ERROR_ATTRIBUTES);
return;
}
// Format the frame information
XSourcePosition sourcePosition = getSourcePosition();
if (m_frame.function != null) {
// Strip any arguments from the function name
String function = m_frame.function;
int parenIndex = function.indexOf('(');
if (parenIndex != -1) {
function = function.substring(0, parenIndex);
}
if (sourcePosition != null) {
component.append(function + "():" + (sourcePosition.getLine() + 1),
SimpleTextAttributes.REGULAR_ATTRIBUTES);
component.append(" (" + sourcePosition.getFile().getName() + ")",
SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
} else {
component.append(function + "()", SimpleTextAttributes.GRAY_ATTRIBUTES);
component.append(" (", SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
if (m_frame.module != null) {
component.append(m_frame.module + ":",
SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
}
component.append("0x" + Long.toHexString(m_frame.address) + ")",
SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
}
} else if (sourcePosition != null) {
component.append(
sourcePosition.getFile().getName() + ":" + (sourcePosition.getLine() + 1),
SimpleTextAttributes.REGULAR_ATTRIBUTES);
} else {
String addressStr = "0x" + Long.toHexString(m_frame.address);
component.append(addressStr, SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
component.appendFixedTextFragmentWidth(addressStr.length());