Eclipse 3.5 Hidden Treasures
Join the DZone community and get the full member experience.
Join For Freeeclipse 3.5 , aka galileo, was released about a month ago. i'm following up on my article from last year , highlighting some of the less obvious but very useful features in the new released. this list does not include all the new features. for the complete "new and noteworthy" check out this link . my focus is on common features which i found useful after test driving galileo for some time. so, without further ado, here's my list. i'm sure you have some more, so just let me know in the comments.
small note: the shortcuts in this article work on windows. on mac, substitute the ctrl with command (the apple key) unless stated otherwise.
the eclipse platform
mac cocoa support
for me, that was one of the most substantial change, since i am a mac user. read more about the new cocoa flavor of eclipse in my previous article .
plugin installation
plugin installation was completely redesigned in galileo. while writing this article i found i had just too much to say about it, so i wrote this article which is dedicated to the plugin installation.
open resource: "open with" options
the
open resource
dialog (ctrl-r) is one of the most useful tools in eclipse. simply
start typing a name of a file and find it in seconds. there's an
important improvement in galileo: the ability to right-click a file in
the list and ask to open it with a different editor.
i hope the next feature added will be to reveal the file in the package explorer.
better toolbar & menu customization
ui customization received a major improvement in galileo: you can
finally select which buttons/commands will appear in the toolbar/menu.
in previous versions, it was possible to disable or enable groups of
commands. now, buttons and menu options are controlled individually.
to customize your toolbar, right-click on the toolbar and select customize perspective . there are two new tabs here: tool bar visibility and menu visibility . these allow controlling individual items in the toolbar and menu.
block selection
galileo introduces b lock selection (sometime called discontinuous selection): the ability to select a box of text regardless of the line breaks or any other white-spaces. i think the implementation leaves room for improvements, but it is nice to see it anyway.
to use it, one must toggle
block selection mode
(alt+shift+a / option+command+a). the cursor changes and you may now
select any block of text. copy/paste works pretty much as expected.
however, if you paste a couple of lines and wish to undo the paste, you
will need to hit undo for each line pasted (although it was one
action). typing and deleting characters works nicely, enabling you to
instantly add text at the same position for a number of characters.
the block selection mode can also be used from a toolbar button. if you do not have it, go to the customize perspective dialog and enable the command group called editor presentatio n (you may hide the other buttons, see previous section).
java development tools (jdt)
it seems like the jdt is reaching a saturation point. it is a very good tool as it is and, perhaps, not much can be added. i am biased here, since i do offer a tool which greatly enhances the productivity of jdt called nwire .
debug view as breadcrumbs
for me, this is the most noticeable ui change in jdt. it revolutionized the organization of my debug perspective. the idea is that the debug view, which shows the running processes and threads, can be shown as a collapsible breadcrumbs rather than a full tree. this means it could be minimized and the space may be utilized for other views.
- switch to the debug perspective.
- in the debug view, click on the toolbar menu (a small triangle at the right side).
- select layout -> breadcrumb.
- move the view on top of the files, and reduce its' height.
- if you still need to see the entire tree, just click on the breadcrumbs.
tostring() generator
we've been waiting for that for some time now. actually, i was using a
3rd party plugin to generate my tostring methods. nevertheless, the
implementation of the tostring generator in galileo is highly
customizable and i find it very useful.
to use it, from the source menu select
generate tostring()...
you can controls the template, select methods to be included and more. a great little tool.
outline in compare editor
the
compare editor,
which
opens when comparing files (e.g. a file to a previous revision), was
revamped in galileo, adding all kinds of abilities which were only
available in the regular java editor. from all the features, i found
the
quick outline
(ctrl+o) to be the most useful. it makes browsing the file a lot quicker.
plug-in development environment (pde)
targets management
in pde, the target platform is the runtime which will be used when launching your plugins from pde (for testing and debugging). by default, it is your currently running eclipse. however, you may change it to other installed eclipse instances, which allows you to develop on one eclipse version and test on another.
there are 2 new tools in galileo which makes managing your platform a relatively simple task. first, there's the
target platform state
view. it is a bit like the
plugin registry
,
however, instead of showing your current platform state, it shows the
details of your target platform. you can easily see which plugins will
be included and where they are installed.
the second addition is the
target platform preferences page
which allows adding and changing platforms. in the previous eclipse
versions, target platforms were determined by a target file. this is
still possible in galileo, but you may also define targets using the
preferences. the creation of platforms has also been improved.
plug-in spy for menu items
i mentioned the
plug-in spy
(alt+shift+f1)
last year: it is a great little feature which quickly reveals which
class and plug-in stands behind each ui element. it is very useful for
finding the right example to learn from when developing eclipse
plug-ins and rcp applications.
the
plug-in spy
just got better, enabling
inspecting menu items
. click alt+shift+f2 (option+shift+f2 on os x) and then select a menu option to see its' implementation details.
in
this example, i selected navigate -> open type. there are active
links to the source code and plugin.xml file. using the item identifier
you can find the item definition. it is very useful in case you want to
add another after an existing item.
the p2 publisher
this is a very well hidden treasure. the p2 publisher is being used behind the scenes for building plugins, features, p2 repository metadata and update sites. for me, it has one important goal: enable headless pde builds .
the build process in pde was very complex up until now. creating a script that will automate it end-to-end required quite a bit of research and too much work. the p2 publisher solves this and becomes the one stop shop for automated pde builds . my experiments with this tool are limited, but it does show a lot of potential. you can start reading about it here .
Opinions expressed by DZone contributors are their own.
Comments