Eclipse Zone is brought to you in partnership with:

He is a entrepreneur and a software architect from Tel Aviv, Israel. He is also a technology freak with about 20 years experience working with computers. He is currently working on his first private initiative in the area of software development tools. His vision is to maximize the abilities of software developers by providing pragmatic tools that enable them to get fast results. Zviki has posted 36 posts at DZone. You can read more from them at their website. View Full User Profile

Eclipse 3.4 Hidden Treasures

06.24.2008
| 60569 views |
  • submit to reddit

Eclipse 3.4 "Ganymede" will be released in the upcoming days. I've been working with the RC builds for some time now and I like it. Eclipse 3.4 is a better IDE and a more robust platform than its' predecessor. In this post, I've gathered some new features which I like and may be "off the beaten path".

Rich Hovers

This is not a hidden feature, but I had to mention it. The Java Development Tools include some interesting enhancements in this release. The greatest innovation is the Java Editor Breadcrumbs. It looks cool, but, after using it for some time, I didn't find it very useful. The Rich Hovers, on the other hand,  are very useful. I especially like the Javadoc hovers. There's an emphasis in making the documentation accessible and that's a very positive improvement.

Javadoc Rich Hover

Another useful rich hover is the Java debug hover which makes it easier to view the contents of compound objects without having to copy them to the expressions view. You can use the preferences to determine whether the behavior of the "enriched hovers".

Debug Rich Hover

The Dropins Folder

If you paid attention to the hype around Eclipse 3.4, you've heard the term P2. In simple terms, it's a new way of deploying Eclipse applications and plug-ins. For the average Eclipse user, the most noticeable change will be a new "Software Update" dialog which replaces the previous "Find & Install..." and "Manage Configuration" duo. It's a much better UI and it's a promising future to Eclipse updates.

Part of this change is "the dropins folder". This folder is located in your Eclipse distribution folder and it is initially empty. In this folder you can manually drop features and plugins which will be installed once you restart Eclipse. No more restarting with "-clean" option. There's also an option of using this folder to link to a central location of plugins, which can be shared among several Eclipse installations. I'll write a dedicated post about it in the future.

Templates View

One of the late features to make it into the Eclipse 3.4. Templates can be inserted while coding, usually using the content assistant. Adding and editing templates was possible before. In Eclipse 3.4 there's a new view which shows all possible templates and makes it easier to add new templates. There are also some new parameters which can be used when composing template. Templates are already an important feature. The templates view makes this feature even more user friendly, especially for customizations.
The view is found in the views under "General" - "Templates". Look in the Eclipse help for more details on the template variables.

Templates View

 

Format Only Edited Lines


The "Save Actions" is one of my favorite features in Eclipse 3.3 (read my original post about it). In Eclipse 3.4 there are several improvements including some new formatting features. One of the complaints against the Save Actions feature was that it will change the entire file, thus, making it very hard to compare to previous revisions when using a source control. It can become very annoying if some team members use it and some don't.

For that purpose there's a new feature which allows changing just the edited lines, keeping the rest of the file intact. I highly recommend using the Save Actions feature. It is inactive by default, so go ahead and activate it.

Enabling Format Edited Lines Only

Outline View Drag & Drop

This is a true hidden treasure. You can now easily rearrange your source code by dragging and dropping elements in the outline view. AFAIK, this currently works for Java and for XMLs. To use it, make sure the "sort" option is not selected and just drag & drop.

Outline View Java Outline View XML

Plug-in Spy


There are many new features in the Plug-in Development Environment (PDE) project which makes writing and deploying Eclipse plugins much easier. The Plug-in spy is a true hidden gem in this stack. One of the best ways to learn how to write plug-ins is to read the code of existing plug-ins. Naturally, the organic Eclipse plug-ins make great candidates. You see a view and you want to create something similar. The question is: how do you find the code behind that view?

This is where the plug-in spy comes into play. Invoke the plug-in spy and you'll get all the information that you need to start exploring the existing code. The plug-in spy can be invoked using the keyboard shortcut Shit+Option+F1 (Alt+Shift+F1 on Windows). It works on views and in dialogs as well, including the wizard and preferences dialog.

Plugin Spy

Error Log View


The error log view is not new. It shows platform errors and informational messages. It was greatly improved in Eclipse 3.4, with a search box and a grouping feature. It's all good, but, there's one cool feature tucked away in the toolbar. You can quickly use the log view to view the logs of workspaces you launched when running or debugging plug-ins. It shows all the defined launch configuration. Each launch configuration is associated with a runtime workspace. The log of this workspace will be shown when that configuration is selected.

Error Log View

Export/Import Launch Configurations

Launch configurations are an important part of the workspace. Every once in a while I start over and create a new workspace after having too much garbage in the old one. Importing the projects is a breeze. It's the configuration that takes time. Most of the configuration can be exported and imported and now the launch configuration are included. Since creating launch configurations can be time consuming, this is a much needed feature.

Start from the "File" menu and select the "Export" feature. Select the "Launch Configurations" and in the next dialog box select the configurations to export. The result is a folder of XMLs which can be later imported to any workspace

