如何下载Eclipse的源代码?

16

花费一段时间后(它们的CSV访问Wiki页面不再有效,提供的密码无效),它们的SVN存储库中没有Eclipse IDE或核心插件的代码。同样的问题似乎也适用于它们的GIT存储库。特别是,我正在寻找此core插件类的源代码(甚至不是Java特定的):

插件:org.eclipse.debug.core

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

最后,我还尝试将插件作为具有源目录的片段导入。没有打包的源文件。我的最后选择是反编译类文件,但请告诉我是否有更好的只读权限可访问的存储库?再次,它们的维基要么过时,要么没有将我指向核心代码而是其他项目仓库。


1
关于grepcode,有什么想法? - Keppil
从已删除的答案中翻译:http://www.eclipse.org/forums/index.php?t=rview&goto=1011083 - Florian Margaine
@Keppil 我认为grepcode是那些想要查看代码而不是运行代码的人们的最佳选择。因此,我认为这是最好的答案。 - Zombies
@Zombies:已将其作为答案添加。 - Keppil
6个回答

8

6

2
我对你的回答进行了详细的阐述,并包含了具体的命令。请参见此处:https://dev59.com/JWUo5IYBdhLWcg3w7jIq#68569688。 - Gabriel Staples
这个答案是有效的。 - yu yang Jian

6

有没有办法通过浏览器下载单个source.zip的Eclipse Kepler源代码? 我坐在代理后面,即使git允许,也不想通过代理下载无数个单独的源文件。 - weberjn

1

使用这个链接(参见“构建”和“克隆平台源代码树”部分),从@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

1
如果您只想查看代码,您可以随时使用GrepCode。例如,您所要求的Eclipse 4.2版本的类在此处找到:IProcess.java

0
Eclipse Platform SDK Provisioning工作正常,在Eclipse Updater完成后,它可以运行和调试eclipse,断点也能正常工作。
例如,在NewProjectAction.javaNewProjectAction()run()方法中设置断点,当点击File > New > Project时,它会在断点处暂停。

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接