Open main menu

Eclipse

Revision as of 21:25, 30 January 2016 by Freephile (talk | contribs)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)


Intro

Eclipse (wiki site) is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the application development lifecycle. A large and vibrant ecosystem of major technology vendors, innovative start-ups, universities, research institutions and individuals extend, complement and support the Eclipse platform.

As the project, community and resources are numerous, this page serves to note specific information that will help you use and interact with the technology most efficiently with a focus on the PHP developer.

Installation

I like to have control over what I have installed, and also like to know what is going on in my computer. For simplicity's sake, you might want to check out Easy Eclipse I didn't find that site until after spending a couple days installing, uninstalling, re-installing, and tweaking Eclipse.

For the impatient

  1. Download the file, untar it into ~/opt
  2. and make an executable launcher to start the program (/home/user/bin/eclipse)
    export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
    export ECLIPSE_HOME="$HOME/opt/eclipse"
    
    $ECLIPSE_HOME/eclipse $*
    
  3. start eclipse and add the extras through the 'help' menu

Long story

Getting and installing Eclipse is still a lot more difficult than it should be (owing in part to the fact that it continues to grow in size, scope and complexity). In late 2008, it is still not as simple as sudo apt-get install eclipse. If you do that using Ubuntu Hardy Heron, the installed version will be 3.2, which dates from 2006 and will fail to meet requirements for recent modules like PDT. What's worse, the eclipse system can NOT upgrade itself. See https://help.ubuntu.com/community/EclipseIDE for more accurate help in installing Eclipse. The short instructions are to install a Java Virtual Machine (which you can use synaptic or apt-get for) and to download Eclipse and install it manually. Add to that a lot of additional module installations.

In spite of any relative ease compared to the way it was "back in the day" (when just installing Java on Linux took about a decade and three lawyers), it's a large project, with Java as a dependency and many applications that you can install on top of the framework. So, an exact description of how to get setup is important. In addition to the foregoing details, http://groups.drupal.org/node/6261 describes how to get yourself setup with a completely free development environment. It starts with Ubuntu (the Debian-based desktop distribution) and ends with configuring Eclipse for working with Drupal coding standards. (Now nicknamed appropriately 'Drubuntu'.)

The http://wiki.eclipse.org/PDT/Installation site offers good details on getting a clean and fully updated installation working, especially if you have particular needs for an older version. Similarly, this HOWTO seems like it's complete and tested, although I didn't follow it. http://www.howtoforge.com/setting-up-eclipse-pdt2.0-on-eclipse3.4-ganymede

Features

The word "features" in the eclipse world refers to components that you can install on top of the core platform. It is the components which are actually the things that allow you to do the things you think of when "using" eclipse. Features in eclipse is similar to the concept of installing applications on top of an operating system.

As a Language IDE eclipse offers tools for just about every programming language (click on "Related EPIC Plugins" in the bottom panel). It has also expanded beyond what you might consider when you think "Integrated Development Environment" to include not just advanced tools like UML modeling, but even support for Service Oriented Architectures.

Remote System Explorer

The Target Management (RSE) feature allows you to operate on your remote systems like it was the local system, and includes a shell where you can execute commands plus process monitor and more.

http://www.eclipse.org/dsdp/tm/


Web Tools Platform

The Web Tools Platform is a "feature" in Eclipse providing the foundation for, well, web tools. You'll need to get this in order to install PDT.

Dynamic Languages Toolkit Core Frameworks

JavaScript, Ruby, TCL, Python

Subclipse

Subclipse is an Eclipse Team Provider plug-in providing support for Subversion within the Eclipse IDE. this Eclipse HOWTO covers subclipse installation and a couple other initial configuration items. I believe with the release of Ganymede (2008) that subversion integration is included, so I'd have to learn what the differences are between the subclipse project, and any subversion integration which is pre-packaged with the eclipse platform.

Subclipse 1.4.6 is now available for Eclipse 3.2+ (Eclipse 3.2/Callisto, 3.3/Europa, 3.4/Ganymede +)

  1. Start eclipse
  2. Click Help -> Software updates -> Available Software -> Add Site
  3. Enter http://subclipse.tigris.org/update_1.4.x in the dialog, click OK
  4. Tick the box next to the new source, and click "Install"

