[Eclipse Plugin] How to install and use the Grepcode plugin in eclipse

Source: Internet
Author: User
Tags stack trace

Java is an open-source world, how to quickly search for the Java source you need it?
July 17, 2009, the Grepcode team released an interesting Java source search engine-grepcode. Compared with the various search engines available, Java source search engine-grepcode the Java source to a new level. Java source search engine-grepcode not only provides syntax highlighting and javadoc the reality, but also provides a very friendly interface Java Type Integration view, easy for people to search. Users can easily find the engineering code that a particular version of the code relies on. Java source search engine-grepcode also allows users to navigate directly to the calling Java method body from a call to a Java method. Stack trace Search is another highlight of Java source search engine-grepcode, which allows programmers to quickly locate an exception corresponding to the code, without the need to download the entire functionality of the source package or a third-party source code package.
The author uses Java source search engine searches "Tapestry"
The returned result is two columns: Types and Projects, where types returns a definition list of the interfaces and classes in each version of tapestry, and Projects returns the package name tapestry each version. Visible Java source search engine-grepcode return results are very clear human, is the developer of the first choice to consult the source code!

Java source search Engine-grepcode website:

Http://grepcode.com

The GC plugin for Eclipse, like any other eclipse plug-in, can be installed in the following steps:

    1. Help, Install new software.

    2. Click the "Add ..." button and enter the update URL for name and Grepcode http://repository.grepcode.com/java/ext-eclipse/
    3. Click on the "Next" button to enter the "Install Details" page

    4. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.