如何下载Eclipse的源代码?

时间:2013-03-27 08:28:15

标签: java eclipse eclipse-plugin

花了一段时间(他们用于CSV访问的维基页不再有效,提供的密码不起作用),他们的SVN存储库不包含Eclipse IDE或核心插件的代码。同样的问题似乎也适用于他们的GIT存储库。特别是我正在寻找这个核心插件类的源代码(甚至不是特定于java的):

插件:org.eclipse.debug.core

class:org.eclipse.debug.core.model.IProcess

最后,我还尝试将插件导入为包含源目录的片段。没有打包的源文件。我的最后一个选择是反编译类文件,但是请告诉我有一个更好的存储库我可以使用只读权限访问吗?他们的wiki再次过时或者没有指向核心代码,而是指向其他项目回购。

5 个答案:

答案 0 :(得分:6)

我发现它,棘手的部分是在他们的git repo页面(http://git.eclipse.org/c/)上列出了很多回购,你需要检查每一页,它列在“平台”类别下,而不是按字母顺序列出所有插件ID:

对于org.eclipse.debug.core(其中是IProcess),它在这里:

http://git.eclipse.org/c/platform/eclipse.platform.debug.git/tree/org.eclipse.debug.core

答案 1 :(得分:4)

您还可以查看Lars Vogel的新演示文稿:) How to become an Eclipse committer in 20 minutes and fork the IDE

答案 2 :(得分:1)

根据您的需要,The Eclipse Common Build Infrastructure(CBI)可能有所帮助。

CBI项目已将Eclipse转换为Tycho项目,这意味着您可以get all the sources and compile them into a working Eclipse build使用2-3个命令。

答案 3 :(得分:1)

如果您只想查看代码,可以随时使用GrepCode

例如,您要求的类的Eclipse 4.2版本可在此处找到:IProcess.java

答案 4 :(得分:0)

使用 this link 中的 @Aaron Digulla here(请参阅“构建”和“克隆平台源代码树”部分),这似乎是下载所有 Eclipse 源代码的方式。我实际上运行了这些说明,它们似乎有效。我认为这就是一切。

# 1 .Clone the whole repo, including all submodules (sub-repos)
git clone -b master --recursive \
git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git

上面的克隆过程花了我大约 30 分钟,下载了 3.9 GB 的东西。

# 2. To update the git clone above, including all submodules
cd eclipse.platform.releng.aggregator
git pull --recurse-submodules
git submodule update

就是这样!这似乎就是一切(我认为)。这是我现在刚刚克隆的“eclipse.platform.releng.aggregator”文件夹的第一级中看到的内容:

eclipse.platform.releng.aggregator$ tree -L 1
.
├── cje-production
├── CONTRIBUTING
├── eclipse.jdt
├── eclipse.jdt.core
├── eclipse.jdt.core.binaries
├── eclipse.jdt.debug
├── eclipse.jdt.ui
├── eclipse.pde.build
├── eclipse.pde.ui
├── eclipse.platform
├── eclipse.platform.common
├── eclipse.platform.debug
├── eclipse-platform-parent
├── eclipse.platform.releng
├── eclipse.platform.releng.prereqs.sdk
├── eclipse.platform.releng.tychoeclipsebuilder
├── eclipse.platform.resources
├── eclipse.platform.runtime
├── eclipse-platform-sources
├── eclipse.platform.swt
├── eclipse.platform.swt.binaries
├── eclipse.platform.team
├── eclipse.platform.text
├── eclipse.platform.ua
├── eclipse.platform.ui
├── eclipse.platform.ui.tools
├── Jenkinsfile
├── JenkinsJobs
├── LICENSE
├── NOTICE
├── pom.xml
├── production
├── README.md
├── rt.equinox.binaries
├── rt.equinox.bundles
├── rt.equinox.framework
├── rt.equinox.p2
└── scripts

32 directories, 6 files
相关问题