import org.netbeans.spi.debugger.ui.Constants;
public class ClojureWatchesTableModel implements TableModel {
public Object getValueAt (Object row, String columnID) throws UnknownTypeException {
if (!(row instanceof ClojureElWatch)) throw new UnknownTypeException(row);
ClojureElWatch watch = (ClojureElWatch) row;
if (columnID.equals(Constants.WATCH_TO_STRING_COLUMN_ID)) {
return watch.getValue();
} else if (columnID.equals (Constants.WATCH_TYPE_COLUMN_ID)) {
return watch.getType();
} else if (columnID.equals (Constants.WATCH_VALUE_COLUMN_ID)) {
String e = watch.getExceptionDescription ();
if (e != null) return "> " + e + " <";
return watch.getValue();
}
throw new UnknownTypeException(row);
}