Article describing how to contribute to Eclipse

With Bug 222105, Remy Suen has assembled an Eclipse Corner article describing how to contribute to Eclipse. An important part of contributing to an Eclipse project is actually obtaining the code for that project. Unfortunately, we currently don’t have a good story for figuring out how to generically find the code that needs to be loaded into the workspace from an Eclipse source code repository in order to build a patch.

It occurred to me that it’d be cool to have a resource for sorting this sort of thing out, so Gabe and I have been playing around with some ideas to make this easier.

We’re very much in an experimental mode right now, and this may not play out. But the general idea is to create a database that maps the full name of a Java class to the source code repository URL for the corresponding project. If/when we’re successful, we’ll build a RESTful webservice that can do the mapping and look into connecting it to the Plug-in Spy. Frankly, I think a button on the Plug-in Spy that loads the project into the workspace would be pretty cool.

We’ve been tinkering around with CVS, but are keeping SVN and Git in mind. The information we need is already available: we scan CVS for any directory that contains a .project and .classpath file, extract the names of the “source” directories from the .classpath files, and then walk those directories to find the classes. For now, we’re only thinking about what is in HEAD.

I’ve been using the Eclipse File System (EFS) to scan CVS from within an Equinox application with some success. Gabe’s been attacking it using some PHP. I think we’re a long way away from something really useful; but once we get to a point where we have something usable, we’ll solicit more input and make it available through Dash. I intend to have something to show in time for Eclipse Summit Europe (be sure to submit your talk proposals and/or register!)

What do you think? Cool? Potentially useful?

This entry was posted in Community. Bookmark the permalink.

7 Responses to Article describing how to contribute to Eclipse

  1. Dave Carver says:

    I seem to be one of the first to reply, but I think it one of the easiest and simpliest methods to getting the code for a project is to make sure that the a project has a Team Project Set file. I did this recently for a project at work, and it makes it a couple click process to get the necessary code and setup the workspace.

    Some of what you are suggesting is already being done by some projects. already does this for some code.

    It would be nice to have somthing simliar that was searchable by Google. ViewCVS/SVN is alright but it leaves a lot to be desired on the searching end.

  2. Alex Blewitt says:

    I’ve already proposed such a thing in the past, and had zero traction.

    You don’t even need a full map of class-to-location, on the grounds that (most of the time) knowing the membership of the plugin is enough. Here’s my previous take on the matter:

    Basically, the proposal was that third parties could add a header (like X-SCMURL) to the bundle’s manifest information, which is then used as a prefix for accessing the code in that bundle. I even wrote an update which would then take this information, generate a PSF on the fly, and import it into your project in one single step.

    It’s worth observing that Maven projects already have such a thing in place in their definitions; and it really should be part of the bundle, not a separate PSF as Dave says, because you then have to find the PSF but you already have the bundle.

    I’ve even proposed an OSGi bug about standardising the header:

    although when I talked to Peter about this in the past, he didn’t really seem to understand why it was needed – so I have few hopes of this ever being implemented.

    It’s (not) being tracked as part of Eclipse bug 195729

  3. Lars Vogel says:

    Is the article from Remy already available? I see “how to contribute an article” but I believe you are talking about source code. Can you share the direct link?

    I maintain an article which describes how to access Eclipse source code, debug it, use plug-in spy, etc. This can be found here:

    Also in my blog series “Eclipse papercuts” I included (currently two) examples how to modify standard Eclipse code and how to contribute it back. Once patch was already accepted and I hope the others will also get accepted:

  4. Boris Bokowski says:

    Wayne, yes, this would be really useful. Are you aware of , which would be an alternative way to solve this problem?

  5. Wayne Beaton says:

    @Lars the article has not been published, it is currently an attachment on the bugzilla record.

    @Boris I am aware of Bug 243582.

    @Alex I remember that discussion now, but had forgotten it. Had I remembered, I’d have referenced your ideas in the post.

    The difference between what I’m tinkering with (and I’d like to reinforce that this is just tinkering at the moment) is that we don’t have to count on anybody else doing anything. We can probably take this a lot further… once we have the mapping from class to project directory, we can very likely determine the actual project; from there, assuming that the project has defined their SCM repositories and PSF files in their metadata, we can locate those.

  6. Alex Blewitt says:


    I post that it is possible to use this techniques in an opt-in in the entry, but also that that can be supplemented with additional information for those that can’t/don’t want to opt-in.

    So you do have the option of both. However, the former example (where the bundle defines its own SCMURL) allows those using non-Eclipse projects (like Apache Felix modules) or indeed, non-Eclipse IDEs (like IntelliJ) to be able to consume/use the information. PSF files are Eclipse specific, and not all open-source Eclipse projects are hosted at (e.g. ObjectivEClipse, Subclipse etc.). If you’re going to put the time into making this happen, let’s try and take the high road with a solution that is applicable to projects as projects.

  7. Wayne Beaton says:

    @Alex I agree. This sounds like something that the Architecture Council should take on. I’ll bring it up at the next meeting.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s