protected String getColumnText(IVariable variable, IValue value, IPresentationContext context, String columnId) throws CoreException { if (JavaVariableColumnPresentation.COLUMN_INSTANCE_ID.equals(columnId)) { if (value instanceof JDIObjectValue) { long uniqueId = ((JDIObjectValue)value).getUniqueId(); if (uniqueId >= 0) { StringBuffer buffer = new StringBuffer(); buffer.append(uniqueId); return buffer.toString(); } } return ""; //$NON-NLS-1$ } return super.getColumnText(variable, value, context, columnId); }
@Override protected String getLabel(TreePath elementPath, IPresentationContext context, String columnId) throws CoreException { if (columnId == null) { return super.getLabel(elementPath, context, columnId); } else { IVariable variable = (IVariable) elementPath.getLastSegment(); IValue value = variable.getValue(); return getColumnText(variable, value, context, columnId); } }