[slime-devel] Common Lisp Browser

Rui Patrocínio rui.patrocinio at netvisao.pt
Wed Sep 15 15:43:01 UTC 2004


Hello,

  I've attached an extensible browser that I hope is useful and simple 
enough. It uses a lazy mechanism to expand the information required, so 
that it can be used to explore large systems. Currently it permits to 
explore class hierarchies and some xref information. I've a big hack 
that permits to see trace output in a tree-like fashion, but it's very 
ugly and implementation dependent and so it hasn't been included.


  A small interface in swank.lisp is needed, using the new API to MOP in 
the swank-backend:
  (defun class-direct-classes (class-name fn)
   (let ((class (find-class class-name nil)))
     (when class
       (mapcar #'(lambda (x) (symbol-name (class-name x)))
           (funcall fn class)))))

(defslimefun mop (type symbol-name)
   "Return info about classes using mop.

    When type is:
     :subclasses - return the list of subclasses of class.
     :superclasses - return the list of superclasses of class."
   (let ((symbol (parse-symbol-or-lose symbol-name *buffer-package*)))
     (ecase type
       (:subclasses (class-direct-classes symbol 
#'swank-mop:class-direct-subclasses))
       (:superclasses (class-direct-classes symbol 
#'swank-mop:class-direct-superclasses)))))


  Rui Patrocínio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: browser-mode.el
Type: text/x-emacs-lisp
Size: 2215 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20040915/7a50db24/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree-buffer.el
Type: text/x-emacs-lisp
Size: 5174 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20040915/7a50db24/attachment-0001.bin>


More information about the slime-devel mailing list