下载 Eclipse 的源代码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2890757/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Downloading Eclipse's Source Code
提问by digiarnie
I'm doing a study on large Java projects and would like to view the source code for Eclipse. I have gone to this url (http://wiki.eclipse.org/index.php/CVS_Howto) and figured that the most useful cvs repository for me to look at would be this one:
我正在研究大型 Java 项目,并想查看 Eclipse 的源代码。我访问了这个 url ( http://wiki.eclipse.org/index.php/CVS_Howto) 并认为对我来说最有用的 cvs 存储库是这个:
:pserver:[email protected]:/cvsroot/eclipse (The Eclipse platform project)
:pserver:[email protected]:/cvsroot/eclipse(Eclipse 平台项目)
However, when looking at this repository, it has so many modules! Which modules should I be trying to check out? I don't necessarily want to build the IDE from source, however, I just want to get the core Eclipse code base to perform some analysis. Would I just check out any modules starting with "org.eclipse..."? Should I be checking out any of the others?
然而,当查看这个存储库时,它有这么多模块!我应该尝试检查哪些模块?我不一定想从源代码构建 IDE,但是,我只想获取核心 Eclipse 代码库来执行一些分析。我会检查任何以“org.eclipse ...”开头的模块吗?我应该检查其他任何人吗?
Or is there an easier way to get the source? I read somewhere that you can get the source from the binary version of Eclipse but I am unsure where to find the source.
或者有没有更简单的方法来获取源?我在某处读到您可以从 Eclipse 的二进制版本获取源代码,但我不确定在哪里可以找到源代码。
采纳答案by stacker
Just download the source tarball eclipse-cvs.tgz
from here
只需从这里下载源 tarballeclipse-cvs.tgz
EDIT: This also includes version history, so it may be larger than you need. For just a current version download Platform-SDK.3.5.2~ 100MB
编辑:这还包括版本历史记录,因此它可能比您需要的要大。对于当前版本下载Platform-SDK.3.5.2~ 100MB
It includes the sources in jar files e.g.
它包括 jar 文件中的源,例如
org.eclipse.ui.workbench_3.5.2.M20100113-0800.jar
org.eclipse.ui.workbench.source_3.5.2.M20100113-0800.jar
回答by Nels Beckman
For empirical studies, a good resource to check out is the Qualitas Corpus. It's a collection of open-source Java programs for use in empirical studies. In addition to having source code for a larger number of major projects (including Eclipse) they have multiple versions of each program, so you can track how code changes over time, if that's important. It's a respected corpus in the Software Engineering/Programming Languages research community, and so it may make your work more suitable for comparison in the future.
对于实证研究,一个很好的资源是Qualitas Corpus。它是一组用于实证研究的开源 Java 程序。除了拥有大量主要项目(包括 Eclipse)的源代码之外,它们还有每个程序的多个版本,因此您可以跟踪代码随时间的变化(如果这很重要)。它是软件工程/编程语言研究社区中受人尊敬的语料库,因此它可能使您的工作在未来更适合进行比较。
I'm not a part of their project, but I have used their corpus in a recent study. If you shoot them an email and tell them what your project is about, they'll give you http download access.
我不是他们项目的一部分,但我在最近的一项研究中使用了他们的语料库。如果你给他们发一封电子邮件并告诉他们你的项目是关于什么的,他们会给你 http 下载访问权限。
回答by Brett Kail
I can only answer this bit:
我只能回答这一点:
Or is there an easier way to get the source? I read somewhere that you can get the source from the binary version of Eclipse but I am unsure where to find the source.
或者有没有更简单的方法来获取源?我在某处读到您可以从 Eclipse 的二进制版本获取源代码,但我不确定在哪里可以找到源代码。
In eclipse/plugins/, the jars named *.source_*.jar
contain source. For example, in my install:
在 eclipse/plugins/ 中,命名的 jars*.source_*.jar
包含源。例如,在我的安装中:
org.eclipse.osgi_3.4.0.v20080605-1900.jar
org.eclipse.osgi.source_3.4.0.v20080605-1900.jar
The first jar contains the OSGi runtime, and the latter contains the corresponding source.
第一个 jar 包含 OSGi 运行时,后者包含相应的源。