Skip to main content

One of the longest awaited releases in the Java world is the all new Eclipse 4.x release branch.
Eclipse Juno 4.2 has landed two days ago, downloadable from [http://www.eclipse.org/](http://www.eclipse.org/) and its various other mirrors out there. It should have or will soon hit also several update sites for all the different Linux distributions.

### Soo, whats new?
Look & FeelThe first thing you will notice is the new logo and the user interface of the IDE. It looks fresher, more modern. The clutter seems to be reduced so it looks more streamlined. The interface now puts less visual emphasis on non-selected tabs and stacks. This means that non-selected tabs of inactive stacks are now more in the background or more greyed out. When you max-/minimize a window then you will see one of the new transition effects.One thing I really missed so far is the possibilty to just detach a tab and drag it to another screen. I always had to create a new Eclipse window and had to open the tab I needed there. This has changed now. You can now drag & drop a tab wherever you want. YES wherever you want! It is now also possible to drag e.g. the Console-View and drop it on the editors stack. The previous restriction has gone which I really like because you can switch between source code and Markers-View instantly by just going to the next tab (or use CTRL + F6 or CTRL + Page Up/Down). Quick AccessAnother nice new little enhancement to the UI is the new Quick Access field. Here you can search for nearly anything like editors, views, perspectives, commands, menus and many more. This really makes going to these vast points very quick. Nice! Code RecommendersWhat I also really like so far, which I had to install manually via the Marketplace, is the new Code Recommenders feature. This very intelligent API recommandation system learns which methods for example are used most and as such provides the most used methods first at the code completion window. So this should to learn new APIs because it gives you a hint on which methods to use next after creating for example a Button. I think that this sounds very magic at first glance but as this is also an improving research technology, I think that this feature can be very handsome in day-to-day development.A cool subfeature I discovered is the ability to search and autocomplete for Subwords. This means that you can type for example „custom“ as method name, hit Content Assist and Eclipse recommends the findCustomer method. This comes in very handy because I personally can´t remember if it was findCustomer, loadCustomer or receiveCustomerFromDb. You have to enable this feature under Preferences->Code Recommenders->Subwords or you just try the new Quick Access feature by searching for „Subwords“.The recommender feature is not just limited to this. It also provides intelligent template completion by proposing often used method combinations. This can be helpful if you have to initialize several fields but you can´t keep them all in mind. The Recommender can also provide hints on which methods should be overriden in subclasses. You can find more info on this topic in the official documentation. Git IntegrationEclipse Juno has also EGit 2 installed by default now and the whole Eclipse ecosystem has been migrated to Git. The migration is especially phenomenal because several build and management tools build 10 years ago had to be rewritten or adjusted to meet the specs of the new distributed source code system. There was also a huge effort to train all the existing commiters on how to use the new system best.The new version of the integration comes with some anticipated, so far missing features. Now git stash is also supported, allowing you to stash, apply, branch, tag or cherry pick uncommited changes.The branch decorators are also new and show you how up-to-date your local copy is compared to the origin. This indicates if you are ahead, behind or diverged.Besides this there were also also lot of performance improvements and bug fixes. This announcement made my decision to try EGit again. I nearly stopped using it completely because the 1.x version had some nasty bugs telling me that commits could not be done, although the commandline version just worked absolutely fine. It also provides most of the features I use in the commandline so I don´t have to switch to it all the time.

#### JDT Improvements
The Java Development Tools are now enriched to make use of Java 1.7 features. This includes combining multiple try-catch blocks with the new try/multi-catch block allowing the code to look more compact.The diamond operator is now the recommended way of declaring generic types and JDT now drops a warning by default if you declare type arguments multiple times.Another powerful engine in the new JDT release is the ability to detect potential memory or resource leaks by searching for methods which do not close streams appropriate. Of course it also supports the new try-with-resources statement introduced in Java 1.7 which automatically closes open streams oncompletion or onerror.A big improvement was also made in the null analysis of local variables. JDT now completely supports @NonNull and as a results recommends code optimization based on the possibility that a variable may be null. It does for example not make any sense to do write an if-statement that checks for null, if the checked parameter is declared @NonNull, because this is obviously redundant code. This declaration can also save some lines of code and make you code look better.

#### Compatibility layer for 3.x plugins
On very nice feature which made me really smile was the introduction of a compatibility layer making nearly all existing plugins for the 3.x release branch working under 4.x.This was really good news to me because the first thing I do and recommend after opening up Eclipse for the first time is to install JBoss Tools. JBoss released the newest stable release just a few weeks ago stating that it is made for Eclipse 3.7.2 which made me curious if it would work under Juno. So as soon as I grabbed Eclipse 4 I tried installing it via the Marketplace and voilá, it worked without any problems directly out of the box! Again, big congrats to the Eclipse community for preventing pain in my ass.

#### Isn´t the more for such a big release?
Of course there is! On the whole the are 72(!) projects involved which make up the new release. A very big part was made under the hood providing a better programming model for plugin writers. In general a big part of the base code was rewritten or decoupled to make it even easier and better to develop code. As I am a JEE developer I am not that much into such details.One new project that I will definitely have a look at is project Orion. Basically this project is about bringing web tools to the web. This should not suggest that Eclipse will be available as a web based solution but bringing some of its tools designed for developing or debugging web applications to the browser. In order to get you started there is a central OrionHub server which lets you clone Git repos and hack on them.If you need more information on the new release you have have a look at the official release announcement. Final wordsSo, what can I say now about the new Eclipse Juno? So far I am really impressed. Juno has made good progress and I think the release is really round. I like the new features and I think that they are good help in day-to-day work.The workbench feels very responsive not to say fast. To me it makes more fun to use the IDE because in earlier releases I saw the „waiting for…“ screen a lot which reeaallly annoyed me because I like to do things immediately instead of waiting for a background task to complete.I want to say a big „Thank you“ to the Eclipse community for the effort they put into this release. It was definitely worth it.Thanks again for tuning in! If you have any comments, ideas, improvements or whatever, don´t hesitate to write a comment or contact me on any other channels.-w0mbat

Daniel Sachse

Author Daniel Sachse

More posts by Daniel Sachse