jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.Session.stateChanged ( ChangeEvent  event)

Handler for events fired from the trace enumerator.

Parameters
[in]eventthe tab change event

Definition at line 401 of file Session.java.

402  {
403  try {
404  int i = tabs.getSelectedIndex();
405  if (i < 0) {
406  details.clear();
407  return;
408  }
409 
410  tabs.setIconAt(i, Registry.getCurrent().loadIcon("void.png"));
411 
412  /*for (int j = 0, cnt = traces.size(); j < cnt; j++) {
413  Hashtable<String, String> rqst = traces.get(j);
414 
415  System.out.println("Trace " + j + ": ");
416  Enumeration keys = rqst.keys();
417  while (keys.hasMoreElements()) {
418  String key = (String) keys.nextElement();
419  String field = rqst.get(key);
420 
421  System.out.println("\t" + key + ": " + field);
422  }
423  }*/
424 
425  TracePane pane = traces.get(i);
426  String field = pane.getField("exception");
427  if (field != null)
428  details.setMessage(field);
429  else
430  details.setMessage("Thread stack trace");
431 
432  field = pane.getField("tstamp");
433  details.setTimestamp(Long.parseLong(field, 16));
434 
435  String host = link.getInetAddress().getCanonicalHostName();
436  int port = link.getPort();
437  details.setAddress(host, port);
438  }
439 
440  catch (Throwable t) {
441  Registry.debug(t);
442  }
443  }