Skip to content

Commit

Permalink
Make redefineClasses async
Browse files Browse the repository at this point in the history
  • Loading branch information
yyoncho committed Jun 15, 2023
1 parent e78199d commit 2fe0ba5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions dap-java.el
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,13 @@ attaching to the test."
(cl-defmethod dap-handle-event ((_event (eql hotcodereplace)) session _params)
"Handle DAP events for SESSION."
(when (eq dap-java-hot-reload 'always)
(-let [(&hash "changedClasses" classes) (dap-request session "redefineClasses")]
(if classes
(lsp--info "Reloaded the following classes: %s." classes)
(lsp--warn "There are no classes to redefine.")))))
(dap--send-message
(dap--make-request "redefineClasses")
(-lambda ((&hash "changedClasses" classes))
(if classes
(lsp--info "Reloaded the following classes: %s." classes)
(lsp--warn "There are no classes to redefine.")))
session)))

(dap-register-debug-provider "java" #'dap-java--populate-default-args)
(dap-register-debug-template "Java Run Configuration"
Expand Down

0 comments on commit 2fe0ba5

Please sign in to comment.