yveszoundi/eglot-java

Upgrade existing JDT LS installation

yveszoundi opened this issue · 0 comments

Problem

There appears to be no "official" way to upgrade the installed JDT LS. You could delete the installation directory, but it's obviously a hack. Probably also need to shut down (how exactly?) the eglot server and (manually?) start again after deleting.

Potential solution

  • Check the currently installed version against the latest known available version
  • For each opened buffer associated with eglot-java-mode, ensure that the eglot-server is not running, otherwise stop it: Maybe just disabling eglot-java-mode is good enough
  • Install the new jdtls version to a temporary folder
  • If the installation succeeds
    • Move the old jdtls installation folder to a temporary folder
    • Move the new jdtls to its new destination
    • Delete the old jdtls installation folder
  • For each opened buffer associated with java-mode, ensure that the eglot-server is running, by reassociating the buffer with eglot-java-mode

References

This depends on #15 .