Skip to content

Commit

Permalink
Release v1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jShiwaniGupta committed Oct 26, 2024
1 parent ef2ed2c commit 68c011e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.jeddict</groupId>
<artifactId>jeddict-ai</artifactId>
<version>1.8</version>
<version>1.9</version>
<packaging>nbm</packaging>
<name>Jeddict AI Assistant</name>
<description>Jeddict AI Assistant is a powerful and intuitive plugin designed for Apache NetBeans IDE.
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/io/github/jeddict/ai/JeddictUpdateManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private static String getCurrentNetBeansVersion() {
}

private static String getCurrentJeddictVersion() {
return "1.8";
return "1.9";
}

private File saveFile;
Expand Down Expand Up @@ -80,6 +80,7 @@ public void checkForJeddictUpdate() {
NodeList nList = doc.getElementsByTagName("release");
String nbmFile = null;
String version = null;
String releaseNotes = null;
// Iterate through each release node
for (int i = 0; i < nList.getLength(); i++) {
Node node = nList.item(i);
Expand All @@ -89,7 +90,7 @@ public void checkForJeddictUpdate() {
version = element.getElementsByTagName("version").item(0).getTextContent();
String compatibleNetBeansVersion = element.getElementsByTagName("compatibleNetBeansVersion").item(0).getTextContent();
nbmFile = element.getElementsByTagName("nbmFile").item(0).getTextContent();

releaseNotes = element.getElementsByTagName("releaseNotes").item(0).getTextContent();
if (compatibleNetBeansVersion.equals(currentNetBeansVersion)
&& isVersionGreater(version, getCurrentJeddictVersion())) {
break;
Expand All @@ -101,7 +102,7 @@ && isVersionGreater(version, getCurrentJeddictVersion())) {
}

if (nbmFile != null) {
showInstallPopup(version, nbmFile);
showInstallPopup(version, releaseNotes, nbmFile);
}

} catch (Exception e) {
Expand All @@ -127,7 +128,7 @@ private boolean isVersionGreater(String newVersion, String currentVersion) {
return false;
}

private void showInstallPopup(String version, String nbmUrl) {
private void showInstallPopup(String version, String releaseNotes, String nbmUrl) {

if (loadPreference(PREF_KEY_SHOW_POPUP)) {
return;
Expand All @@ -148,6 +149,7 @@ private void showInstallPopup(String version, String nbmUrl) {
titleLabel.setAlignmentX(Component.CENTER_ALIGNMENT);

JLabel infoLabel = new JLabel("<html>Version: " + version + "<br>"
+ ((releaseNotes != null && !releaseNotes.trim().isEmpty()) ? (releaseNotes + "<br>") : "")
+ "Click below to download the update or learn more.</html>");
infoLabel.setAlignmentX(Component.CENTER_ALIGNMENT);

Expand Down

0 comments on commit 68c011e

Please sign in to comment.