Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349090

Summary: org.eclipse.ui.browser does not find Firefox when installed in Program Files (x86)
Product: [Eclipse Project] Platform Reporter: Ian Tewksbury <itewksbu>
Component: User AssistanceAssignee: platform-ua-inbox <platform-ua-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: cgold, remy.suen
Version: 3.6.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Ian Tewksbury CLA 2011-06-10 15:44:58 EDT
When Firefox is installed on a Windows 7 64bit machine by default it is installed in "Program Files (x86)".  The problem is the hard coded location paths for the Firefox browser in the org.eclipse.ui.browser plugin only list:

Program Files\mozilla.org\Firefox\firefox.exe
Program Files\Mozilla Firefox\firefox.exe

Another location should be added to support the "Program Files (x86)" directory:

Program Files (x86)\Mozilla Firefox\firefox.exe
Comment 1 Ian Tewksbury CLA 2011-06-10 16:32:51 EDT
Created attachment 197820 [details]
Patch

Attaching tested patch for this issue.
Comment 2 Chris Goldthorpe CLA 2011-06-10 17:35:39 EDT
Thanks for the patch.
Comment 3 Ian Tewksbury CLA 2011-06-13 08:00:13 EDT
Chris,

No problem at all.

Would it be possible to get this fix in 3.6.x?  An adopter product based on that stream is in need of this fix.
Comment 4 Ian Tewksbury CLA 2011-06-13 16:30:21 EDT
It was just pointed out to me that this was already fixed in head by bug 310926.  But again, an adopter really needs this at the 3.6.x level.
Comment 5 Chris Goldthorpe CLA 2011-06-13 17:00:46 EDT
Yes, this was fixed for Eclipse 3.7, I hadn't noticed that this was exactly the same as a fix I recently made myself. 

If this is needed for a product one workaround would be to create a simple plug-in containing this extension in plugin.xml.

   <extension  point="org.eclipse.ui.browser.browsers">
         <browser
         id="org.eclipse.ui.browser.firefox"
         name="Firefox (x86)"
         os="Win32"
         executable="firefox.exe">
         <location>Program Files (x86)\Mozilla Firefox\firefox.exe</location>
      </browser>
   </extension>

you would have to make sure that this plug-in was only included for Eclipse 3.6 and earlier.
Comment 6 Ian Tewksbury CLA 2011-06-22 10:31:17 EDT
(In reply to comment #5)
> Yes, this was fixed for Eclipse 3.7, I hadn't noticed that this was exactly the
> same as a fix I recently made myself. 
> 
> If this is needed for a product one workaround would be to create a simple
> plug-in containing this extension in plugin.xml.
> 
>    <extension  point="org.eclipse.ui.browser.browsers">
>          <browser
>          id="org.eclipse.ui.browser.firefox"
>          name="Firefox (x86)"
>          os="Win32"
>          executable="firefox.exe">
>          <location>Program Files (x86)\Mozilla Firefox\firefox.exe</location>
>       </browser>
>    </extension>
> 
> you would have to make sure that this plug-in was only included for Eclipse 3.6
> and earlier.

That worked.  But it seemed to get the browser list to update with my new contribution I had to create a clean workspace.  What about people with existing workspaces?
Comment 7 Chris Goldthorpe CLA 2011-06-22 13:46:29 EDT
The same situation would apply if the patch was built into Eclipse, anyone with an existing workspace would not see the new browsers. If you press "Restore Defaults" in the Web Browser preferences I think that will cause the new browser to show up.
Comment 8 Chris Goldthorpe CLA 2011-06-22 18:48:25 EDT

*** This bug has been marked as a duplicate of bug 310926 ***