Getting ready with Eclipse 4

Sometimes, you just need to start something new – in my case, I have been a developer for years and have then ventured into the more “project-related” activities, leaving the hardcore coding behind (except sometimes for personal projects). And one of these has now brought me back to coding and the insight that I probably should start looking into something new than the pure Microsoft Development Environments and C# – moving into the Eclipse 4/Java world.

Getting Eclipse 4

Unlike the Microsoft tools I am used to, Eclipse is much more dynamic in its development and the development of its plug-ins and tools.

First of all, I figured, getting Eclipse itself should be the first part. That seemed easy enough with an easy-to-access download location at download.eclipse.org. Which is where the fun starts: do I get the standard package (at the time I am writing this, Eclipse 4.4 is the most current version) or do I get any of the pre-packaged download (in my case the one for Eclipse RCP (Rich Client Platform) and RAP (Remote Application Platform, formerly Rich Ajax Platform).

The good thing is: we can try both and see where the differences are: Eclipse is not “installed” in the classical manner – it is simply executed on to of an existing JAVA Platform (which of course is also a pre-requisite to have).

What I did is creating a directory on my disk named Eclipse Environments under which I created two sub-directories RCP and Standard. I then downloaded both packages and placed them into their respective places.

Just to be on the save side (and this is probably not the way you want to do it) I have created a similar structure named Eclipse Workspaces to keep settings and project separeted.

When starting Eclipse 4.4 (the standard package), I am asked for the location of the Workspace (which I point to my standards workspace directory). Having done that, Eclipse will start.

001 - The first StartSince this is the very first time I start Ecplise, I get the somewhat “maiden” Welcome screen which I can close and – as a first step – got to the menu File | New | Other to see what type of projects my standard installation supports.

002 - Default Project Types - StandardIf I do the very same for the RCP/RAP Edition, I will see the following:

003 - Default Project Types - RCPAs you can see – the editions already differ in behaviour which is simply explained by the fact that the pre-packaged solutions already contain typical elements for a specific groups of users. Other pre-packaged solutions would yet provide other components.

Since I am targeting a Rich Client Interface, I will stick with the Eclipse 4.4 RCP/RAP edition for the time being.

The Eclipse E4 Project

To make a long story short: the E4 Project is an “in development” project that is aiming at simplifying and standardizing development with Eclipse – if you want the details, go to the Project Home Page.

What makes this project interesting – and from a learning perspective a bit difficult to handle – is the constant development. Almost any tutorial you encounter on Rich Client applications refers to the E4 Project as base component – however, the versions are changing quickly and so the current state of what you will get with the latest version is not what the person writing the tutorial got at the time it was written. And this will also be true for the words I am writing right now…

One thing that remains “constant” for the time being is the project home page – the version history and downloads can be found here.

Installing a particular version of the E4 Project is easy – it can be done through the Eclipse IDE:

  1. Start Eclipse, go to Help | Install new Software…
  2. Click the Add button next to the Work with: field
  3. In the input box, provide a meaningful name (e.g. Eclipse E4 Release 0.14)
  4. Now, go to the Download Page, click the version you want to install (in my case 0.14) and copy the URL behind the online p2 repo link text in the Comment field. (lower right corner).
  5. Paste the URL into the Location field back in the Eclipse IDE Input dialog.

004 - Downloading E4 Tools Release 014When you click OK, the package should be downloaded and examined. This is where the fun starts – for Release 0.14, this is what I see when I expand all the sections:

005 - E4 Tools 014 ContentsRelease 0.14 is from June 2013 – adding the most current integration release instead of version 0.14, I get this:

006 - E4 Tools Integration Build 20140719As you can see – the list now does not even fit the screen. In other words: what you can install, what it is named and where it is located depends on the release you download – and many tutorials do not bother to mention the exact version…

For now, I am going to install Release 0.15 which is relatively recent (January 2014) but not an “in-development” build either. As for the individual components, I am guessing on everything that is marked Incubation but not Developer Resource.

007 - E4 Tools 015 - Selected ComponentsCompleting the remaining pages of the wizard and accepting the license agreement, the installatin will start and – once finished – I will be asked to restart the Eclipse IDE which I confirm.

Going back to my previous excericise File | New | Other… provides an updated project list:

008 - Projects with E4 Tools installedWhat I am interested in is contained unter the Eclipse 4 container – a new Eclipse 4 Application Project.

009 - Eclipse 4 Application ProjectSelecting the project template and continuing brings up a New Plug-in Project wizard where I first add my very own project name.

010 - New Project Wizard - Dialog 1The remaining values on this page of the wizard remain unchanged – these are standard options defininf the location, associated JAVA Project paths and the target platform. Advancing to the next page of the wizard, I can maintain all pre-set values as well.

011 - New Project Wizard - Dialog 2Here, my project properties are defaulted based on my previous input and standard options are set. Without changing a value, I advance to the next page.

012 - New Project Wizard - Dialog 3I am not going to change anything here either – but want to point out the last option which would pre-populate the to-be application with some sample content. I am not going to do that but if you are interested to see a bit more than an empty screen at the beginning…

Clicking the Finish button builds the application and opens it up in the package explorer.

013 - New Application in IDENotice the error in the center part? This is what really upsets me about these highly dynamic environments – I have not done much and I have not deviated from any defaults, yet I do get an error…

Now, not worrying about the error now, double-click the MyE4Application.product file in the Package Explorer. From the resulting Overview window, click Launch an Eclipse application.

014 - First LaunchIt may or it may not start – but if it starts, you will just see an empty application window (remember: we have not done anything yet and we have not populated the project with the sample menus and other items).

015 - An empty ApplicationBack to my error – as I said: I would expect this not to happen – now, instead of exploring how to add elements to my empty application, I have to find out what is wrong with my development environment. So maybe it is a bug… let’s see if there are any software updates available: menu Help | Check for updates… and sure enough, there are some fixes available:

017 - Software UpdateExecuting these updates and restarting Eclipse afterwards solves my immediate issue – the Application Editor now opens.

018 - Application EditorNow with the environment set up and ready to go… let’s see what I can make from it.

This entry was posted in Allgemein, Eclipse, Java. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *