help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] next-error method for java stack traces


From: Robert Mecklenburg
Subject: [h-e-w] next-error method for java stack traces
Date: Fri, 31 May 2002 15:16:41 -0600

When I get a java stack trace in a compilation buffer I would like to
be able to use next-error to move through the stack trace looking at
each line and loading the source files.  To the best of my knowledge
this doesn't work in 21.2.1 OOTB (I'm using the "standard" NT
pre-compiled binary).

Before I go implementing this does anyone know of existing code to do
it? 

- I've found a file, jde-stack.el by Kevin Burton (and Phillip Lord)
  but it is more of a point and click implementation.  You mouse click
  on the line you want and it takes you there.  It has no hooks to
  compilation-mode or next-error.  This also performs a pop-to-buffer
  so it fails on a dedicated *compilation* window (like you get with
  special-display-buffer-names).

- There is also qflib at http://www.qfs.de/en/elisp/index.html which
  contains a stack trace parser, but it also is not implemented as a
  hook to compilation-mode.  Rather, like jde-stack, you place your
  cursor on a stack trace line and invoke it to find the function.  It
  also performs a pop-to-buffer.

- I tried setting compilation-error-regexp-alist like this:

        (setq compilation-error-regexp-alist
         (append compilation-error-regexp-alist
          (list '("\\bat \\(com\\.cimsoft.*\\)(\\([^:]+\\):\\([0-9]+\\))" 2 
3))))

  But compilation-mode cannot find the file (although once you tell it
  where the file it is, it takes you to the proper line).  I have been
  unable to discover how to let compilation-mode discover the file
  location itself.

- A really good implementation of next-error would also be able to
  garb source files out of source jars (such as the jdk1.3.1/src.jar
  file).  But right now that's definitely icing on the cake.  So as a
  fall back it would be nice for the function to skip stack trace
  lines for which source code is not available.

Obviously, I have many possibilities.  I'd rather not come up with yet
another custom hack, rather I'd like to do the Right Thing (tm) wrt
compilation-mode.

Thoughts?
-- 
Robert




reply via email to

[Prev in Thread] Current Thread [Next in Thread]