Launch Configuration Export

God is in the Details

The features I mentioned above are mostly major features. Eclipse 3.4 also includes an assortment of small improvements for making your life easier. The content assistant, for example, is improved, and it works in cases where it didn't before. Argument name guessing is much improved and can now also guess methods which may be called to produce the arguments (e.g. getters). There are many new feature you'll discover once you start using the new version. "Ganymede" is a great release for the Eclipse platform. 

 

From http://zvikico.typepad.com/

Published at DZone with permission of its author, Zviki Cohen.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Dave Newton replied on Tue, 2008/06/24 - 3:56pm

3.3 has both JavaDoc hovers and DnD in outline views, no? (Just confirmed with a Europa; seems like it does.)

Matthew Hall replied on Tue, 2008/06/24 - 8:55pm

In the Plug-in Spy section, I believe you meant to say Shift+Option+F1?  :)

Zviki Cohen replied on Tue, 2008/06/24 - 11:25pm

@newton_dave,

 As for the JavaDoc: It is much improved with the rich hover feature. You can focus it, scroll, follow links, etc. Much more useful.

 As for the DnD in Outlines: it is very limited in Europa. It allows moving elements inside elements. Reaaranging doesn't really work.

 

 

Dave Newton replied on Wed, 2008/06/25 - 6:54am

Oh, cool. (Although you can focus w/ F2 and scroll in Europa). Rearranging Java elements, at least, has always worked for me, although it's not a feature I really care about.

replied on Thu, 2008/06/26 - 8:43am

I found this article very helpful - thank you!  The outline view drag and drop could be very useful. Unfortunately, in CDT it fails to take the comments with the function which makes it useless.

Zviki Cohen replied on Thu, 2008/06/26 - 9:26am

@bob,

 Thanks for the feedback.

I encourage you to go ahead and open a bug on that.  As I see it, it's the least we can do to support the platform. There are mainly two ways of opening bugs: through the Bugzilla web interface (start at https://bugs.eclipse.org/bugs/) and through Eclipse, using the Mylyn plug-in with the Bugzilla connector. 

If you haven't done this before, the Mylyn interface can be a bit confusing, so you may want to start with the web interface. 

James Ervin replied on Sun, 2008/06/29 - 3:46pm

Nice article, being a plugin developer for a number of years, I cannot give enough love to Plugin Spy.  There are at least on the order of months of my life that this tool could have saved had it been in existence sooner. 

 

mike blumb replied on Sun, 2008/12/21 - 11:10am

hallow man replied on Thu, 2009/02/05 - 6:55am

As for the JavaDoc: It is much improved with the rich hover feature. You can focus it, scroll, follow links, etc. Much more useful.

regards,

Audi

 

martins ronaldo replied on Sat, 2009/05/09 - 1:35pm in response to: mike blumb

Exellent software, it helps me a lot especially Javadoc which is very useful for tracking links and scroll thank you for sharing <a href="http://www.telavenir.com">voyance</a>/ <a href="http://www.telavenir.com">medium</a>

bela dona replied on Mon, 2009/05/11 - 6:26am

Hi. Nice article, very helpfull. Early I had some small errors but now it works. thanks. behr paint - paint colors behr - behr colors

alex denipaul replied on Wed, 2009/10/21 - 4:01am

Eclipse is the best IDE ever made (after Borland's DOS-based Turbo Vision powered IDEs of the early 90s of course :-P). While the Java tools are currently a bit better than the C/C++ tools, the latter kick Visual C++'s and domain names ass in almost all cases. Of course this is a totally factless comment based on personal opinion and experience alone, and you can (dis)regard it as such :-). But seriously, having tried Visual C++ (the 2008 express edition and the "normal" 2005 edition at least), Code::Blocks, Qt Creator, Dev-C++ (i used that back when it was still updated), CodeGear Turbo C++ (this one looks like Eclipse from a UI design perspective) and Anjuta (i used that for a while in Linux) i find Eclipse to be superior to all of them. My only "complaint" is the building system for CDT: it just doesn't help for multiplatform projects which are made of many sub-projects. But for this i just switched to SCons and i configure my Eclipse CDT projects to just use that.

Javin Paul replied on Fri, 2011/04/08 - 9:35am

Thanks for sharing this useful information. I have also compiled list of  Top 20  useful eclipse 3.2 shortcuts   which is very important to learn and adopt to work proficiently in eclipse.

Carla Brian replied on Sun, 2012/05/13 - 5:53am

I can't wait for this. The tools are more wondeful than the last version. Looking forward for this. - Byron Pederson

Daniel Serodio replied on Tue, 2012/07/10 - 1:57pm

Did you write that article about the dropins folder you mentioned?

Lukas Eder replied on Sun, 2013/10/27 - 4:15pm

Awesome stuff. Here's more awesome stuff:
http://blog.jooq.org/2013/10/27/top-5-useful-hidden-eclipse-features/

I guess we could continue talking about awesome Eclipse features endlessly...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.