Joeblackdev
Joeblackdev

Reputation: 7327

Cannot import eclipse source code

I've followed this tutorial (Step 2) to a tee on how to import the eclipse source code so that I can explore the various packages in order to assimilate some certain aspects of the code. I can import the plugin, but I can't see any source files, only binary class files. Does anyone know how I can download and view the eclipse source code? It does not seem straightforward at all.

Upvotes: 0

Views: 713

Answers (3)

Mickael
Mickael

Reputation: 3586

If you want to understand the source code better, then I would suggest that you fetch it from SCM into your workspace. You can easily do that from the "Plugins" view: find the plugin you're interested in right and try right-click, "Import As" > "Project from Repository...". It should automatically clone the repository, checkout the right tag and import the source of the plugin.

Upvotes: 1

The source code was not packaged with the version of eclipse that you were using, And Garrett Hall's suggestion was to download "Eclipse SDK Feature" from the "Eclipse Project Updates" site. "Eclipse SDK Feature" is nothing but source code with minimal eclipse. So the source would get downloaded and get installed and after a restart and an import of the plugin project, the plugin source code can be seen.

This is not universal- as in ,just downloading the Eclipse SDK feature would not be sufficient to see source code of any plugin(which did not include the sources).

Upvotes: 1

Garrett Hall
Garrett Hall

Reputation: 30022

Open Eclipse

Open menu 'Help' -> 'Install new software'

Select 'The Eclipse Project Updates'

Select 'Eclipse SDK' and install/restart

Open menu 'Window' -> 'Show View' -> 'Plug-ins'

You will find a list of all the plug-ins. Right-click on one, select 'Import as source project' and the source files will appear in a new project.

Note this works on Helios, it may be slightly different on other versions

enter image description here

Upvotes: 1

Related Questions