Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 251789 - Open External Javadoc should use Web Browser settings
Summary: Open External Javadoc should use Web Browser settings
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 125426 272875 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-22 18:32 EDT by Trevor CLA
Modified: 2009-12-08 16:23 EST (History)
6 users (show)

See Also:


Attachments
Work in progress (6.99 KB, patch)
2009-05-25 04:27 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trevor CLA 2008-10-22 18:32:13 EDT
The original enhancement request (bug #125426) was closed, possibly mistakenly, without being addressed. The original request was to use the internal browser when the users selects Open External Javadoc.  I also see this issue in 3.3.2 - there is no way to use the internal browser for viewing javadocs. 


+++ This bug was initially created as a clone of Bug #125426 +++

Please look up the setting in Preferencs->General-Web Browser to decide whether to launch an external browser or use the internal browser when the user selects Navigate->Open External Javadoc.

At the moment regardless of the choice an external browser is launched.

Many thanks

Jonathan
Comment 1 Chris Goldthorpe CLA 2008-10-22 18:50:23 EDT
Now I look at the bug again I can see that it was closed in error. Assigning to JDT.
Comment 2 Dani Megert CLA 2008-10-23 05:20:50 EDT
We use the Help system because it is capable of showing files inside archives. Unfortunately the Help system always want to run externally or in the Help view.

In order to use IWorkbenchBrowserSupport instead of the Help system we'd have to implement the archive support ourselves, which is currently not planned.
Comment 3 Dani Megert CLA 2008-10-23 05:45:41 EDT
Chris, would it be possible for Help to give a Help web app URL for a given local/relative URL, so that we could use the browser support to open the given help web app URL?
Comment 4 Chris Goldthorpe CLA 2008-10-23 13:12:08 EDT
Dani, what API from the help system are you using right now to open JavaDoc? Is it the case that the URI which you are passing in could be either a help system URI or a local file system URI? 
Comment 5 Dani Megert CLA 2008-10-24 04:34:01 EDT
We use the following API:
org.eclipse.ui.help.IWorkbenchHelpSystem.displayHelpResource(String)

The reason use the help server/API is because it can look into JARs i.e. it supports URLs like:
jar:file:/C:/JavaSDKs/jdk6_10/jdk-6-doc.zip!/docs/api/java/util/HashMap.html
(we append ?noframes=true but that's a detail)

which results in:

http://127.0.0.1:2526/help/nftopic/jar:file:/C:/JavaSDKs/jdk6_10/jdk-6-doc.zip!/docs/api/java/util/HashMap.html
Comment 6 Dani Megert CLA 2009-04-20 08:49:07 EDT
*** Bug 272875 has been marked as a duplicate of this bug. ***
Comment 7 Dani Megert CLA 2009-04-20 09:24:55 EDT
Moving to User Assistance to get the new API. Please move back to JDT once this is available.

API that allows to transform the URL so that we can read/load files from a JAR would be sufficient.
Comment 8 Chris Goldthorpe CLA 2009-04-20 13:39:13 EDT
Dani, can you give more detail about what the new API is that you are looking for? I saw Comment #3 but I was not sure what the new API would look like. Are you just looking for a function that would take "jar:file:/C:/JavaSDKs/jdk6_10/jdk-6-doc.zip!/docs/api/java/util/HashMap.html" as a parameter and return http://127.0.0.1:2526/help/nftopic/jar:file:/C:/JavaSDKs/jdk6_10/jdk-6-doc.zip!/docs/api/java/util/HashMap.html as the result?
Comment 9 Markus Keller CLA 2009-04-27 06:48:41 EDT
(In reply to comment #8)
Yes, with the side effect that the help server is started.
Comment 10 Chris Goldthorpe CLA 2009-05-20 16:50:53 EDT
I notice that there is a function resolve() in IWorkbenchHelpSystem which is used like this:

PlatformUI.getWorkbench().getHelpSystem().resolve(href, documentOnly);

and which starts the help system. Could that work for you?

Comment 11 Dani Megert CLA 2009-05-21 06:20:45 EDT
That's exactly what we need. Good catch Chris!
Comment 12 Dani Megert CLA 2009-05-25 04:27:57 EDT
Created attachment 136972 [details]
Work in progress
Comment 13 Dani Megert CLA 2009-11-17 12:47:42 EST
*** Bug 272875 has been marked as a duplicate of this bug. ***
Comment 14 Dani Megert CLA 2009-11-18 04:51:17 EST
Fixed in HEAD.
Available in builds > N20091117-2000.
Comment 15 Dani Megert CLA 2009-11-18 04:51:33 EST
*** Bug 125426 has been marked as a duplicate of this bug. ***
Comment 16 Raksha Vasisht CLA 2009-12-08 08:50:39 EST
Verified for 3.6 M4 with I20091207-1800.
Comment 17 Tom Hofmann CLA 2009-12-08 16:23:23 EST
Verified for 3.6 M4 with I20091207-1800 on Vista64 with 32bit Browsers.