Browser Integration: On windows use JNA and follow users browser choice for default browser#8224
Conversation
19458a1 to
13ae1c9
Compare
mbien
left a comment
There was a problem hiding this comment.
changes look good to me - dropping custom native libs is always good to see since it makes maintenance much easier.
I suppose the reason why -J-Dorg.netbeans.modules.extbrowser.UseDesktopBrowse=true didn't work for the user was because the exception happened in a static initializer so the logic gave up before being able to switch to the JDK impl.
This comment was marked as resolved.
This comment was marked as resolved.
|
#3960 can be likely also linked with this PR (unfortunately I can't easily test this) |
|
@mbien thank you for comments. Updated the code accordingly. The now third commit makes the changes to follow users choice of browser. I tested with Firefox, Edge, Opera and Chrome on Windows 10. Changing browser after NetBeans opened the first browser window will not pick up changes in the default browser, but after a restart of NetBeans new browser preferences are picked up. The issue was, that the old code only queried the global registry paths, not the user specific preferences. The whole registry poking for the default value was replaced by using @michelecos, @pontushenriksson, @hellsing71, @kamilkrzywanski, @dragonsKnight5 you all commented on #3960, so it would be great if you could test the dev build available from https://github.com/apache/netbeans/suites/34437970812/artifacts/2597699302 (or via the checks page or this PR) |
9da58df to
de41392
Compare
This reduces the amount of native code that needs to be shipped with NetBeans and allows to support running on more platforms. The DDE based control was completely removed as in tests MS Edge, Google Chrome and Mozilla Firefox all did not support DDE. Closes: apache#8218
…ml instead of manually poking registry The function correctly handles user settings, instead of relying on system wide settings (that are not changed when user changes his default browser).
de41392 to
55cbd05
Compare
|
I intent to merge this next week unless objections are raised. |
|
Just discovered this patch; thanks a bunch! It had been on my TODO list forever to figure out why links would open in Internet Explorer instead of Chrome. Tested the PR and found it to open links in Chrome now. And great that you were able to remove so much old code... |
This reduces the amount of native code that needs to be shipped with
NetBeans and allows to support running on more platforms.
The DDE based control was completely removed as in tests MS Edge,
Google Chrome and Mozilla Firefox all did not support DDE.
In addition the code to query the registry keys for the default browser
was updated to consider the users browser selection.
Closes: #8218
Closes: #3960
Closes: #6626