Setting up Spring Dynamic Modules (OSGi) with Eclipse – A step-by-step tutorial

I spend some time playing with Spring Dynamic Modules (Spring-DM) and Eclipse (resp. its underlying OSGi platform Equinox) the other day. I had some minor annoyances in the beginning concerning the initial setup, since i didn’t found any comprehensible source on the web on what bundles are needed at least and what else is necessary in order to run your own Spring-DM-ified bundles.

The following instructions will show you all the steps you have to accomplish in order to set up a minimalistic workspace in eclipse for creating or droping in and executig arbitrary Spring-DM bundles.
Note, that this post will only show you the necessary steps for a setup – it’s by way no tutorial about how to build bundles with Spring-DM (maybe in a future post) or about OSGi at all. Read the rest of this entry »

conditional breakpoints in eclipse

ever debugged through code that processed items of a huge collection?
but you are only interested in the processing of one specific collection?

never mind – there are good news!
Eclipse offers the chance to define conditional breakpoints, that is to specify a condition under which the breakpoint will suspend, if and only if that condition will become true (or alternatively, everytime the condition changes). Read the rest of this entry »

my favorite eclipse shortcuts for code browsing

‘you have to have a set of tools, which you should use without any breakdowns’ i once read a sentence in the manner of the above in ‘The Pragmatic Programmer’.

for most developers eclipse is such a tool, so for me. here are some of my favorite shortcuts which helped me to keep my fingers on the keyboard when browsing through the code … Read the rest of this entry »

search and replace with regular expressions in eclipse

eclipse supports regular expressions within his dialog ‘search and replace’ (ctrl-f). you only have to activate the corresponding checkbox ‘Regular Expressions’ in the options pane.

let’s see eclipse in action by a simple example. suppose you want to surround a couple of numbers with some text: Read the rest of this entry »