Community
Participate
Working Groups
N20101221-2000 Show Javadoc of org.eclipse.swt.layout.FormLayout in the Javadoc view. Scroll down and click the link "Sample code and further information". This shows the linked URL in the Javadoc view. But now, I have no way to open the shown page in an external browser. I see 2 solutions (preferring A): A) When the Javadoc view shows an URL, rename the button / context menu action to "Open in External Browser" and then open the URL. B) Never show a linked page in the Javadoc view, but always open an external browser (like the Javadoc hover).
Solution A) would also have to add support for Back/Forward navigation in the Javadoc view when an external page is shown. Currently, there's no way back.
This used to work (e.g. 3.4) but got broken. The code is mostly still in the JavadocView. Manju, when fixing this, please also fix the enablement of the button (see bug for 405376 details).
(In reply to comment #2) > This used to work (e.g. 3.4) but got broken. The code is mostly still in the > JavadocView. Yes, this feature was broken during the fix for bug 236850. In JavadocView#handleExternalLink() a new condition was added: (fCurrent.getInputElement() instanceof URL && url.toExternalForm().equals(((URL)fCurrent.getInputElement()).toExternalForm())) If I revert back this condition to the earlier one, then we get the desired result. Markus, can you tell the consequence of reverting the condition?
(In reply to comment #3) Good findings! The change in JavadocView#handleExternalLink() was unrelated to bug 236850. However, it's important that we never call URL#equals(Object), since the default implementation is badly broken (see e.g. bug 286229 comment 0). Unfortunately, I got the condition wrong. Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=74f9735980e7fa9a1c1f1288e79b906146957217
Created attachment 230002 [details] Patch. This bug fix is supposed to take care of enablement of 'Open in Browser' button also. Uploading the patch for that.
(In reply to comment #5) > Created attachment 230002 [details] [diff] > Patch. > > This bug fix is supposed to take care of enablement of 'Open in Browser' > button also. Uploading the patch for that. The call should be before the 'if', because the 'else' can exit with an exception. Otherwise the fix is OK. Please adjust and commit.
.
Thanks Dani. Moved the fix before 'if'. Fixed with http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=56a71d2ee66ee21cb47311029b03237f147ab8dd