diff --git a/pom.xml b/pom.xml index 746884e..b1a45b6 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 io.github.jeddict jeddict-ai - 1.8 + 1.9 nbm Jeddict AI Assistant Jeddict AI Assistant is a powerful and intuitive plugin designed for Apache NetBeans IDE. diff --git a/src/main/java/io/github/jeddict/ai/JeddictUpdateManager.java b/src/main/java/io/github/jeddict/ai/JeddictUpdateManager.java index efe8c82..a1bf947 100644 --- a/src/main/java/io/github/jeddict/ai/JeddictUpdateManager.java +++ b/src/main/java/io/github/jeddict/ai/JeddictUpdateManager.java @@ -46,7 +46,7 @@ private static String getCurrentNetBeansVersion() { } private static String getCurrentJeddictVersion() { - return "1.8"; + return "1.9"; } private File saveFile; @@ -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); @@ -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; @@ -101,7 +102,7 @@ && isVersionGreater(version, getCurrentJeddictVersion())) { } if (nbmFile != null) { - showInstallPopup(version, nbmFile); + showInstallPopup(version, releaseNotes, nbmFile); } } catch (Exception e) { @@ -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; @@ -148,6 +149,7 @@ private void showInstallPopup(String version, String nbmUrl) { titleLabel.setAlignmentX(Component.CENTER_ALIGNMENT); JLabel infoLabel = new JLabel("Version: " + version + "
" + + ((releaseNotes != null && !releaseNotes.trim().isEmpty()) ? (releaseNotes + "
") : "") + "Click below to download the update or learn more."); infoLabel.setAlignmentX(Component.CENTER_ALIGNMENT);