| Summary: | [Compatibility] Opening an HTML page goes external | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Paul Webster <pwebster> | ||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cgold, emoffatt, gheorghe, grant_gayed, remy.suen | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 4.1 RC3 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Paul Webster
(In reply to comment #0) > When I click on one of our about.html in 4.1 it opens externally in FF. When I > do the same in 3.7, it opens in an internal web browser editor. With 3.7 I20110428-0848 in a new workspace my HTML files are defaulted to externally. (In reply to comment #1) > (In reply to comment #0) > > When I click on one of our about.html in 4.1 it opens externally in FF. When I > > do the same in 3.7, it opens in an internal web browser editor. > With 3.7 I20110428-0848 in a new workspace my HTML files are defaulted to > externally. If you're on a very new linux distro then you'll probably find that the latest 3.7 build has more luck opening its internal Browser than 3.7M7. There have been multiple fixes in this area related to WebKitGTK's ABI compatibility being broken between its 1.2 and 1.4 releases. On Windows 7 I'm seeing the same results as Paul, i.e. on 3.7 a browser editor is opened, on 4.1 an external window is opened. I have not tried Linux yet. As Grant noted an external browser is always opened if a Browser widget cannot be created successfully. (In reply to comment #3) > On Windows 7 I'm seeing the same results as Paul, i.e. on 3.7 a browser editor Chris, were there supporting changes made in o.e.ui.workbench that maybe I haven't picked up because my compat layer is a fork? PW It appears that the BrowserLauncher class is not getting called on Eclipse 4.1 Here is the extension which declares the default html editor.
<extension point="org.eclipse.ui.editors">
<editor
extensions="htm,html,shtml"
icon="$nl$/icons/obj16/internal_browser.gif"
id="org.eclipse.ui.browser.editorSupport"
launcher="org.eclipse.ui.internal.browser.BrowserLauncher"
name="%viewWebBrowserSupportTitle"/>
</extension>
Here are several things I've noticed while debugging
With a clean workspace on Eclipse 3.7 opening an html file hits a breakpoint set in BrowserLauncher, on 4.1 it does not.
On Eclipse 4.1 the choice of external browser has no effect, the default system browser is used.
It appears that opening a .html file is always using the system browser rather than the code in org.eclipse.ui.browser.
Created attachment 196695 [details] WorkbenchPage patch v1 We added IEditorLauncher support in bug 335599. But some time, many moons before in a galaxy far, far away, we had added code to "ignore" the org.eclipse.ui.browser.editorSupport editor id. Removing this check fixes the problem. (In reply to comment #6) > Created attachment 196695 [details] > WorkbenchPage patch v1 Fix released to CVS HEAD. Works fine for me with I20110604-2201 on Windows XP. Paul, if this doesn't work on Linux for you, let me know. |