The Grepcode (GC) Eclipse plug-in allows eclipse users to search the Eclipse IDE for factory classes provided by Grepcode. This tutorial describes how to install and use plug-ins. Use the screeshots of Eclipse3.5 (Galileo). Similar steps can be followed with the Eclipse 3.4.x release (Ganymede).
- System Requirements
- Update site location
- Installation
- Usage
See also: Grepcode IntelliJ idea Plugin
System Requirements
GC plug-ins are compatible with the following versions of Eclipse
- 3.5.x (Galileo)
- 3.4.x (Ganymede)
- 3.3.x (Europa)
Update site location
The update URL for the Grepcode plugin is as follows:
http://repository.grepcode.com/java/ext-eclipse/
Installation
The GC plugin for Eclipse, like any other eclipse plug-in, can be installed in the following steps:
- Help, Install new software.
- Click the "Add ..." button and enter the update URL for name and Grepcode http://repository.grepcode.com/java/ext-eclipse/
- Click on the "Next" button to enter the "Install Details" page
- Accept the license description and click on the "Finish" button.
Usage
After the GC plug-in was successfully installed in eclipse in the previous step, we can use it to browse the source code in the open source repository used in our codes, as illustrated below:
- Suppose you are on a project that involves an open source library, such as jgroups. Your project is registered as a jgroups-all.jar of its dependencies (i.e., assuming that a class in your project is used in the open source repository of jgroups), as shown below.
- The "Jchannel" class in the JGroups class library used in the "Jgroupstest" project. In the "Jchannel" class we press the F3 key to see "Jchannel" class source code, we will find "class File Editor" Prompt "no source", we can only browse to "Jchannel" part of the description, not what we want to see " The source code for the Jchannel class.
- Although we do not see the "Jchannel" source code in the "Class File Editor" view, we can search the "Jchannel" class in Grepcode by clicking the "GC Search" button on the tools panel and using the GC plugin. The search results are displayed in the GC Search tab in the IDE.
- Now we can choose the source version corresponding to our project to view the source code of the "Jchannel" class.
- We can also use the shortcut key "Ctrl+m" to maximize the "Class File Editor" window to facilitate us to read the source code.
Original reproduced in: http://www.cnblogs.com/DiYuShe/archive/2012/06/14/2549290.html
How to install and use the Grepcode plug-in in Eclipse (GO)