Project: JDT
Bug 168209 [actions] Javadoc Attachments do not open on Shift-F2 when target folder contains spaces and plug-in is not jarD
Reported: 2006-12-15 09:38:51 | Status: resolved fixed

Build ID: M20060629-1905 Steps To Reproduce: 1. Switch Target Platform to a one that contains spaces in path 2. Put a plug-in that implements the extension-point 'org.eclipse.pde.core.javadoc' and is *not* jarD up into the this Target Platform 3. Within the ide create a class that references a class that's described by the Javadoc Attachment plug-in. Try to open the Javadoc Attachment from within the ide using Shift-F2 --> An error dialog shows up, denoting that the file could not be found If the plug-in (not the documentation itself) is jarD it does work. Also the javadoc that does show up on hover. The cause for this is that the path is percent encoded and the file exists check fails. It brings up the error dialog, although the url is valid and the OpenBrowserUtil would open this file. Due to this check is only executed if protocol is "file", this does not occur when the plug-in is jarD. See: org.eclipse.jdt.ui.actions.OpenExternalJavadocAction.run(IJavaElement element) line 191 if ("file".equals(baseURL.getProtocol())) { //$NON-NLS-1$ URL noRefURL= JavaUI.getJavadocLocation(element, false); if (!(new File(noRefURL.getFile())).isFile()) { String message= ActionMessages.OpenExternalJavadocAction_no_entry; showMessage(shell, Messages.format(message, new String[] { labelName, noRefURL.toExternalForm() }), false); return; } } More information:

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenExternalJavadocAction.java