summaryrefslogtreecommitdiff
path: root/cider-stacktrace.el
diff options
context:
space:
mode:
authorJeff Valk <jv@jeffvalk.com>2014-04-24 17:00:48 -0400
committerJeff Valk <jv@jeffvalk.com>2014-04-24 17:00:48 -0400
commit863cf7ad7e072cbf62817c5de5550cd4425e8c08 (patch)
tree7f9bc25756219144fcc2aca995263c61876f21e7 /cider-stacktrace.el
parent7e1533f4f6d31963172e77662a48c612f880006d (diff)
Support Java method description from middleware.
Diffstat (limited to 'cider-stacktrace.el')
-rw-r--r--cider-stacktrace.el19
1 files changed, 12 insertions, 7 deletions
diff --git a/cider-stacktrace.el b/cider-stacktrace.el
index 14feac4b..f96ba8b1 100644
--- a/cider-stacktrace.el
+++ b/cider-stacktrace.el
@@ -201,14 +201,18 @@ Update `cider-stacktrace-hidden-frame-count' and indicate filters applied."
(sit-for 5)))
(defun cider-stacktrace-navigate (button)
- "Navigate to the stack frame represented by the BUTTON."
+ "Navigate to the stack frame source represented by the BUTTON."
(let ((var (button-get button 'var))
+ (class (button-get button 'class))
+ (method (button-get button 'method))
(line (button-get button 'line)))
- (condition-case nil
- (let* ((info (cider-var-info var))
- (file (cadr (assoc "file" info))))
- (cider-jump-to-def-for (vector file file line)))
- (error "No source info"))))
+ (let* ((info (if var
+ (cider-var-info var)
+ (cider-member-info class method)))
+ (file (cadr (assoc "file" info))))
+ (if (and file line)
+ (cider-jump-to-def-for (vector file file line))
+ (error "No source info")))))
;; Rendering
@@ -254,7 +258,8 @@ This associates text properties to enable filtering and source navigation."
(if (member 'repl flags) "REPL" file) line
(if (member 'clj flags) ns class)
(if (member 'clj flags) fn method))
- 'name name 'var var 'line line 'flags flags
+ 'var var 'class class 'method method
+ 'name name 'line line 'flags flags
'follow-link t
'action 'cider-stacktrace-navigate
'help-echo "View source at this location"