diff --git a/pom.xml b/pom.xml
index a8bdc9a..94b0228 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,208 +1,208 @@
- 4.0.0
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
-
- de.adito.nbm
- plugin-parent
- 1.1.0
-
+
+ de.adito.nbm
+ plugin-parent
+ 1.1.0
+
- de.adito.aditoweb.nbm
- help
- 1.0.0
- nbm
+ de.adito.aditoweb.nbm
+ help
+ 1.0.1
+ nbm
-
- 13
- 13
- UTF-8
- RELEASE125
-
+
+ 13
+ 13
+ UTF-8
+ RELEASE125
+
-
+
-
-
- de.adito.nb-modules
- nb-adito-interface
- 1.9.6
-
+
+
+ de.adito.nb-modules
+ nb-adito-interface
+ 1.9.6
+
-
-
- io.reactivex.rxjava3
- rxjava
- 3.0.4
-
+
+
+ io.reactivex.rxjava3
+ rxjava
+ 3.0.4
+
-
-
- org.netbeans.api
- org-openide-actions
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-util
- ${netbeans.version}
-
-
- org.netbeans.api
- org-netbeans-modules-projectapi
- ${netbeans.version}
-
-
- org.netbeans.api
- org-netbeans-modules-keyring
- ${netbeans.version}
-
-
- org.netbeans.api
- org-netbeans-api-progress
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-filesystems
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-util-lookup
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-nodes
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-util-ui
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-modules
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-windows
- ${netbeans.version}
-
-
- org.netbeans.api
- org-openide-awt
- ${netbeans.version}
-
-
- org.netbeans.api
- org-netbeans-modules-projectuiapi-base
- ${netbeans.version}
-
-
- org.netbeans.api
- org-netbeans-swing-outline
- ${netbeans.version}
-
+
+
+ org.netbeans.api
+ org-openide-actions
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-util
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-netbeans-modules-projectapi
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-netbeans-modules-keyring
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-netbeans-api-progress
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-filesystems
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-util-lookup
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-nodes
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-util-ui
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-modules
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-windows
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-openide-awt
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-netbeans-modules-projectuiapi-base
+ ${netbeans.version}
+
+
+ org.netbeans.api
+ org-netbeans-swing-outline
+ ${netbeans.version}
+
-
-
- org.junit.jupiter
- junit-jupiter
- 5.7.1
- test
-
-
- org.mockito
- mockito-inline
- 4.8.1
- test
-
-
-
- org.mockito
- mockito-junit-jupiter
- 4.8.1
- test
-
+
+
+ org.junit.jupiter
+ junit-jupiter
+ 5.7.1
+ test
+
+
+ org.mockito
+ mockito-inline
+ 4.8.1
+ test
+
+
+
+ org.mockito
+ mockito-junit-jupiter
+ 4.8.1
+ test
+
-
-
- org.jetbrains
- annotations
- 13.0
- provided
- true
-
-
- commons-io
- commons-io
- 2.8.0
-
-
- org.json
- json
- 20160212
-
-
- com.google.code.gson
- gson
- 2.8.6
- compile
-
-
- com.google.guava
- guava
- 29.0-jre
-
-
- de.adito.nb-modules
- de-adito-netbeans-utilities
- RELEASE125-1.9.5
-
-
- de.adito.nbm
- de-adito-metrics-api
- RELEASE125-1.9.1
-
-
- de.adito.nbm.wrappers
- lwhttpclient
- 4.5.2-1.3.0
-
-
- de.adito.util
- reactive
- 1.1.0
-
-
+
+
+ org.jetbrains
+ annotations
+ 13.0
+ provided
+ true
+
+
+ commons-io
+ commons-io
+ 2.8.0
+
+
+ org.json
+ json
+ 20160212
+
+
+ com.google.code.gson
+ gson
+ 2.8.6
+ compile
+
+
+ com.google.guava
+ guava
+ 29.0-jre
+
+
+ de.adito.nb-modules
+ de-adito-netbeans-utilities
+ RELEASE125-1.9.5
+
+
+ de.adito.nbm
+ de-adito-metrics-api
+ RELEASE125-1.9.1
+
+
+ de.adito.nbm.wrappers
+ lwhttpclient
+ 4.5.2-1.3.0
+
+
+ de.adito.util
+ reactive
+ 1.1.0
+
+
-
-
-
- org.apache.netbeans.utilities
- nbm-maven-plugin
- 4.5
- true
-
- true
- false
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- 11
-
-
-
-
+
+
+
+ org.apache.netbeans.utilities
+ nbm-maven-plugin
+ 4.5
+ true
+
+ true
+ false
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 11
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/de/adito/aditoweb/nbm/help/HelpActionShowDocumentation.java b/src/main/java/de/adito/aditoweb/nbm/help/HelpActionShowDocumentation.java
index 72d672b..15aaeba 100644
--- a/src/main/java/de/adito/aditoweb/nbm/help/HelpActionShowDocumentation.java
+++ b/src/main/java/de/adito/aditoweb/nbm/help/HelpActionShowDocumentation.java
@@ -20,7 +20,7 @@
import org.openide.util.actions.NodeAction;
import java.awt.*;
-import java.awt.event.ActionListener;
+import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.nio.file.*;
@@ -49,6 +49,7 @@ public class HelpActionShowDocumentation extends NodeAction
private static final String SUPPORTED_JDITO_VERSION = "2023";
private static final String JDITO_TYPES = "@aditosoftware/jdito-types";
+ private static final String BETTER_DOCS = "better-docs";
@Override
protected boolean asynchronous()
@@ -135,7 +136,7 @@ protected void performAction(Node[] nodes)
{
//installing all needed modules via npm
executeInstall(nodeJsEnv, executor, handle, "jsdoc-mermaid", 1);
- executeInstall(nodeJsEnv, executor, handle, "better-docs", 3);
+ executeInstall(nodeJsEnv, executor, handle, BETTER_DOCS, 3);
executeInstall(nodeJsEnv, executor, handle, "clean-jsdoc-theme", 5);
executeInstall(nodeJsEnv, executor, handle, "jsdoc@3.6.11", 7);
executeInstall(nodeJsEnv, executor, handle, "http-server", 9);
@@ -156,7 +157,7 @@ protected void performAction(Node[] nodes)
"Local HTTP-Server",
"localhost:" + port,
false,
- openBrowserWithURI(port.get())
+ new OpenBrowser(port.get())
);
}
catch (Exception pE)
@@ -259,8 +260,8 @@ protected String moveAndOverwriteJSDocContent(@NotNull String pPath, int pPort,
// Change the value of the "plugins" key
JsonArray pluginsArray = rootObject.getAsJsonArray("plugins");
- pluginsArray.set(2, gson.toJsonTree(getAbsolutePathOfModule(pNodeEnv, "better-docs", "category.js")));
- pluginsArray.set(3, gson.toJsonTree(getAbsolutePathOfModule(pNodeEnv, "better-docs", "typescript")));
+ pluginsArray.set(2, gson.toJsonTree(getAbsolutePathOfModule(pNodeEnv, BETTER_DOCS, "category.js")));
+ pluginsArray.set(3, gson.toJsonTree(getAbsolutePathOfModule(pNodeEnv, BETTER_DOCS, "typescript")));
// Change the value of the "opts" key
rootObject.getAsJsonObject("opts").addProperty("template", getAbsolutePathOfModule(pNodeEnv, "clean-jsdoc-theme", ""));
@@ -341,13 +342,10 @@ protected boolean checkProjectJDitoTypes(@NotNull INodeJSEnvironment pNodeJsEnvi
* Opens the standard browser of the user and directs them to the local http-server with the given port
*
* @param pPort available port that has been selected by the serversocket
- * @return null but as a actionlistener for the methods
*/
- @Nullable
- protected ActionListener openBrowserWithURI(int pPort) throws URISyntaxException, IOException
+ private void openBrowserWithURI(int pPort) throws URISyntaxException, IOException
{
Desktop.getDesktop().browse(new URI("http://localhost:" + pPort));
- return null;
}
/**
@@ -433,4 +431,27 @@ protected INodeJSExecutor getNodeJSExecutor(@Nullable Project pProject)
return INodeJSExecutor.findInstance(pProject).orElse(null);
}
+
+ private class OpenBrowser implements ActionListener
+ {
+ private final int port;
+
+ private OpenBrowser(int pPort)
+ {
+ port = pPort;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ try
+ {
+ openBrowserWithURI(port);
+ }
+ catch (Exception pException)
+ {
+ INotificationFacade.INSTANCE.error(pException);
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/nbm/manifest.mf b/src/main/nbm/manifest.mf
index 963099c..279d69e 100644
--- a/src/main/nbm/manifest.mf
+++ b/src/main/nbm/manifest.mf
@@ -3,4 +3,16 @@ AutoUpdate-Show-In-Client: true
OpenIDE-Module-Name: Help
OpenIDE-Module-Display-Category: ADITO / Documentation
OpenIDE-Module-Short-Description: Output of all JScript methods of a class and corresponding description
-OpenIDE-Module-Long-Description: Output of all JScript methods of a class and corresponding description
+OpenIDE-Module-Long-Description: Output of all JScript methods of a class and corresponding description.
+
Changelog
+ v1.0.1
+ BUGFIXES
+
+ - The plugin will no longer open 2 browsertabs after rendering
+ - The dialog after rendering the JSDoc is clickable again and opens a tab in the browser
+
+ v1.0.0
+ MAJOR
+
+ - First Public Release for the Plugin Help
+