public class MemoryCallStackTable extends DATableComposite {
+ private String UNKNOWN = "<unknown>";
+ private String UNKNOWN_LIBRARY = "<unknown library>";
+
public MemoryCallStackTable(Composite parent, int style) {
super(parent, style);
// TODO Auto-generated constructor stub
gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME, allocPath);
gridItem.setText(0, allocName);
- gridItem.setText(1, "Unknown");
- gridItem.setText(2, "Unknown");
+ gridItem.setText(1, UNKNOWN);
+ gridItem.setText(2, UNKNOWN_LIBRARY);
gridItem = new GridItem(table, SWT.NONE);
gridItem.setData(callstackTableData);
gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_TIME, time);
gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME, allocPath);
- gridItem.setText(0, "Unknown");
- String addrInput = (allocAddr == 0) ? "" : Formatter.toHexString(Long.toString(allocAddr)); //$NON-NLS-1$
+ gridItem.setText(0, UNKNOWN);
+ String addrInput = (allocAddr == 0)
+ ? UNKNOWN
+ : Formatter.toHexString(Long.toString(allocAddr)).toLowerCase(); //$NON-NLS-1$
gridItem.setText(1, addrInput);
gridItem.setText(2, allocPath);
break;
}
+ long address = addrs.get(i);
+
gridItem = new GridItem(table, SWT.NONE);
// setData block
- {
- long address = addrs.get(i);
- callstackTableData = new DATableDataFormat(address);
- callstackTableData.setType(AnalyzerConstants.TYPE_TABLE_MEM_CALLSTACK);
- callstackTableData.setObject(address);
- gridItem.setData(callstackTableData);
- gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_ADDR, address);
- gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_PID, pid);
- gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_TIME, time);
- gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME,
- path);
- }
-
- addrInput = (addrs.get(i) == 0) ? "" : hexAddr; //$NON-NLS-1$
- gridItem.setText(1, addrInput);
+ callstackTableData = new DATableDataFormat(address);
+ callstackTableData.setType(AnalyzerConstants.TYPE_TABLE_MEM_CALLSTACK);
+ callstackTableData.setObject(address);
+ gridItem.setData(callstackTableData);
+ gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_ADDR, address);
+ gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_PID, pid);
+ gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_TIME, time);
+ gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME, path);
+
+ addrInput = (address == 0) ? UNKNOWN : hexAddr; //$NON-NLS-1$
+ gridItem.setText(1, addrInput.toLowerCase());
String fName = api.getFunctionName();
gridItem.setText(0, fName);
gridItem.setText(2, path);