dragonsKnight5 commented on code in PR #6626:
URL: https://github.com/apache/netbeans/pull/6626#discussion_r1374051068
##########
ide/extbrowser/src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java:
##########
@@ -127,6 +133,59 @@ public NbDdeBrowserImpl (ExtWebBrowser extBrowserFactory) {
*/
public static native String getDefaultOpenCommand() throws
NbBrowserException;
+ /**
+ * Get the default browser name using Java JNA library
+ * @return String
+ */
+ private static String getDefaultWindowsBrowser() {
+ String userChoice = Advapi32Util
+ .registryGetStringValue(
+ WinReg.HKEY_CURRENT_USER,
+
"SOFTWARE\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\https\\UserChoice",
+ "ProgId"
+ )
+ .toUpperCase(Locale.ROOT);
+
+ // done this way so that values like FirefoxURL-308046B0AF4A39CB can
be handled
+ if (userChoice.toUpperCase().contains(ExtWebBrowser.FIREFOX)) {
+ return ExtWebBrowser.FIREFOX;
+ }
+ else if (userChoice.toUpperCase().contains(ExtWebBrowser.CHROME)) {
+ return ExtWebBrowser.CHROME;
+ } else if (userChoice.toUpperCase().contains(ExtWebBrowser.CHROMIUM)) {
+ return ExtWebBrowser.CHROMIUM;
+ } else if (userChoice.toUpperCase().contains(ExtWebBrowser.MOZILLA)) {
+ return ExtWebBrowser.MOZILLA;
+ } else {
+ return ExtWebBrowser.IEXPLORE;
+ }
Review Comment:
When I backed up my fork before deleting and reforking netbeans I've somehow
managed to grab the previous code configuration for this function :tired_face:
Now fixed again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists