Project
IntelliJ IDEA: Backlog
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Duplicate
Assignee
Anton Makeev
Subsystem
No subsystem
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Maxim Shafirov
    7 years ago (07 Feb 2005 21:07)
  • Updated by   Maxim Shafirov
    3 years ago (28 Oct 2008 18:27)
  • Jira: IDEABKL-2127
    (history, comments)
 
IDEABKL-2127 Shift-F1 fails w/ "Malformed url: jar://..." when Javadocs are attached as a jar file, instead of as a directory
5
Issue is visible to: All Users
  The issue is visible to the selected user group only
http://www.intellij.net/tracker/idea/viewSCR?publicId=37775
I attach Javadocs in jar form to a dependency lib in my project path settings. I then select a class from that lib in the editor and press Shift-F1. An error windows pops up w/ the following message:

Malformed url: jar://C:/repository/commons-lang/jars/commons-lang-api-2.0.jar!/org/apache/commons/lang/StringUtils.html

This URL is correct though. The jar C:/repository/commons-lang/jars/commons-lang-api-2.0.jar does exist and does contain the entry org/apache/commons/lang/StringUtils.html.

Perhaps this bug ws introduced w/ the recent fix for issue #6439? - just a wild guess. Anyway, please fix this asap, as itmakes it impossible for my development team to reference api jars stored in our Maven repository.

Thanks and regards,
Ian Springer
Hewlett-Packard Company


Issue was resolved
Comments (4)
 
History
 
Linked Issues (?)
 
Esko Luontola
  Esko Luontola
03 Jan 2008 21:13
4 years ago
As of build 7626, this problem still exists (see picture).

This problem affects the Maven integration in IDEA 7. I have configured Maven integration to download all javadocs, but because of this bug it is not possible to view them in an external browser. Because Ctrl+Q works even with only the source code, there is little benefit in having the option to download the javadocs (except when an artifact has no source code).

I suppose it is a problem that (most) web browsers don't know how to browse files inside JAR files.

Some solutions come to my mind:

  • Implement a plugin for Firefox (and others) for transparently browsing JAR/ZIP files. Then by pointing the browser to an URL "file:///C:/foo/myLibrary.jar!javadocs/index.html" it would be possible to read the javadocs without unpacking the file. If the browser does not have the plugin installed, IDEA should offer to install it on pressing Shift+F1.

  • Show the javadocs in an internal browser, if the external browser does not support browsing files inside JAR files (and there is no plugin for it). IDEA already has Mozilla Preview for HTML files, so this should be quite realistic to implement.

  • Unpack the javadocs to a temporary folder. This might need to be done before the user presses Shift+F1 because it can take a long time to unpack (or IDEA should first unpack the page which is just opened and the pages to which it has links). Also this might take lots of unnecessary HDD space (javadocs can be large but they compress quite well). That's why this is the worst solution.
Esko Luontola
  Esko Luontola
08 Feb 2008 02:27
4 years ago
It seems that there is already a plugin for Firefox which allows browsing ZIP files as if they were unpacked. The plugin is called FoxDoc:
https://addons.mozilla.org/en-US/firefox/addon/1847
http://percro.sssup.it/~pit/mozilla/foxdoc/

So now is only needed that IDEA would create the right kind of a URL and open it in the browser. This support should be integrated into IDEA so that it would work transparently with both Ctrl+Q and Shift+F1. Also, IDEA should automatically recognize a ZIP containing JDK's documentation, the same way as it automatically recognizes an unpacked "docs" directory in the JDK home. If FoxDoc is not installed, IDEA should volunteer to install it automatically.

The URL format understood by FoxDoc looks like this
jar:file:///C:/Documents%20and%20Settings/ORFJackal/.m2/repository/org/acegisecurity/acegi-security/1.0.6/acegi-security-1.0.6-javadoc.jar!/org/acegisecurity/Authentication.html
Esko Luontola
  Esko Luontola
08 Feb 2008 02:53
4 years ago
I looked at IDEA's code and found the right place to modify. It would be necessary to modify com.intellij.ide.BrowserUtil#launchBrowser and make Firefox the handler of the jar:file protocol.
Henrik Schmidt-Møller
  Henrik Schmidt-Møller
07 Jun 2008 23:48
3 years ago
I've created an Idea Plugin (JarDoc) that can be used as a workaround. See also IDEABKL-4768