From c106d0f90696f165c2e7755518d8b7aae368254a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 23:27:09 +0530 Subject: [PATCH 1/3] chore(doc): automatic vimdoc update (#178) Co-authored-by: s1n7ax --- doc/nvim-java.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/nvim-java.txt b/doc/nvim-java.txt index c740642..d0d6a4c 100644 --- a/doc/nvim-java.txt +++ b/doc/nvim-java.txt @@ -1,4 +1,4 @@ -*nvim-java.txt* For Neovim >= 0.9.4 Last change: 2024 May 04 +*nvim-java.txt* For Neovim >= 0.9.4 Last change: 2024 June 25 ============================================================================== Table of Contents *nvim-java-table-of-contents* @@ -24,6 +24,9 @@ Table of Contents *nvim-java-table-of-contents* Just install and start writing `public static void main(String[] args)`. + [!WARNING] You cannot use `nvim-java` alongside `nvim-jdtls`. So remove + `nvim-jdtls` before installing this + DEMO *nvim-java-demo* @@ -36,6 +39,7 @@ FEATURES *nvim-java-features* - Automatic DAP debug configuration - Running tests +- Run & Debug profiles WHY *nvim-java-why* @@ -55,6 +59,12 @@ HOW TO INSTALL *nvim-java-how-to-install* :small_orange_diamond:details ~ +Q & A ~ + +If you face any issues, check our Q & A + wiki to see if that helps + + DISTRIBUTIONS ~ - Lazyvim From 1fae8de1327167ac4b9f744970b2b6b7c7652874 Mon Sep 17 00:00:00 2001 From: s1n7ax Date: Thu, 27 Jun 2024 15:28:31 +0530 Subject: [PATCH 2/3] fix: when the same main class is ran again, first process is not stopped --- lua/java/runner/run.lua | 2 +- lua/java/runner/runner.lua | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/java/runner/run.lua b/lua/java/runner/run.lua index 4e677f6..cb5ab35 100644 --- a/lua/java/runner/run.lua +++ b/lua/java/runner/run.lua @@ -5,10 +5,10 @@ local notify = require('java-core.utils.notify') ---@field name string ---@field main_class string ---@field buffer number +---@field is_running boolean ---@field private cmd string ---@field private term_chan_id number ---@field private job_chan_id number | nil ----@field private is_running boolean ---@field private is_failure boolean local Run = class() diff --git a/lua/java/runner/runner.lua b/lua/java/runner/runner.lua index 3f7c2f3..6b0ddc4 100644 --- a/lua/java/runner/runner.lua +++ b/lua/java/runner/runner.lua @@ -26,11 +26,13 @@ function Runner:start_run(args) return end - local run ---@as java.Run + local run = self.runs[dap_config.mainClass] -- get the default run if exist or create new run - if self.runs[dap_config.mainClass] then - run = self.runs[dap_config.mainClass] + if run then + if run.is_running then + run:stop() + end else run = Run(dap_config, cmd) self.runs[dap_config.mainClass] = run From 41abed319134ab2262a8c571486d46cee7ba35d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 15:30:26 +0530 Subject: [PATCH 3/3] chore(main): release 1.6.1 (#214) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d755cf..2d170de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.6.1](https://github.com/nvim-java/nvim-java/compare/v1.6.0...v1.6.1) (2024-06-27) + + +### Bug Fixes + +* when the same main class is ran again, first process is not stopped ([1fae8de](https://github.com/nvim-java/nvim-java/commit/1fae8de1327167ac4b9f744970b2b6b7c7652874)) + ## [1.6.0](https://github.com/nvim-java/nvim-java/compare/v1.5.1...v1.6.0) (2024-06-25)