InstallingEclipse

From HerzbubeWiki
Jump to navigation Jump to search

About this page

This page tries to capture how I install Eclipse and which plugins I usually add to the new Eclipse installation. For additional information about configuration, see the wiki page ConfiguringEclipse.


Eclipse

To find out which Eclipse package is the best to start with, I usually have a look at http://www.eclipse.org/downloads/packages/compare-packages. If the various abbreviations don't make any sense, look them up in the glossary section on the LearningEclipse page.

Because I sometimes work on an Eclipse plugin myself and am not exactly fluent with all those Eclipse frameworks and toolkits, I am always glad to install some sources alongside with the raw binaries so that I can have a peek at how a certain feature is used. For this reason, I usually choose the RCP/Plugin package to begin with and then add other plugins and features as needed.

Sample installation process:

  • Download Eclipse
  • Unpack the archive
tar xfvz eclipse-rcp-galileo-SR1-macosx-cocoa.tar.gz
  • Move the resulting folder to /Applications (renaming it on the fly so that its name is now in upper case)
mv eclipse /Applications/Eclipse
  • Launch Eclipse.app. Voilà, finished!


Plugins related to a programming language

Java

JDT (Java development tools) is the thing to install for developing in Java. JDT website: http://www.eclipse.org/jdt/.

JDT update site: It appears that there isn't one single update site for JDT, rather there are multiple update sites, one for each of the different components that make up JDT. I am not researching this any further since JDT is always part of my initial Eclipse installation.


C++

CDT (C/C++ Development Tooling) is the thing to install for developing in C/C++. CDT website: http://wiki.eclipse.org/index.php/CDT.

CDT is very tied to specific versions of the Eclipse Platform (Europa, Ganymede, Galileo, etc.), so you cannot simply combine any version of CDT with any version of Eclipse. The best starting point to look for how to install CDT is its download page: http://www.eclipse.org/cdt/downloads.php.

Basically CDT can always be installed

  • From a .zip archive that contains all the necessary files
  • From an update site

I usually prefer the update site, e.g. http://download.eclipse.org/tools/cdt/releases/galileo/ for CDT 6.x (which is tied to Eclipse 3.5 Galileo). For details, again see CDT's download page.


Python

Pydev is the thing to install for developing in Python. Pydev website: http://pydev.org/.

Although there is a .zip archive for a manual installation, I prefer to install Pydev via its update site http://pydev.org/updates.


PHP

PDT (PHP Development Tools) is the thing to install for developing in PHP. PDT website: http://www.eclipse.org/pdt/.

TODO Finish this section, also make special notes for installing a debugger (covered in this document).


SCM plugins

CVS

TODO


Subversion

There are two contenders for Subversion integration in Eclipse:


It is really hard to decide which solution to use, as they both seem to be actively developed, fully functional and basically do the same thing. I found a few articles that try to compare the two projects, or shed light on their differences: For instance, this stackoverflow.com article has up-to-date answers, while this older EclipseZone article is from 2006, so a bit old, but has interesting information on the philosophies of the two projects (the comments starting with Karl Fogel's remarks are especially catching). Many articles focus on usability, and this is where you get as many opinions as there are people.


The main points I consider are these:

  • Subclipse is developed on tigris.org by a community that is very close to Subversion, and is also very open-source minded. The corporate sponsor of the project is CollabNet.
  • Subversive is the official Eclipse Subversion client - it's an Eclipse Technology Project hosted at eclipse.org and included by default in a number of Eclipse packages. After several years, Subversive still is in the Incubator stage - whatever that means.
  • Subversive is sponsored/developed by Polarion, a company who has been "accused" in the past of not openly acknowledging Subversion as an open-source project (or at least blurring/obfuscating some borders)
  • On Windows, Subclipse seems to work out-of-the-box (the required JavaHL is shipped with the plugin), while Subversive requires to install the JavaHL library in a separate step due to licensing issues. On non-Windows systems, JavaHL needs to be installed separately even with Subclipse due to technical reasons, i.e. how native libraries are loaded by Java and the operating system


At the moment, I lean towards using Subclipse, due to its unchallenged status as a project in the open source spirit. Two other aspects, "official Subversion plugin" (Subversive) vs. "plugin development is close to the Subversion source" (Subclipse), balance each other out (and the aura of quality they are supposed to give to their respective favourite plugin might be "magical" anyway, who can say?).


Two quotes regarding "adapters" (e.g. JavaHL):

What is an adapter? What is JavaHL?

Unlike CVS, which does not have an official API, Subversion was designed from the start to be an API. Subversion is written (in C) as a set of libraries. Subversion then provides a default UI, in the form of a command line interface, that uses these libraries. Subversion also provides language bindings for various programing languages so that these same libraries can be used in your language of choice. JavaHL is the name of the Java language binding provided by the Subversion project. JavaHL is an official part of the Subversion project, not the Subclipse project.

svnClientAdapter is a Java project that was developed for Subclipse. It provides an even higher level of abstraction to the Subversion libraries. It also allows for different ways of accessing Subversion functionality. Historically, the two options were to use the JavaHL library or the Subversion command line. Eventually, a third option was added and that is to use the SVNKit library which is a 100% Pure Java implementation of the protocols used by Subversion. This option has the advantage of not requiring any native libraries installed on the client. Of course, since SVNKit does not utilize the Subversion libraries it does not have the guaranteed compatibility that you can expect from JavaHL or the command line adapters. That being said, SVNKit is tested against the same test suite that tests the Subversion command line, and passes those tests.

Which adapter should I use?

If the JavaHL library is available on your system, or easily attainable, then it is probably the best choice. That being said, SVNKit is a great option.

  • The Subclipse FAQ for JavaHL has even more details about JavaHL, and it explains why Subclipse does not include JavaHL in its package on non-Windows systems:

On 32-bit Windows we do provide everything you need. We cannot do it, for technical reasons, on any other operating system. It has to do with how native libraries are loaded on different operating systems. There is no way to deliver all three of the native layers in a way that the libraries will be found when used from Java and Eclipse. [...]


Update site for Subclipse 1.6: http://subclipse.tigris.org/update_1.6.x.


The Java bindings (JavaHL):

  • The Subclipse FAQ recommends getting and installing CollabNet's community build of Subversion. This would install into /opt/subversion, and make a symlink into /Library/Java/Extensions, which would make JavaHL available to all programs run with the system's JVM, including Eclipse and Subclipse.
  • As tempting as this may seem, I still prefer to install JavaHL through the Fink project (package svn-javahl). Simply because I dislike having yet another non-standard install path on my system (/opt).
  • See this post on herzbube.ch how to make it work



Git

Git's EclipsePlugin is currently hosted at http://git.or.cz/gitwiki/EclipsePlugin, but will move sometime in the near future to eclipse.org since it is now an official Eclipse Technology Project.

Update site: http://www.jgit.org/updates

TODO: Test it out. So far I still use git command line or GitX.


Other plugins

TODO