How do I compile eclipse?
This is probably a question that has been asked before, but I couldn't find it, so here we go...
I'd like to add a small change to org.eclipse.jdt. As part of this (and since this is my first time working with the eclipse source), I need to build eclipse from source. So, this is a twofold question:
1) I can't seem to download the code. The command line I am using is:
cvs -td开发者_运维技巧 :pserver:anonymous@proxy.eclipse.org:443/cvsroot/eclipse co org.eclipse.jdt
(I'm behind a firewall, so I'm using https. I've also tried using port 80 with the same result...) The result I always get is:
13:52:07: -> Tracelevel set to 1. PID is 5764
13:52:07: -> Session ID is 16844cec1b6722de
13:52:07: -> Session time is Tue Nov 23 19:52:07 2010
13:52:07: -> main loop with CVSROOT=:pserver:anonymous@proxy.eclipse.org:443/cvsroot/eclipse
cvs [checkout aborted]: Error reading from server proxy.eclipse.org: 0: No such file or directory
2) How do I compile this source code once I have it? Is there any good reference out there on the web that details the build process? I'm really looking for what the minimum set of source code I need to compile the eclipse user interface, so I can test code I write to enable the small enhancement I'm proposing.
The easiest way is probably to check out the relevant bundles using the integrated CVS client and starting a second workbench with these. To get the changed bundles into your running Eclipse you can specify to install into the hosting Eclipse during export. There are short instructions (including on creating a patch and contributing changes back to Eclipse) in this article: How to Fix a Bug in Eclipse
If you want to add something to Eclipse, in many cases you don't need to modify the source directly but add an extension (a plugin, using the extension registry, etc). It depends on what you want to achieve, though.
This approach is infinitely easier than trying to recompile the entire of Eclipse, because your copy would become quickly out-of-date and you could never update your environment.
精彩评论