Eclipse 3.4 Hidden Treasures
Join the DZone community and get the full member experience.Join For Free
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".
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.
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".
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.
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.
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.
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.
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.
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.
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
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.
Opinions expressed by DZone contributors are their own.