This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 194271 - ExternalWWWBrowser property not set correctly causing showURLExternal to ignore prefered Web browser setting
Summary: ExternalWWWBrowser property not set correctly causing showURLExternal to igno...
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 normal (vote)
Assignee: Jan Stola
Depends on:
Reported: 2011-01-12 15:20 UTC by ibeaumont
Modified: 2015-01-28 13:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description ibeaumont 2011-01-12 15:20:40 UTC
I've my own platform project - I've included the external browser module, that works fine.  But the options to set the prefered browser (in the options dialog) are ignored and it always uses the default system browser.

Tracing through the code, when it sets the browser it calls, this method in
    public static void setWWWBrowser (HtmlBrowser.Factory brow) {
        setBrowser( PROP_WWWBROWSER, brow );
        if( isExternal( brow ) ) {

It is the isExternal call that is the problem, because that method ONLY ever returns FALSE.  This code I thing is wrong.

Therefore the property ExternalWWWBrowser is never set, only WWWBrowser.  

The workaround to my problem is to use HtmlBrowser.URLDisplayer.getDefault().showURL, and not HtmlBrowser.URLDisplayer.getDefault().showURLExternal.
Comment 1 Tomas Mysik 2013-07-22 08:36:10 UTC
Does not seem to be a problem in the extbrowser plugin. However, not sure where this class [1] belongs. Please evaluate.

[1] o.n.core/src/org/netbeans/core/
Comment 2 Marian Mirilovic 2013-07-22 14:47:38 UTC
me neither ....

Reporter, is this about problems in your own code ?
Comment 3 ibeaumont 2013-07-22 15:10:28 UTC
No, this is a problem in the platform code not working as expected.

If I call 
should it not use the external browser?

It doesn't and I had to use HtmlBrowser.URLDisplayer.getDefault().showURL

As I say in the comments the method "isExternal" in seems wrong as it only ever returns "false".