Skip to content

Commit 1897ff3

Browse files
committed
reintroduce lens related methods
- they were deleted by mistake
1 parent 11f2daa commit 1897ff3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lsp-java.el

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,18 @@ FULL specify whether full or incremental build will be performed."
411411
(unless (file-directory-p path)
412412
(make-directory path t)))
413413

414+
(cl-defmethod lsp-execute-command
415+
(_server (command (eql java.show.references)) params)
416+
(if-let (refs (cl-third params))
417+
(xref--show-xrefs (lsp--locations-to-xref-items refs) nil)
418+
(user-error "No references")))
419+
420+
(cl-defmethod lsp-execute-command
421+
(_server (command (eql java.show.implementations)) params)
422+
(if-let (refs (cl-third params))
423+
(xref--show-xrefs (lsp--locations-to-xref-items refs) nil)
424+
(user-error "No implementations")))
425+
414426
(defun lsp-java--get-java-version ()
415427
"Retrieve the java version from shell command."
416428
(let* ((java-version-output (shell-command-to-string (concat lsp-java-java-path " -version")))

0 commit comments

Comments
 (0)