Open source libraries are very popular in Java world. Nowadays Java/J2EE/Android developers often work with Java-based projects which using a lot of open source Java libraries.
One issue with using open source Java libraries is how to find documentation/source code for these open source libraries fast and easly? It is tedious and time consuming to search for the source code, download and attach source code packages to the libraries. If your project has 40 libraries, how long will it take to find source code for all libraries?
The solution is to use this Eclipse plugin to do the task for you with only one mouse click. This Eclipse plugin will help to find source code for open source Java libraries automatically from Internet. Just right click on a Java library, choose the menu item "Attach Java Source" and wait. The source code for the library will be found and attached to the Java library in several seconds.
Install plugin:
- Use Update site URL: http://svn.codespot.com/a/eclipselabs.org/free-plugins/trunk/site/
- Or download offline: download plugin from http://svn.codespot.com/a/eclipselabs.org/free-plugins/trunk/site/plugin... and save it to eclipse/dropins/ folder
Note for Android developers:
- When programming Android projects using Google ADT plugin, the jar files inside libs folder will be added as libraries automatically but Eclipse will not allow change source code path for these libraries. This plugin can attach source code for Android libraries and will help Android developers in coding / debugging.
Usage:
Right click on a Java library of a Java-based project and choose the menu item "Attach Java Source" and wait for the source code to be downloaded/attached to the library automatically (you will see a background job is running on Eclipse status bar).
Features:
- Find source code for Java libraries using all popular Java repositories on Internet (Like Maven Central repository, Nexus-based repositories, Eclipse P2 repositories, ...)
- (NEW) Now Eclipse plugin developers can use this plugin to find source code for Eclipse plugins using Eclipse P2 repository. Please provide feedback if you are plugin developer.
- The plugin also uses a special cloud-based search service designed for the plugin. This search service contains information about all Apache Java projects. This means source code for any Apache Java-based library will be found.
- If source code for a Java library cannot be found, the user can help the community by providing the URL for the source code archive (in Zip or Jar file format) and the source code will be found next time! You are helping youself and others when providing information about source code for a library!
Compatibility:
Tested with Eclipse 3.5 to 3.8 (but should also work with 4.x).
Requirements:
- JDK 5+
- Eclipse 3.5+
- An Internet connection (to search and download source code)
You might also like the plugins:
- Java Examples Search to find example code from Eclipse.
- Java Dependency Viewer to view your class dependencies and package dependencies visually.
Reviews
Bug?
I tried installing it to the developer preview 4.3 M6 and it made all right-clicking stop working. I didn't receive any exception.
Is there a way to correct the
Is there a way to correct the database when it attaches the wrong source jar? The plugin keeps trying to attach the jcommander source to the testng library.
Sorry but there is no way to remove wrong links
Sorry but there is no way to remove wrong links, could you give me the name+version or the md5 of the jar file? I will search and remove it from database
where does this copy the source jar that it downloads?
where does this copy the source jar that it downloads?
Source code location for the plugin
Source code location for the plugin is /.sourceattacher/
not working for me..
i tried axis.jar and commons-beanutils.jar with eclipe 3.6
I select the "Attach source file" option, and after doing this, I click on a class file but eclipse says "source not found"
There are several libraries which are not easy to find source
There are some libraries which are not easy to find the source code automatically because it is not in our database yet. For these cases, you can help by providing the URL of the source code bundle (in zip or jar format) and the database will save the URL. Next time, you or other users will find the source code automatically.