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 47114 - ExtBrowser doesn't work with FireFox
Summary: ExtBrowser doesn't work with FireFox
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker with 1 vote (vote)
Assignee: Martin Grebac
URL:
Keywords:
: 41520 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-11 15:05 UTC by crued
Modified: 2004-12-14 18:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
patch to extbrowser (release35) (1.55 KB, patch)
2004-08-11 17:09 UTC, crued
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crued 2004-08-11 15:05:21 UTC
If FireFox is set as your default browser, openURL
doesn't properly open the browser... The browser
opens, but stays at the home page.  In NetBeans,
you see the error:
org.netbeans.modules.extbrowser.NbBrowserException:
DdeConnect errno >400A< when connecting to server
IEXPLORE, topic WWW_Activate. 


Here's a patch (from the release35 code) to
extbrowser that allows it to work with FIREFOX. 
It was a fairly simple matter of adding FIREFOX
every place that
I saw other browsers listed, and adding a constant
for FIREFOX in WinWebBrowser.

Of course, the patch will be different in the
trunk (the trunk doesn't seem to use the full path
to the executable anymore, for one thing) but this
should give you an idea of what needs to be done.



Index:
src/org/netbeans/modules/extbrowser/BrowserPropertyEditor.java
===================================================================
RCS file:
/cvs/extbrowser/src/org/netbeans/modules/extbrowser/Attic/BrowserPropertyEditor.java,v
retrieving revision 1.5
diff -u -r1.5 BrowserPropertyEditor.java
---
src/org/netbeans/modules/extbrowser/BrowserPropertyEditor.java
     2 Jan 2002 18:04:25 -0000    1.5
+++
src/org/netbeans/modules/extbrowser/BrowserPropertyEditor.java
     11 Aug 2004 13:50:21 -0000
@@ -30,7 +30,7 @@
             throw new IllegalArgumentException ();

         if (str.equals(WinWebBrowser.IEXPLORE) ||
str.equals(WinWebBrowser.NETSCAPE) ||
-            str.equals(WinWebBrowser.NETSCAPE6)
|| str.equals(WinWebBrowser.MOZILLA))
+            str.equals(WinWebBrowser.NETSCAPE6)
|| str.equals(WinWebBrowser.MOZILLA) ||
str.equals(WinWebBrowser.FIREFOX))
             setValue (str);

         if (str.equals (NbBundle.getMessage
(BrowserPropertyEditor.class,
"LBL_SystemDefaultBrowser")))
@@ -45,6 +45,7 @@
             WinWebBrowser.IEXPLORE,
             WinWebBrowser.NETSCAPE,
             WinWebBrowser.NETSCAPE6,
+            WinWebBrowser.FIREFOX,
             WinWebBrowser.MOZILLA
         };
         return tags;
Index:
src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java
===================================================================
RCS file:
/cvs/extbrowser/src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java,v
retrieving revision 1.25
diff -u -r1.25 NbDdeBrowserImpl.java
---
src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java
  31 Oct 2002 14:45:35 -0000      1.25
+++
src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java
  11 Aug 2004 13:50:21 -0000
@@ -214,6 +214,9 @@
                 if (cmd.toUpperCase ().indexOf
(WinWebBrowser.NETSCAPE) >= 0)
                     return WinWebBrowser.NETSCAPE;

+                if (cmd.toUpperCase ().indexOf
(WinWebBrowser.FIREFOX) >= 0)
+                    return WinWebBrowser.FIREFOX;
+
                 if (cmd.toUpperCase ().indexOf
(WinWebBrowser.MOZILLA) >= 0)
                     return WinWebBrowser.MOZILLA;
             }
Index:
src/org/netbeans/modules/extbrowser/WinWebBrowser.java
===================================================================
RCS file:
/cvs/extbrowser/src/org/netbeans/modules/extbrowser/WinWebBrowser.java,v
retrieving revision 1.17
diff -u -r1.17 WinWebBrowser.java
---
src/org/netbeans/modules/extbrowser/WinWebBrowser.java
     31 Oct 2002 14:45:42 -0000      1.17
+++
src/org/netbeans/modules/extbrowser/WinWebBrowser.java
     11 Aug 2004 13:50:21 -0000
@@ -36,6 +36,8 @@
     public static final String IEXPLORE =
"IEXPLORE";   // NOI18N
     /** Name of DDE server corresponding to
Mozilla */
     public static final String MOZILLA  =
"MOZILLA";    // NOI18N
+    /** Name of DDE server corresponding to
FireFox  */
+    public static final String FIREFOX  =
"FIREFOX";    // NOI18N
     /** Name of DDE server corresponding to
Netscape 6.x */
     public static final String NETSCAPE6 =
"NETSCAPE6";   // NOI18N

@@ -136,6 +138,8 @@
         catch (NbBrowserException e) {
             if (WinWebBrowser.IEXPLORE.equals
(getDDEServer ()))
                 b = "C:\\Program Files\\Internet
Explorer\\iexplore.exe";     // NOI18N
+            else if (WinWebBrowser.FIREFOX.equals
(getDDEServer ()))
+                b = "C:\\Program Files\\Mozilla
Firefox\\firefox.exe";     // NOI18N
             else if (WinWebBrowser.MOZILLA.equals
(getDDEServer ()))
                 b = "C:\\Program
Files\\Mozilla.org\\Mozilla\\mozilla.exe";     //
NOI18N
             else if
(WinWebBrowser.NETSCAPE.equals (getDDEServer ()))
Comment 1 crued 2004-08-11 17:09:34 UTC
Created attachment 16759 [details]
patch to extbrowser (release35)
Comment 2 Petr Jiricka 2004-08-21 13:50:11 UTC
*** Issue 41520 has been marked as a duplicate of this issue. ***
Comment 3 Martin Grebac 2004-08-23 14:00:59 UTC
Thanks for the patch. I see the problem is that the firefox has
different DDE server than mozilla so I'll add FIREFOX support to 4.0, too.
Comment 4 Petr Jiricka 2004-09-14 18:45:35 UTC
BTW, now Firefox 1.0 has been released.
Comment 5 Martin Grebac 2004-09-15 12:18:13 UTC
It's still not final release, just a preview.
Comment 6 Martin Grebac 2004-11-29 15:49:09 UTC
Fixed in trunk.
Comment 7 Petr Jiricka 2004-12-14 18:36:37 UTC
Implemeted by Martin.
Comment 8 zikmund 2004-12-14 18:43:19 UTC
Correcting TM.