-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Task #101 - Auto Update LSP on Startup seems to be ignored.
- Loading branch information
Showing
11 changed files
with
97 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE130-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE130-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE130-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE130-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE140-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE140-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE140-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE140-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE150-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE150-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE150-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE150-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE160-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE160-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE160-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE160-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE170-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE170-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE170-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE170-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE180-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE180-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE180-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE180-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE190-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE190-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE190-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE190-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/09/01/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.8/python-RELEASE200-1.8.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/01/09"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE200-1.8" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.8"/> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.8//EN" "http://www.netbeans.org/dtds/autoupdate-catalog-2_8.dtd"> | ||
<module_updates timestamp="00/00/00/07/02/2024"> | ||
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.9/python-RELEASE200-1.9.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2024/02/07"> | ||
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE200-1.9" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.9"/> | ||
</module> | ||
</module_updates> |
79 changes: 40 additions & 39 deletions
79
src/main/java/org/netbeans/modules/python/PythonLspClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
package org.netbeans.modules.python; | ||
|
||
/** | ||
* | ||
*/ | ||
import java.io.IOException; | ||
import org.netbeans.api.editor.mimelookup.MimeRegistration; | ||
import org.netbeans.modules.lsp.client.spi.LanguageServerProvider; | ||
import org.openide.util.Exceptions; | ||
import org.openide.util.Lookup; | ||
|
||
@MimeRegistration(mimeType = PythonUtility.PYTHON_MIME_TYPE, | ||
service = LanguageServerProvider.class) | ||
public class PythonLspClient implements LanguageServerProvider { | ||
|
||
@Override | ||
public LanguageServerDescription startServer(Lookup lkp) { | ||
try { | ||
Process p = new ProcessBuilder( | ||
PythonUtility.getLspPythonExe(), | ||
"-m", | ||
"pylsp", | ||
"--log-file", | ||
PythonUtility.PYLSP_VENV_DIR.toPath().resolve("lsp_log_file").toString() | ||
//, | ||
//"-v" | ||
) | ||
.redirectError(ProcessBuilder.Redirect.INHERIT) | ||
.start(); | ||
return LanguageServerDescription.create(p.getInputStream(), | ||
p.getOutputStream(), p | ||
); | ||
} catch (IOException ex) { | ||
Exceptions.printStackTrace(ex); | ||
return null; | ||
} | ||
} | ||
|
||
} | ||
package org.netbeans.modules.python; | ||
|
||
/** | ||
* | ||
*/ | ||
import java.io.IOException; | ||
import org.netbeans.api.editor.mimelookup.MimeRegistration; | ||
import org.netbeans.modules.lsp.client.spi.LanguageServerProvider; | ||
import org.openide.util.Exceptions; | ||
import org.openide.util.Lookup; | ||
|
||
@MimeRegistration(mimeType = PythonUtility.PYTHON_MIME_TYPE, | ||
service = LanguageServerProvider.class) | ||
public class PythonLspClient implements LanguageServerProvider { | ||
|
||
@Override | ||
public LanguageServerDescription startServer(Lookup lkp) { | ||
try { | ||
Process p = new ProcessBuilder( | ||
PythonUtility.getLspPythonExe(), | ||
"-m", | ||
"pylsp", | ||
"--verbose", | ||
"--log-file", | ||
PythonUtility.PYLSP_VENV_DIR.toPath().resolve("lsp_log_file").toString() | ||
//, | ||
//"-v" | ||
) | ||
.redirectError(ProcessBuilder.Redirect.INHERIT) | ||
.start(); | ||
return LanguageServerDescription.create(p.getInputStream(), | ||
p.getOutputStream(), p | ||
); | ||
} catch (IOException ex) { | ||
Exceptions.printStackTrace(ex); | ||
return null; | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.