4949(defun lsp-java-treemacs--get-libraries (project-uri )
5050 " Get the list of buffers, grouped by their major mode.
5151PROJECT-URI is the project id of the active project."
52- (when-lsp-workspace (lsp-java--find-root project-uri)
52+ (when-lsp-workspace (lsp-java--find-workspace project-uri)
5353 (lsp-send-execute-command " che.jdt.ls.extension.externalLibraries"
5454 (list :projectUri project-uri))))
5555
5656(defun lsp-java-treemacs--library-children (project-uri node-id )
5757 " Get the list of library children.
5858PROJECT-URI and NODE-ID are the details for the current node."
59- (when-lsp-workspace (lsp-java--find-root project-uri)
59+ (when-lsp-workspace (lsp-java--find-workspace project-uri)
6060 (lsp-send-execute-command " che.jdt.ls.extension.libraryChildren"
6161 (list :projectUri project-uri
6262 :nodeId node-id))))
6363
6464(defun lsp-java-treemacs--external-library-children (project-uri node-id path )
6565 " Get the list of external library children.
6666PROJECT-URI, NODE-ID and PATH are the details for the current node."
67- (when-lsp-workspace (lsp-java--find-root project-uri)
67+ (when-lsp-workspace (lsp-java--find-workspace project-uri)
6868 (lsp-send-execute-command " che.jdt.ls.extension.externalLibrariesChildren"
6969 (list :projectUri project-uri
7070 :nodeId node-id
7171 :nodePath path))))
7272
7373(defun lsp-java-treemacs--open-file (_arg )
7474 " Open resource file."
75- (when-lsp-workspace (lsp-java--find-root (treemacs--prop-at-point :project-uri ))
75+ (when-lsp-workspace (lsp-java--find-workspace (treemacs--prop-at-point :project-uri ))
7676 (->> (treemacs--prop-at-point :uri )
7777 lsp--uri-to-path
7878 find-file)))
@@ -183,7 +183,7 @@ REL-PATH rel path to the icon."
183183 :face 'lsp-java-treemacs-directory-face
184184 :key-form id
185185 :more-properties (:node-id id :project-uri project-uri
186- :workspace (lsp-java--find-root project-uri)))))
186+ :workspace (lsp-java--find-workspace project-uri)))))
187187
188188(defun lsp-java-treemacs--folders-change (added removed )
189189 " Handler for `lsp-workspace-folders-change' hook.
@@ -202,7 +202,7 @@ ADDED and REMOVED are pointing which are the changed folders."
202202 dir-or-project
203203 (treemacs-project->path dir-or-project))))
204204 (-some-> dir
205- lsp-java--find-root
205+ lsp-java--find-workspace
206206 lsp-java--get-project-uris
207207 (-contains? (lsp--path-to-uri dir)))))
208208
0 commit comments