to get Subclipse working on my Ubuntu Intrepid Ibex system, I had to install the Java bindings for Subversion (see http://subclipse.tigris.org/wiki/JavaHL) and also modify my eclipse.ini settings

# provides the JavaHL libraries
sudo apt-get install libsvn-java

Add to eclipse.ini

-Djava.library.path=/usr/lib/jni

PHPEclipse

PHPEclipse is not the same as the PDT. They are two separate PHP-oriented IDEs that install into the Eclipse framework. You should try each, and decide which one works best for you. http://www.phpeclipse.de/wiki/General/HowDoesPHPEclipseCompareWithOtherPHPEditors

PHP Developer Tools (PDT)

The PDT project is the reference environment for PHP Developers.

Installing the PDT is very simple, and the steps are listed at https://help.ubuntu.com/community/EclipsePDT The wiki for the project is at http://wiki.eclipse.org/index.php/PDT

Unfortunately, the current packaged eclipse (3.2.2) for Kubuntu fails some of the requirements for the PDT, so if you are just installing eclipse for the first time, you'll see an error like the following when trying to install PDT:

See http://wiki.eclipse.org/IRC_FAQ#How_do_I_install_a_project_with_multiple_dependencies.3F Again, you'll probably want to REMOVE the 3.2 version and install a more recent version by hand because you can't upgrade one major release to the next.

Others

Here are some that I haven't checked or added yet, from http://jhcore.com/2008/06/26/eclipse-34-ganymede-on-ubuntu/


Alternates

Aside from installing Eclipse and plugins "the good old-fashioned way", you can also find many Vendor-supplied gratis distributions usually with a hook into their revenue-generating business.

Aptana Studio

http://www.aptana.com/studio Their no-cost version is pretty complete, and the pro version is almost as cheap as they come at $99 The pro version adds SFTP capability which I don't understand since you can get Target Management RSE for free -- and the latter seems more powerful from the description. I don't use it, and haven't compared Aptana to the free Eclipse, but I figured I'd mention it in case someone is looking for a product that comes with paid technical support.

Polarion

Polarion offers some additional features for use with Subversion such as LDAP authentication http://www.polarion.com/products/eclipse/

Zend Studio for Eclipse

Zend Studio is similar to the PDT (in fact they originated or contribute to the PDT project), but it is not free.

Extras

Due to it's extensible nature, any given project from Drupal to Symfony can create plugins for Eclipse that make developing for that particular Content Management System or Web Application Framework more enjoyable (automatic syntax helpers for the defined methods of the system) plus other features. For example, the Symfony framework includes many command-line tools and it's configuration is written in YAML. The Symfoclipse plugin makes these tools available from the IDE and provides YAML authoring and validation.

See Also: [Configuring your Eclipse system for Drupal]

The Eclipse Communication Framework makes things possible such as http://www.coffee-soft.org/

Upgrading

It seems that Eclipse will not allow you to upgrade the system itself from Eclipse 3.2 to Eclipse 3.3 to Eclipse 3.4 to get Eclipse to work with the recent releases of PDT or PHPEclipse. Instead, you have to install the base Eclipse you want, and get the specific bundles that will work with that base.

In addition to installing Eclipse, you should definitely be sure to set the Java environement

sudo update-java-alternatives --list

That command should list something like

java-6-sun 63 /usr/lib/jvm/java-6-sun
java-gcj 1042 /usr/lib/jvm/java-gcj

Then you can set the Sun Microsystems Java as the default with

sudo update-java-alternatives --set java-6-sun

To upgrade, you should be able to just

  1. start eclipse
  2. click Help (Alt + h)
  3. click Software Updates (s)
  4. click Update (Alt + d)

Trouble Upgrading

The software items you selected may not be valid with your current installation.
Do you want to open the wizard anyway to review the selections?

If I uncheck everything but the SDK from the update list, then that error message goes away. However the update would stall and hang at 22% complete - presumably because the HTTP client within eclipse has problems. So, I installed an experimental feature which supposedly takes care of this. I eventually got the SDK to update, but I'm still unable to update the WST Server Core or other WST components.

Cannot complete the request.  See the details.
Cannot find a solution satisfying the following requirements Match[requiredCapability:
org.eclipse.equinox.p2.iu/org.apache.commons.logging/[1.0.4.200809231229,1.0.4.200809231229]].

I get the same error message with the WSDL 1.4 and 1.5 Feature


Videos and Tutorials

Some resources to get you started using Eclipse effectively