Skip to content

Commit 1674de1

Browse files
committed
UX improvments
1 parent 257d97c commit 1674de1

File tree

13 files changed

+76
-27
lines changed

13 files changed

+76
-27
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,8 @@
812812
<properties>
813813
<keystore>target/keystore</keystore>
814814
<netbeans.release.version>RELEASE190</netbeans.release.version>
815-
<next.version>1.4</next.version>
816-
<previous.version>1.3</previous.version>
815+
<next.version>1.5</next.version>
816+
<previous.version>1.4</previous.version>
817817
<git.url>https://github.com/albilu/netbeansPython</git.url>
818818
<git.link>https://github.com/albilu/netbeansPython.git</git.link>
819819
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

ppuc/13/updates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?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">
2-
<module_updates timestamp="00/00/00/10/09/2023">
3-
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.4/python-RELEASE130-1.4.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/09/10">
4-
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE130-1.4" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.4"/>
2+
<module_updates timestamp="00/00/00/12/11/2023">
3+
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.5/python-RELEASE130-1.5.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/11/12">
4+
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE130-1.5" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.5"/>
55
</module>
66
</module_updates>

ppuc/14/updates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?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">
2-
<module_updates timestamp="00/00/00/10/09/2023">
3-
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.4/python-RELEASE140-1.4.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/09/10">
4-
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE140-1.4" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.4"/>
2+
<module_updates timestamp="00/00/00/12/11/2023">
3+
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.5/python-RELEASE140-1.5.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/11/12">
4+
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE140-1.5" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.5"/>
55
</module>
66
</module_updates>

ppuc/15/updates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?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">
2-
<module_updates timestamp="00/00/00/10/09/2023">
3-
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.4/python-RELEASE150-1.4.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/09/10">
4-
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE150-1.4" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.4"/>
2+
<module_updates timestamp="00/00/00/12/11/2023">
3+
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.5/python-RELEASE150-1.5.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/11/12">
4+
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE150-1.5" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.5"/>
55
</module>
66
</module_updates>

ppuc/16/updates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?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">
2-
<module_updates timestamp="00/00/00/10/09/2023">
3-
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.4/python-RELEASE160-1.4.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/09/10">
4-
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE160-1.4" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.4"/>
2+
<module_updates timestamp="00/00/00/12/11/2023">
3+
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.5/python-RELEASE160-1.5.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/11/12">
4+
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE160-1.5" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.5"/>
55
</module>
66
</module_updates>

ppuc/17/updates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?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">
2-
<module_updates timestamp="00/00/00/10/09/2023">
3-
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.4/python-RELEASE170-1.4.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/09/10">
4-
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE170-1.4" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.4"/>
2+
<module_updates timestamp="00/00/00/12/11/2023">
3+
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.5/python-RELEASE170-1.5.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/11/12">
4+
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE170-1.5" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.5"/>
55
</module>
66
</module_updates>

ppuc/18/updates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?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">
2-
<module_updates timestamp="00/00/00/10/09/2023">
3-
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.4/python-RELEASE180-1.4.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/09/10">
4-
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE180-1.4" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.4"/>
2+
<module_updates timestamp="00/00/00/12/11/2023">
3+
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.5/python-RELEASE180-1.5.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/11/12">
4+
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE180-1.5" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.5"/>
55
</module>
66
</module_updates>

ppuc/19/updates.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?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">
2-
<module_updates timestamp="00/00/00/10/09/2023">
3-
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.4/python-RELEASE190-1.4.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/09/10">
4-
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE190-1.4" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.4"/>
2+
<module_updates timestamp="00/00/00/12/11/2023">
3+
<module codenamebase="io.github.albilu.python" distribution="https://github.com/albilu/netbeansPython/releases/download/1.5/python-RELEASE190-1.5.nbm" downloadsize="133405377" homepage="https://github.com/albilu/netbeansPython" moduleauthor="albilu" needsrestart="true" releasedate="2023/11/12">
4+
<manifest OpenIDE-Module="io.github.albilu.python" AutoUpdate-Show-In-Client="true" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="RELEASE190-1.5" OpenIDE-Module-Name="Python" OpenIDE-Module-Requires="org.openide.windows.WindowManager" OpenIDE-Module-Short-Description="Netbeans Support for Python" OpenIDE-Module-Specification-Version="1.5"/>
55
</module>
66
</module_updates>

src/main/java/org/netbeans/modules/python/PythonUtility.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import java.util.Map;
1717
import java.util.Properties;
1818
import java.util.concurrent.ExecutionException;
19+
import java.util.logging.Level;
1920
import java.util.logging.Logger;
2021
import java.util.prefs.Preferences;
2122
import java.util.regex.Matcher;
@@ -148,7 +149,13 @@ public static String getTermFontFam() {
148149
}
149150

150151
public static String getServerVersion() throws IOException {
151-
return getCommandOutput(new String[]{getLspPythonExe(), "-m", "pylsp", "--version"}, null);
152+
String commandOutput = getCommandOutput(new String[]{getLspPythonExe(), "-m", "pylsp", "--version"}, null);
153+
if (!commandOutput.startsWith("__main__.py")) {
154+
LOG.log(Level.SEVERE, commandOutput);
155+
return "UNKNOW";
156+
}
157+
return commandOutput;
158+
152159
}
153160

154161
public static String getCommandOutput(String[] cmd, FileObject projectDir) throws IOException {
@@ -291,7 +298,12 @@ public static Properties getProperties(@NonNull Project project, boolean isCreat
291298
}
292299

293300
public static String getVersion(String projectPythonExe) throws IOException {
294-
return getCommandOutput(new String[]{projectPythonExe, "--version"}, null);
301+
String commandOutput = getCommandOutput(new String[]{projectPythonExe, "--version"}, null);
302+
if (!commandOutput.startsWith("Py")) {
303+
LOG.log(Level.SEVERE, commandOutput);
304+
return "";
305+
}
306+
return commandOutput;
295307
}
296308

297309
public static ImageIcon getErrorIcon() {

src/main/java/org/netbeans/modules/python/options/PythonLspServerConfigsPanel.form

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@
135135
<StringArray count="0"/>
136136
</Property>
137137
</Properties>
138+
<Events>
139+
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="lspListMouseClicked"/>
140+
</Events>
138141
<AuxValues>
139142
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value=""/>
140143
</AuxValues>
@@ -213,6 +216,9 @@
213216
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
214217
<SubComponents>
215218
<Component class="javax.swing.JEditorPane" name="lspEditorPane">
219+
<Properties>
220+
<Property name="contentType" type="java.lang.String" value="text/x-json" noResource="true"/>
221+
</Properties>
216222
</Component>
217223
</SubComponents>
218224
</Container>

0 commit comments

Comments
 (0)