---
title: "eclipse插件 find java  source"
author: "dikar"
date: "2011-12-29T23:23:16Z"
tags: []
categories: ["互联网"]
slug: "eclipse-find-java-source"
draft: false
lastmod: "2011-12-29T23:27:10Z"
id: 1329835
url: "https://dikar.iteye.com/blog/1329835"
---

经常遇到一些第三方的jar包没有源代码 ，故会去下面这个网址搜索

http://www.javasourcecode.org/html/open-source

 

有时打开浏览器不方便，故希望能有个eclipse插件能做这件事，刚好对eclipse插件开发感兴趣，故花了一晚上开发出这个插件，方便在eclipse里直接访问网址查询源码。

 

该插件主要是用于查询开源的 java类文件的源代码，故如果是用户自己写的类是不能查询到的。至于能查的范围在javasourcecode上列出如下：

 

 

## Browse Open Source Java Code Online

[Ant](http://www.javasourcecode.org/html/open-source/ant/ant-1.8.2) [Commons HttpClient](http://www.javasourcecode.org/html/open-source/commons-httpclient/commons-httpclient-3.1) [Hibernate](http://www.javasourcecode.org/html/open-source/hibernate/hibernate-3.6.0.Final) [Quartz](http://www.javasourcecode.org/html/open-source/quartz/quartz-2.0.2) [Avro](http://www.javasourcecode.org/html/open-source/avro/avro-1.5.1) [Commons IO](http://www.javasourcecode.org/html/open-source/commons-io/commons-io-2.0.1) [Hive](http://www.javasourcecode.org/html/open-source/hive/hive-0.7.1) [Sardine](http://www.javasourcecode.org/html/open-source/sardine/sardine-284) [Berkeley DB](http://www.javasourcecode.org/html/open-source/berkeleydb/berkeleydb-4.1.6) [Commons Lang](http://www.javasourcecode.org/html/open-source/commons-lang/commons-lang-2.6) [HttpComponents HttpClient](http://www.javasourcecode.org/html/open-source/httpcomponents-httpclient/httpcomponents-httpclient-4.1.1) [Solr](http://www.javasourcecode.org/html/open-source/solr/solr-3.3.0) [Cassandra](http://www.javasourcecode.org/html/open-source/cassandra/cassandra-0.8.1) [Commons Lang 3](http://www.javasourcecode.org/html/open-source/commons-lang3/commons-lang3-3.0) [HttpComponents HttpCore](http://www.javasourcecode.org/html/open-source/httpcomponents-httpcore/httpcomponents-httpcore-4.1.2) [Spring Framework](http://www.javasourcecode.org/html/open-source/spring/spring-3.0.5) [Chukwa](http://www.javasourcecode.org/html/open-source/chukwa/chukwa-0.4.0) [Commons Logging](http://www.javasourcecode.org/html/open-source/commons-logging/commons-logging-1.1.1) [Jackson](http://www.javasourcecode.org/html/open-source/jackson/jackson-1.8.5) [Struts](http://www.javasourcecode.org/html/open-source/struts/struts-2.2.3) [Commons Attributes](http://www.javasourcecode.org/html/open-source/commons-attributes/commons-attributes-2.2) [Commons Modeler](http://www.javasourcecode.org/html/open-source/commons-modeler/commons-modeler-2.0.1) [Jaxen](http://www.javasourcecode.org/html/open-source/jaxen/jaxen-1.1.3) [TestNG](http://www.javasourcecode.org/html/open-source/testng/testng-6.1.1) [Commons Beanutils](http://www.javasourcecode.org/html/open-source/commons-beanutils/commons-beanutils-1.8.3) [Commons Net](http://www.javasourcecode.org/html/open-source/commons-net/commons-net-3.0.1) [Java SE](http://www.javasourcecode.org/html/open-source/jdk/jdk-6u23) [Thrift](http://www.javasourcecode.org/html/open-source/thrift/thrift-0.7.0) [Commons Betwixt](http://www.javasourcecode.org/html/open-source/commons-betwixt/commons-betwixt-0.8) [Commons Pool](http://www.javasourcecode.org/html/open-source/commons-pool/commons-pool-1.5.6) [JDOM](http://www.javasourcecode.org/html/open-source/jdom/jdom-1.1.1) [Tomcat](http://www.javasourcecode.org/html/open-source/tomcat/tomcat-6.0.32) [Commons Chain](http://www.javasourcecode.org/html/open-source/commons-chain/commons-chain-1.2) [Commons Validator](http://www.javasourcecode.org/html/open-source/commons-validator/commons-validator-1.3.1) [Jetty](http://www.javasourcecode.org/html/open-source/jetty/jetty-7.4.4.v20110707) [UIMA](http://www.javasourcecode.org/html/open-source/uima/uima-2.3.1) [Commons CLI](http://www.javasourcecode.org/html/open-source/commons-cli/commons-cli-1.2) [Derby](http://www.javasourcecode.org/html/open-source/derby/derby-10.8.1.2) [JGroups](http://www.javasourcecode.org/html/open-source/jgroups/jgroups-2.11.0.GA) [UIMA-AS](http://www.javasourcecode.org/html/open-source/uima-as/uima-as-2.3.1) [Commons Codec](http://www.javasourcecode.org/html/open-source/commons-codec/commons-codec-1.5) [dom4j](http://www.javasourcecode.org/html/open-source/dom4j/dom4j-1.6.1) [JUnit](http://www.javasourcecode.org/html/open-source/junit/junit-4.8.2) [UrlRewriteFilter](http://www.javasourcecode.org/html/open-source/urlrewritefilter/urlrewritefilter-3.2.0) [Commons Collections](http://www.javasourcecode.org/html/open-source/commons-collections/commons-collections-3.2.1) [Eclipse](http://www.javasourcecode.org/html/open-source/eclipse/eclipse-3.5.2) [log4j](http://www.javasourcecode.org/html/open-source/log4j/log4j-1.2.16) [Velocity](http://www.javasourcecode.org/html/open-source/velocity/velocity-1.7) [Commons Configuration](http://www.javasourcecode.org/html/open-source/commons-configuration/commons-configuration-1.6) [FreeMarker](http://www.javasourcecode.org/html/open-source/freemarker/freemarker-2.3.18) [Lucene](http://www.javasourcecode.org/html/open-source/lucene/lucene-3.3.0) [ZooKeeper](http://www.javasourcecode.org/html/open-source/zookeeper/zookeeper-3.3.3) [Commons DBCP](http://www.javasourcecode.org/html/open-source/commons-dbcp/commons-dbcp-1.4) [GlassFish](http://www.javasourcecode.org/html/open-source/glassfish/glassfish-2.1.1) [Mahout](http://www.javasourcecode.org/html/open-source/mahout/mahout-0.5) [Commons Digester](http://www.javasourcecode.org/html/open-source/commons-digester/commons-digester-3.0) [Hadoop](http://www.javasourcecode.org/html/open-source/hadoop/hadoop-0.20.203.0) [Nutch](http://www.javasourcecode.org/html/open-source/nutch/nutch-1.3) [Commons FileUpload](http://www.javasourcecode.org/html/open-source/commons-fileupload/commons-fileupload-1.2.2) [HBase](http://www.javasourcecode.org/html/open-source/hbase/hbase-0.90.3) [Pig](http://www.javasourcecode.org/html/open-source/pig/pig-0.8.1)

 

查询时，默认eclipse当前编辑窗口只要是打开的java源文件或者class文件，插件就会起作用，点一下工具栏图标或者利用快捷键Ctrl +6 都可以立即去查询当前打开的这个java class（全限定名去查询）

 

下面是使用截图，当前编辑窗口处于  class文件视图中，当前class为lucene的IndexWriter 类

![](http://dl.iteye.com/upload/attachment/613963/dadd38df-dc35-3228-b635-248301bc341f.jpg)

 

 附件是插件jar包以及插件源码

 

 

主要参考书是：（网上有pdf版本）

 

[**Eclipse Plug-ins (3rd Edition)**](http://www.amazon.com/Eclipse-Plug-ins-3rd-Eric-Clayberg/dp/0321553462/ref=sr_1_1?ie=UTF8&s=books&qid=1276742008&sr=1-1)

[**(美)Eric Clayberg Dan Rubel**](http://search.china-pub.com/s/?key1=%28%C3%C0%29Eric%20Clayberg%20Dan%20Rubel)