File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ M.update_project_config() *jdtls.update_project_config*
26
26
module of the current buffer.
27
27
28
28
29
+ M.update_projects_config({mode} ) *jdtls.update_projects_config*
30
+ Process changes made to the Gradle or Maven configuration of one or more projects.
31
+ Requires eclipse.jdt.ls >= 1.13.0
32
+
33
+
34
+
35
+ Parameters: ~
36
+ {mode} (nil|"prompt"|"all") Whether to prompt for projects to update or update all. Defaults to "prompt"
37
+
38
+
29
39
M.javap() *jdtls.javap*
30
40
Run the `javap` tool in a terminal buffer.
31
41
Sets the classpath based on the current project.
Original file line number Diff line number Diff line change @@ -699,6 +699,43 @@ function M.update_project_config()
699
699
end )
700
700
end
701
701
702
+ --- Process changes made to the Gradle or Maven configuration of one or more projects.
703
+ --- Requires eclipse.jdt.ls >= 1.13.0
704
+ ---
705
+ --- @param mode nil | " prompt" | " all" Whether to prompt for projects to update or update all. Defaults to " prompt"
706
+ function M .update_projects_config (mode )
707
+ mode = mode or " pick"
708
+ local bufnr = api .nvim_get_current_buf ()
709
+ local command = {
710
+ command = ' java.project.getAll' ,
711
+ }
712
+ util .execute_command (command , function (err , projects )
713
+ if err then
714
+ error (err .message or vim .inspect (err ))
715
+ end
716
+ local selection
717
+ if mode == " all" then
718
+ selection = projects
719
+ elseif # projects == 1 then
720
+ selection = projects
721
+ else
722
+ selection = ui .pick_many (
723
+ projects ,
724
+ ' Projects> ' ,
725
+ function (project )
726
+ return vim .fn .fnamemodify (project , ' :.:t' )
727
+ end
728
+ )
729
+ end
730
+ if selection and next (selection ) then
731
+ local params = {
732
+ identifiers = vim .tbl_map (function (project ) return { uri = project } end , selection )
733
+ }
734
+ vim .lsp .buf_notify (bufnr , ' java/projectConfigurationsUpdate' , params )
735
+ end
736
+ end , bufnr )
737
+ end
738
+
702
739
703
740
local function mk_extract (entity )
704
741
return function (from_selection )
You can’t perform that action at this time.
0 commit comments