如何阅读eclipse已有插件源代码

1.到http://www.eclipse.org/downloads/下载eclipse,注意一定要下载eclipse classic,只有这个才带源代码的,其他比如Eclipse IDE for Java EE Developers, Eclipse IDE for Java Developers都是不带源码的。

2.1 打开eclipse,File->Import..,选择Plug-in development下面的Plug-ins and Fragments. Next



2.2 出现Import Plug-ins and Fragments对话框,Import As 选择Projects with source folders,其余2项默认。



2.3 选择想阅读的源码,比如选择junit插件相关source,Add到右边去。点Finish



这样就生成了工程,可以看junit插件源码了。


猜你喜欢

转载自xpenxpen.iteye.com/blog/1607903